4

I wonder if anyone experienced a similar problem and managed to resolve it.

I'm testing the "dice" contract on my local tesnet. I've setup up all necessary contracts and could deposit assets to the "dice" contract, but when I try to withdraw funds, that is, invoke "withdraw" action, I get the following error:

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.

And here are messages from nodeos:

2757860ms thread-0   http_plugin.cpp:405           handle_exception     ] FC Exception encountered while processing chain.push_transaction
2757860ms 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":"dice","permission":"active"}', but does not have signatures for it under a provided delay of 0 ms, provided permissions [{"actor":"dice","permission":"eosio.code"}], and provided keys []
    {"auth":{"actor":"dice","permission":"active"},"provided_delay":0,"provided_permissions":[{"actor":"dice","permission":"eosio.code"}],"provided_keys":[],"delay_max_limit_ms":3888000000}
    thread-0  authorization_manager.cpp:409 check_authorization
{"_pending_console_output.str()":""}
thread-0  apply_context.cpp:62 exec_one

setup_dice.txt - script to setup "dice" contract (all keys are uploaded to the wallet and it is unlocked) I'm testing this on the EOS v1.0.5, but the same was for v1.0.2

I'm not sure if this is an EOS core problem, or "dice" contract has incorrect implementation or its description here is outdated.

There is also issue #4166 I opened on the GitHub describing this problem.

UPDATE: This problem was solved according to this answer on GitHub

4
  • First, 'eosio.code' was definitely wrong. Change to 'active'. Let's take a look at the next problem.
    – smarteasy
    Commented Jun 19, 2018 at 9:14
  • Show the error after doing this.
    – smarteasy
    Commented Jun 19, 2018 at 9:32
  • After suggested change, I get error on "deposit" action, which was working previously. transaction declares authority '{"actor":"alice","permission":"active"}', but does not have signatures for it under a provided delay of 0 ms, provided permissions [{"actor":"dice","permission":"eosio.code"}], and provided keys [] {"auth":{"actor":"alice","permission":"active"},"provided_delay":0,"provided_permissions":[{"actor":"dice","permission":"eosio.code"}],"provided_keys":[],"delay_max_limit_ms":3888000000} thread-0 authorization_manager.cpp:409 check_authorization
    – kolkhi
    Commented Jun 19, 2018 at 10:15
  • My permission command is - cleos set account permission alice active '{"threshold": 1,"keys": [{"key": "EOS5UN5TzsSFSfbdX48MeZrGEywYLPzXNbXd6vbf2frVSsdKp6g1C","weight": 1}],"accounts": [{"permission":{"actor":"dice","permission":"active"},"weight":1}]}' owner -p alice@active
    – kolkhi
    Commented Jun 19, 2018 at 10:17

1 Answer 1

4

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": "EOS7ijWCBmoXBi3CgtK7DJxentZZeTkeUnaSDvyro9dq7Sd1C3dC4","weight": 1}],"accounts": [{"permission":{"actor":"dice","permission":"eosio.code"},"weight":1}]}' owner -p dice

1
  • I'd like to thank you very much, and I want to know if it is a common solution?
    – Jimmy Guo
    Commented Jun 28, 2018 at 9:58

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.