Documentation
¶
Index ¶
- func ERC20Approve(spender common.Address, amount *big.Int) ([]byte, error)
- func ERC20Balance(userAddr, tokenAddr common.Address) (*big.Int, error)
- func GetAllowance(tokenAddr, contractAddr, userAddr common.Address) (*big.Int, error)
- func PackERC20Approve(spender common.Address, amount *big.Int) ([]byte, error)
- type CheckAllowanceResult
- type ERC20Info
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ERC20Approve ¶
generate approve amount call's approveCall Data
func GetAllowance ¶
Types ¶
type CheckAllowanceResult ¶
type CheckAllowanceResult struct { AllowanceAmount *big.Int `json:"allowanceAmount"` IsSatisfied bool `json:"isSatisfied"` AllowanceData []byte `json:"allowanceData"` }
func CheckAllowance ¶
func CheckAllowance(fromToken, spender, userAddr common.Address, amount *big.Int, fromIsETH bool) (*CheckAllowanceResult, error)
Cannot use this to check ETH
Click to show internal directories.
Click to hide internal directories.