get_allowance
Check ERC-20 token allowance for a spender to determine if approval is needed before DeFi transactions. Returns both raw and human-readable amounts.
Instructions
Check how many ERC-20 tokens a spender is approved to transfer. Returns the allowance in both raw and human-readable format. Use this to check if an approval is needed before a DeFi transaction.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| wallet_id | Yes | Wallet ID (used to determine the owner address) | |
| token | Yes | ERC-20 token contract address | |
| spender | Yes | Spender contract address to check | |
| chain_id | Yes | Chain ID | |
| decimals | No | Token decimals (6 for USDC, 18 for most tokens) |