Represent unlimited ICS20 authorization amount as MaxInt256 #3452
Labels
20-transfer
type: refactor
Architecture, code or CI improvements that may or may not tackle technical debt.
Summary
ICS20 authz spending limit always subtracts even if the value represents the maximum amount.
Problem Definition
The new ICS20 authorization included in v7 takes in a spending limit as a list of
sdk.Coin
and typeint64
. At Evmos we use ERC20 token allowance approvals that support an unlimited amount (which are represented as the maxuint256
value). If we pass in the maxuint256
amount effectively making it unlimited to the ICS20 authorization we assume that the amount will not be subtracted on each transfer.Proposal
We propose the unlimited value be represented as the
MaxUint256
. This will require an additional check and skip substracting from theSpendLimit
if the amount isMaxUint256
.For Admin Use
The text was updated successfully, but these errors were encountered: