approve
Build an unsigned ERC-20 token approval transaction.
Tier: Free
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
token | string | Yes | Token to approve — symbol or address |
spender | string | Yes | Spender contract address |
amount | string | No | Approval amount (default: unlimited) |
chainId | number | No | Chain ID (default: 1) |
walletAddress | string | Yes | Token owner’s wallet address |
Example
"Approve USDC spending for contract 0x1234... on Ethereum"Signing Flow
- MCP server calls signing service
/api/build/approve - Signing service builds unsigned
approve(spender, amount)tx via viem - Unsigned tx queued for approval
- User reviews spender contract and allowance amount, then signs
Notes
- Default approval amount is
maxUint256(unlimited) - Specify a finite amount for tighter security