9 votes

How to change active key for an account?

Looks like I found the answer I was looking for. cleos set account permission accountname active '{"threshold": 1, "keys": [{"key": "NEW_ACTIVE_PUBLIC_KEY", "weight": 1}]}' owner When having weight ...
user avatar
7 votes
Accepted

Can we add the permission to access the table?

You can not forbid reading the data from a smart contracts table, because it is exposed by the RPC interface or CLI. What you can do to prevent understanding it by 3rd parties, is encrypt your data ...
user avatar
  • 2,104
7 votes

How to airdrop a new token to EOS holders?

How would users best ensure that the owner of the token didn't cheat and issue themselves additional tokens across a bunch of new accounts? This isn't really an issue, it's assumed by all involved in ...
user avatar
  • 1,135
6 votes
Accepted

How can you add or change the keys for the owner of an account?

To change the owner key, you can use this command: cleos set account permission account_name owner EOS_public_key_of_new_owner -p account_name@owner Multiple owners on an account is essentially a ...
user avatar
  • 885
6 votes
Accepted

Can we set permission using eosjs?

Basically, pull the existing permission, change only what you need to change, then pass everything back to updateauth .. async function getNewPermissions(accountName) { const account = await eos....
user avatar
6 votes
Accepted

How to create a separate EOS permission for voting using cleos

There are basically two steps you need to do. First you create a new account permission and then you give it the authority to use voteproducer action on eosio contract. As a prerequisite for this ...
user avatar
  • 113
4 votes
Accepted

"dice" contract "withdraw" action problem

as explained in the message, you need to add 'eosio.code' permission to dice@active cleos set account permission dice active '{"threshold": 1,"keys": [{"key": "...
user avatar
  • 201
4 votes
Accepted

What is the purpose for each of the eosio.* system accounts?

Bios sequence tutorial (Deprecated Wiki) explain these well - eosio.token, eosio.msig. The remaining accounts are described below. all RAM trading fees sent from user to eosio.ramfee all proceeds ...
user avatar
  • 1,015
3 votes

custom permission can't sign contract 309005

Because _self is alice, your two push actions are not executed. If you set inc to alice@active, cleos push action alice increment '""' -p alice@inc will be executed.
user avatar
  • 1,015
3 votes
Accepted

Smart contract call - Error 3090004: Missing required authority

The problem is that the first argument passed to the emplace() method in the multi-index structure is not an account you have permission to use as a payer. According to the docs, the parameters are ...
user avatar
  • 5,524
3 votes

In Eosbetdice contract, in the transfer action, why it is able to emplace a new row in this table?

Because it is being paid for by _self, which is always allowed. In general, you can not charge other people RAM when doing transfers, only yourself. You can charge other people RAM when performing ...
user avatar
3 votes
Accepted

Setting a key to NULL

The permission that you would set your account to would not be a key, but would instead be the account eosio.null@active. This is a special permission that can not be used by anybody ever (it has no ...
user avatar
3 votes
Accepted

How do I set my smart-contract / account to "immutable"?

cleos set account permission MYACCOUNT active '{"threshold": 1, "keys":[], "accounts":[{"permission":{"actor":"eosio.null","permission":"active"},"permission":{"actor":"MYACCOUNT","permission":"eosio....
user avatar
2 votes

Error 3090003 when calling a contract from another contract

As Jimmy mentioned contract callhello needs permission eosio.code. To solve that you can run the cleos set account permission command: cleos set account permission callhello active \ '{"threshold": ...
user avatar
  • 833
2 votes

Can we set permission using eosjs?

In https://github.com/LimeChain/eoslime (uses eosjs behind the scene) there is a addPermission method, which you can use in order to accomplish your aim. It will add a permission for example eosio....
user avatar
2 votes

how can I implement recovery key thing in eos private network?

eosio.recovery contract provide user to recover their account if their owner keys are stolen. For this purpose you need to set a permission ‘recover’ and provide a trusted account for recovery. ...
user avatar
2 votes

Error in eosjs account creation on localnet

You need to add an authority to eosconfig, e.g.: eos = Eos({ keyProvider, authorization: EOSIO_ACCOUNT_NAME + '@active', });
user avatar
  • 833
2 votes
Accepted

How much does it cost to add a new permission to an account?

Testing with v1.5.1, adding a new permission to an account (set account): Corresponding contract action: updateauth RAM: 32 bytes NET: 185 bytes CPU: 320 time for set action permission: ...
user avatar
2 votes
Accepted

How to remove a key from account permissions?

You can go to eostoolkit to do that. Enter the public key you'd like to keep, set owner as parent, your account name, then keep the threshold at 1 and sign the transaction. Remove a permission ...
user avatar
  • 3,405
2 votes
Accepted

Can smart contract trigger some action on specified timestamp and change certain account balances?

This can be done by deferred transaction. It's very normal use case, for example, unstaking EOS from CPU and NET bandwidth triggers refund action which is executed in 72 hours. In your case, add the ...
user avatar
  • 2,270
2 votes

Code examples for ONLY_BILL_FIRST_AUTHORIZER

The ONLYBILL1ST proposal has now been approved by 15 Block producers. I have tested and OnlyBillFirstAuthorizer is working now. I'm using eos-sharp. But it's very similar to eos-js. It's very simple. ...
user avatar
2 votes

How to add "eosio.code" permission to an account on testnet?

I think this is specific to the EOSIO testnet from Block One. You can try adding it by doing the following: cleos -u https://api.testnet.eos.io set account permission lsqkeotnnpyu active --add-code ...
user avatar
1 vote

Error in eosjs account creation on localnet

I had the same error shown when performing an action on a test network, and I solved it updating my permissions launching this single cmd: cleos.sh set account permission <your-account> active ...
user avatar
1 vote
Accepted

Advanced Account Permissions

By default all EOS accounts come with two permissions owner and active which can share the same keypair or be seperate. From what you've described you can simple just make the owner key a cold ...
user avatar
1 vote

Error 3090003 when calling a contract from another contract

One reason this can happen is if you didn't import your active key into your cleos wallet. Remember that signing keys from your wallet is done completely separate from the contract. To check if your ...
user avatar
1 vote

What is the purpose for each of the eosio.* system accounts?

This article goes into detail. https://developers.eos.io/eosio-nodeos/docs/bios-boot-sequence Here are some that I found: The eosio.token contract. This contract enables you to create, issue, ...
user avatar
  • 3,405
1 vote

Getting an unknown key error while transfer some EOS form one account to another

This issue does not relate to account permissions. Permission errors would typically look like this: Error Details: transaction declares authority '{"actor":"player","permission":"active"}', but does ...
user avatar
1 vote

Is it possible to call "updateauth" to change account keys from within a smart contract?

Yes, it is possible. The action is in native.hpp in the eosio.system contract from eosio.cdt repository: [[eosio::action]] void updateauth( ignore<name> account, ...
user avatar
1 vote
Accepted

How does one prevent smart contracts from taking all your tokens, when you give them your auth?

When a contract sends an inline action, it cannot send with the permission level passed by the caller; it sends with a special eosio.code permission name. In your example, makepokemon can only use ...
user avatar
  • 5,524
1 vote

How does one prevent smart contracts from taking all your tokens, when you give them your auth?

So the user pushes the action with -p user@active, and now the contract can "steal" those tokens unrightfully? Or am I missing something? No, that can not steal the tokens because you check the ...
user avatar

Only top scored, non community-wiki answers of a minimum length are eligible