报错内容为:
{"code":500,"message":"Internal Service Error","error":{"code":3090003,"name":"unsatisfied_authorization","what":"Provided keys, permissions, and delays do not satisfy declared authorizations","details":[{"message":"transaction declares authority '{\"actor\":\"wangkes12345\",\"permission\":\"active\"}', but does not have signatures for it under a provided delay of 0 ms, provided permissions [{\"actor\":\"wangkes12345\",\"permission\":\"eosio.code\"}], provided keys [], and a delay max limit of 3888000000 ms","file":"authorization_manager.cpp","line_number":520,"method":"check_authorization"},{"message":"pending console output: ","file":"apply_context.cpp","line_number":72,"method":"exec_one"}]}}
执行EOS合约函数中调用了其他合约,例如我的合约里面使用了合约调用合约转账
这个时候需要给eosio.code权限
解决方案:
cleos set account permission <YOUR_ACCOUNT> active '{"threshold": 1,"keys": [{"key": "<YOUR_PUBLIC_KEY>","weight": 1}],"accounts": [{"permission":{"actor":"<CONTRACT_ACCOUNT>","permission":"eosio.code"},"weight":1}]}' owner -p <YOUR_ACCOUNT>
EOS技术学习群: 791420381, 太菜没技术的就不要加了[抠鼻]