Authorization
The user should grant authorization to allow smart contracts (including precompiled ones) to send messages on behalf of a user account. This is achieved by the Authorization.sol
and GenericAuthorization.sol
that provide the necessary functions to grant approvals and allowances. The precompiled contracts use these interfaces, AuthorizationI
and GenericAuthorizationI
, to allow users to approve the corresponding messages and amounts if needed.
Solidity Interfaces
Authorization.sol
Authorization.sol
Find the Solidity interface in the evmos/extensions repo.
GenericAuthorization.sol
GenericAuthorization.sol
Find the Solidity interface in the evmos/extensions repo.
Transactions
Authorization.sol
Authorization.sol
approve
Approves a list of Cosmos or IBC transactions with a specific amount of tokens
increaseAllowance
Increase the allowance of a given spender by a specific amount of tokens for IBC transfer methods or staking
decreaseAllowance
Decreases the allowance of a given spender by a specific amount of tokens for IBC transfer methods or staking
GenericAuthorization.sol
GenericAuthorization.sol
approve
Approves a list of Cosmos message
Queries
Authorization.sol
Authorization.sol
allowance
Returns the remaining number of tokens that the spender will be allowed to spend on behalf of the owner through IBC transfer methods or staking. This is zero by default
Events
Authorization.sol
Authorization.sol
Approval
This event is emitted when the allowance of a spender is set by a call to the
approve
method. Thevalue
field specifies the new allowance and themethods
field holds the information for which methods the approval was set.AllowanceChange
This event is emitted when the allowance of a spender is changed by a call to the decrease or increase allowance method. The
values
field specifies the new allowances and themethods
field holds the information for which methods the approval was set.
GenericAuthorization.sol
GenericAuthorization.sol
Approval
This event is emitted when the allowance of a spender is set by a call to the
approve
method. Themethods
field holds the information for which methods the approval was set.
Last updated