github.com/Finschia/finschia-sdk@v0.48.1/x/authz/spec/03_messages.md (about) 1 <!-- 2 order: 3 3 --> 4 5 # Messages 6 7 In this section we describe the processing of messages for the authz module. 8 9 ## MsgGrant 10 11 An authorization grant is created using the `MsgGrant` message. 12 If there is already a grant for the `(granter, grantee, Authorization)` triple, then the new grant will overwrite the previous one. To update or extend an existing grant, a new grant with the same `(granter, grantee, Authorization)` triple should be created. 13 14 +++ https://github.com/cosmos/cosmos-sdk/blob/v0.43.0-beta1/proto/cosmos/authz/v1beta1/tx.proto#L32-L37 15 16 The message handling should fail if: 17 18 - both granter and grantee have the same address. 19 - provided `Expiration` time is less than current unix timestamp. 20 - provided `Grant.Authorization` is not implemented. 21 - `Authorization.MsgTypeURL()` is not defined in the router (there is no defined handler in the app router to handle that Msg types). 22 23 ## MsgRevoke 24 25 A grant can be removed with the `MsgRevoke` message. 26 27 +++ https://github.com/cosmos/cosmos-sdk/blob/v0.43.0-beta1/proto/cosmos/authz/v1beta1/tx.proto#L60-L64 28 29 The message handling should fail if: 30 31 - both granter and grantee have the same address. 32 - provided `MsgTypeUrl` is empty. 33 34 NOTE: The `MsgExec` message removes a grant if the grant has expired. 35 36 ## MsgExec 37 38 When a grantee wants to execute a transaction on behalf of a granter, they must send `MsgExec`. 39 40 +++ https://github.com/cosmos/cosmos-sdk/blob/v0.43.0-beta1/proto/cosmos/authz/v1beta1/tx.proto#L47-L53 41 42 The message handling should fail if: 43 44 - provided `Authorization` is not implemented. 45 - grantee doesn't have permission to run the transaction. 46 - if granted authorization is expired.