EOSIO / eos

An open source smart contract platform
https://developers.eos.io/manuals/eos
MIT License
11.27k stars 3.6k forks source link

Error: Error 3090003: provided keys, permissions, and delays do not satisfy declared authorizations #4454

Closed MikkySnow closed 6 years ago

MikkySnow commented 6 years ago

I've deployed eosio.token contract at local testnet and created new token called TEST via calling cleos push action eosio.token create '["user", "100000000.0000 TEST", 0, 0, 0]' -p eosio.token. After that I've issued some tokens to user account.

Transferring tokens via inline call works perfectly, but when I try to transfer tokens via action I get

Error 3090003: provided keys, permissions, and delays do not satisfy declared authorizations

My inline call:

 cleos push action eosio.token transfer '["user", "other", "10000.0000 TEST", "memo"]' -p user

My function for transferring tokens:

void act( account_name from, account_name to, asset quantity) {
            action(
               permission_level{ from, N(active) },
               N(eosio.token), N(transfer),
               std::make_tuple(from, _self, quantity, std::string(""))
            ).send();
      }

My call for this function: cleos push action test act '["user", "other", "10000.0000 TEST"]' -p user

spartucus commented 6 years ago

see https://github.com/EOSIO/eos/issues/3482#issuecomment-396310564

blockchain-expert commented 6 years ago

try ./cleos.sh instead of cleos

andriantolie commented 6 years ago

Yes, you need the "user" account need to authorize "test" account eosio.code permission with his active permission. i.e.

cleos set account permission user active '{"threshold":1, "keys":[{"key":"USER_ACTIVE_PUBLIC_KEY_HERE", "weight":1}], "accounts": [{"permission":{"actor":"test","permission":"eosio.code"},"weight":1}]}' owner -p user
MikkySnow commented 6 years ago

Thanks, it works

Aniket-Engg commented 6 years ago

Getting same error while trying to create account using eosjs & localnet. https://eosio.stackexchange.com/questions/2422/error-in-eosjs-account-creation-on-localnet