Skip to content
type ERC20ApproveParams = object;

Inputs for a single ERC-20 approve(spender, amount) call. ERC20RevokeParams is the same shape without amount.

Properties

amount

amount: bigint;

Allowance to set, in the token’s smallest unit. This replaces the current allowance rather than adding to it; some tokens (e.g. USDT) reject non-zero to non-zero changes — see buildERC20RevokeTransaction.


erc20Address

erc20Address: Address;

The ERC-20 token contract whose approve is being called.


from?

optional from?: Address;

If not provided, this will be populated by the configured signer.


spender

spender: Address;

The address being granted the allowance. For protocol flows this is the CollateralVault (sdk.getContractAddress(AnvilContract.CollateralVault)), which pulls tokens on deposit.