Here is my code:

void play(account_name player, asset amount) {

   //The part that is throwing the error
   action {
     permission_level{player, N(active)}, //Using the passed in `player` account as ther permission
     currency::transfer {
         .from=player, .to=_self, .quantity=amount, .memo="Deposit"

When I call the function using:

cleos push action mycontract deposit '["myaccount", "30 EOS"]' -p myaccount

This is the error I get:

3192155ms thread-0   http_plugin.cpp:406           handle_exception     ] Exception Details: 3090003 unsatisfied_authorization: provided keys, permissions, and delays do not satisfy declared authorizations
transaction declares authority '{"actor":"myaccount","permission":"active"}', but does not have signatures for it under a provided delay of 0 ms, provided permissions [{"actor":"myaccount","permission":"eosio.code"}], and provided keys []
    thread-0  authorization_manager.cpp:409 check_authorization

Is there a way to perform this action with passed in account_name's as the permission?

How would the behavior need to be changed if I deploy this contract to the mainnet?

2 Answers 2


You need to give the caller eosio.code permission. Look at this issue:



Before you push action you can do this:

cleos set account permission youraccount active '{"threshold":
 1,"keys": [{"key": "your pub-key","weight": 1}],"accounts":
 account","permission":"**eosio.code**"},"weight":1}]}' owner -p your
  • 1
    Hello @fenchen, normally code should be formatted as code block (indenting four spaces or pressing ctrl+k in the editor). But I think the blockquote formatting is ok in this case, as the highlight is needed.
    – MEE
    Aug 5, 2018 at 14:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.