Authorization
The user should grant authorization to allow smart contracts to send messages on behalf of a user account. This is achieved by theAuthorization.sol
that provides the necessary functions to grant approvals and allowances.
The precompiled contracts use the AuthorizationI interface,
to allow users to approve the corresponding messages and amounts.
Solidity Interfaces
Authorization.sol
Find the Solidity interface in the Paxeer Network/extensions repo.
Transactions
-
approveApproves a list of Cosmos or IBC transactions with a specific amount of tokens -
revokeRevokes authorizations of Cosmos transactions. -
increaseAllowanceIncrease the allowance of a given spender by a specific amount of tokens for IBC transfer methods or staking -
decreaseAllowanceDecreases the allowance of a given spender by a specific amount of tokens for IBC transfer methods or staking
Queries
-
allowanceReturns 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
-
ApprovalThis event is emitted when the allowance of a spender is set by a call to theapprovemethod. Thevaluefield specifies the new allowance and themethodsfield holds the information for which methods the approval was set. -
RevocationThis event is emitted when an owner revokes a spender’s allowance. -
AllowanceChangeThis event is emitted when the allowance of a spender is changed by a call to the decrease or increase allowance method. Thevaluesfield specifies the new allowances and themethodsfield holds the information for which methods the approval was set.