I have deployed contracts hello and callhello, where callhello makes a call to hello, which in turn prints an output. However, i'm not getting the result I'm hoping for

cleos push action callhello callhi '["callhello", "hi"]' -p callhello@active
Error 3090003: provided keys, permissions, and delays do not satisfy declared authorizations
Ensure that you have the related private keys inside your wallet and your wallet is unlocked.
Error Details:
transaction declares authority '{"actor":"callhello","permission":"active"}', but does not have signatures for it under a provided delay of 0 ms

This is the call from callhello to hello

                permission_level{ user, N(active) },
                N(hello), N(hi),
                std::make_tuple(user, _self)

Also, this is the permissions for the account hello:

 cleos get account hello
 privileged: false
 owner     1:    1 EOS5eynjBhk33eGpxFHvAbPXYXqHRhPJYHsQmpQptqdeVLJPpi6aN
    active     1:    1 EOS6aV6kN65XBWpD7h7BHP51kfJceKNSnGGdhT9WpD7Nw1vcyXEys1 callhello@active, 
       subperm     1:    1 callhello@active, 1 hello@active, 

So I thought that callhello would be able to push the action. I'm thinking that the signature isn't linked from one contract to the next, but don't know how to do that if so. Thankful for any help

  • you declared callhello@active to do the hello action, but your privilege is callhello@eosio.code, which does not satisfy your declared auth – Jimmy Guo Jun 30 '18 at 7:11

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": 1,
  "keys": [{
    "key": "'${EOS_KEY}'",
    "weight": 1
  "accounts": [{
    "permission": {"actor": "callhello",
               "permission": "eosio.code"},
               "weight": 1
  }]}' owner -p callhello

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 key is there

cleos wallet unlock --password PW************
cleos wallet keys

Then to import your key

cleos wallet import 5XYZ***********

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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