prepare_revoke_approval
Build an unsigned transaction to revoke an ERC-20 token allowance by setting the spender's allowance to zero. Pre-flight check prevents gas waste if allowance is already zero.
Instructions
Build an unsigned approve(spender, 0) transaction that revokes the allowance the wallet previously granted to spender on token. Pre-flight check refuses when the live allowance is already 0 — that call would burn gas for nothing, and almost certainly means the user named the wrong (token, spender) pair. Resolves a friendly spender label from the canonical CONTRACTS table when one matches (Aave V3 Pool, Uniswap V3 SwapRouter02, Lido stETH, Compound V3 cUSDCv3, Morpho Blue, etc.) so the description + Ledger preview reads as "Revoke USDC allowance for Aave V3 Pool (0x...)" instead of a raw hex address. Description includes the previous allowance amount so the user sees what's being zeroed out. EVM-only — TRC-20 has the same approve(spender, value) shape but its prepare path runs through the TRON builder pipeline; surface in a prepare_tron_trc20_revoke if asked. Pair with the read-side get_token_allowances to enumerate what's currently approved.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| wallet | Yes | EVM wallet that owns the existing allowance. Must be the address that originally called approve(spender, value); only the owner can set the allowance back to zero. | |
| chain | No | ethereum | |
| token | Yes | ERC-20 contract address. Must be the actual token contract — wrappers and aTokens have their own approval surfaces and aren't supported here. | |
| spender | Yes | Address whose allowance to revoke. Typically a protocol contract (Aave V3 Pool, Uniswap SwapRouter, etc.) or any EOA the user previously approved. Get the live list via the read-side allowances tool. |