Attempt to inline action from "eosio" with "eosio.code" permission level failed
It failed because the permission level "eosio.code" did not exist. I thought this was a default permission / special permission flag that implicitly exists.
eosio.code is a virtual permission. It doesn't actually exist, but the [email protected] permission level is automatically considered satisfied if it is encountered while traversing authorities under the context of sending an inline action or deferred transaction.
Because it doesn't actually exist, it means it doesn't have an authority that can be updated (which is desired behavior) nor can it be linked to as a minimum permission of an action (which is debatable regarding whether this is desired or undesired behavior).
Because it is a virtual permission, it means it can never be included in the authorizations of an action. If you want a contract to be able to send an inline action, the contract needs to add a real permission to the authorizations which is unilaterally satisfiable by the [email protected] permission.
This is possible to do (despite the fact that eosio.code is a virtual permission) because the updateauth action has a special case in which it allows the eosio.code permission name to be included in an authority even though the permission does not really exist.
Given the above, I added the permission via
set account permission
The result is the account added to active auth with a permission of eosio.code
"perm_name": "active",
"parent": "owner",
"required_auth": {
"threshold": 1,
"keys": [{
"key": "EOS5ZcPRFtk36Pi22ifsm291ZhBMqWMxsbCa3AKZAjM1SpTqKFp9t",
"weight": 1
}
],
"accounts": [{
"permission": {
"actor": "ptdirectedio",
"permission": "eosio.code"
},
"weight": 1
}
],
"waits": []
An still get inline action's authorizations include a non-existent permission
when using inline as
action(permission_level{N(
Can you point out what I am doing wrong. Thanks
"permission": {"actor": "", @PatientDirected Why actor is empty?