Add cleos helper command to add eosio.code to permission #6072
Comments
Should this new command have ability to add only |
This issue is about providing an easy way for contract developers to setup their account permissions so that their deployed contract can function properly. So I see it as a quick convenience command that doesn't require the developer to manually write any part of the authority structure and merely requires them to provide the permission they want to "upgrade". Part of that permission upgrade process requires fetching the existing authority and figuring out what the appropriate So here is how I envision such a generalized cleos command:
|
Resolved by #6116. |
Contracts will almost always need to satisfy some authorization of
_self
to do things like sending inline actions. This requires adding the_self@eosio.code
permission level to the authority (in a way that allows it to unilaterally satisfy the authority) of the permission(s) that the contract wishes to satisfy the authorization for.The process of adding the
eosio.code
permission is cumbersome and error-prone if done manually. A new sub-command added to the cleos could automate this process by fetching the current authority of a specified permission, modifying it (if possible and not already done) to add the theeosio.code
permission to the authority in a way that unilaterally satisfies the authority, and then push aneosio::updateauth
action to change the permission authority to the newly computed authority.The text was updated successfully, but these errors were encountered: