{"uid":"cap_qONgklK_PtxoaFjwacPvU","slug":"revoke-calldata-builder-4811f80d","name":"Revoke Calldata Builder","description":"approval-advisor tells you WHAT to revoke; this builds the HOW: the ready-to-sign transaction (to + calldata) for approve(spender, 0) on a token, plus the live current allowance read from Base (flags unlimited, or 'already revoked'). Hand the result straight to a wallet or agent signer — the action half of approval hygiene.","url":"https://402.com.tr/api/x402/revoke-builder","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"pathParams":{"type":"object"},"queryParams":{"type":"object","required":["token","spender"],"properties":{"token":{"type":"string","description":"Token contract"},"wallet":{"type":"string","description":"Your wallet (optional, reads live allowance)"},"spender":{"type":"string","description":"Spender to revoke"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_bwhxy--Aivxv1Q-K0erYu","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Builds the ready-to-sign revoke transaction (contract address + calldata for approve(spender,0)) and reads the live current allowance for a token/spender pair on Base.","exampleAgentPrompt":"Build me a revoke transaction for the USDC token contract 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 with spender 0x1111111254EEB25477B68fb85Ed929f73A960582 — and check what the current live allowance is for my wallet 0xYourWalletAddress.","exampleUseCases":[{"title":"Revoke unlimited DeFi protocol approval","prompt":"I gave Uniswap unlimited access to my WETH — build me the calldata to revoke that approval for token 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2 and spender 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D, and tell me if the allowance is still active."},{"title":"Pre-sign approval hygiene before transferring wallet","prompt":"Before I hand off this wallet, I need to revoke every risky approval. Start with token 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 and spender 0x3154Cf16ccdb4C6d922629664174b904d80F2C35 — give me the ready-to-sign revoke transaction and confirm the current allowance amount."},{"title":"Automated revoke after approval-advisor flagged a spender","prompt":"The approval advisor just flagged spender 0xDEF1C0ded9bec7F1a1670819833240f027b25EfF on my USDC token 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 as risky — build the approve-zero calldata so I can sign and broadcast it right away."}],"resultDescription":"Returns the destination contract address (to) and hex calldata encoding approve(spender, 0) ready for signing, plus the live current allowance value fetched from Base mainnet — flagged as unlimited if it equals max uint256, or marked as already revoked if it is zero.","failureModes":["Invalid token contract address returns an error or zero response","Invalid spender address format causes a 400-level error","Token contract does not implement ERC-20 approve, causing calldata generation failure","Wallet address omitted means live allowance cannot be read","RPC read failure on Base may cause allowance lookup to timeout","Unrecognized contract ABI may return malformed calldata"],"whenToPreferThis":"Choose this endpoint when you already know which token/spender pair to revoke (e.g. after running approval-advisor) and need the exact signed-ready calldata plus a live allowance confirmation — it bridges the gap between identifying a risky approval and actually executing the revocation, saving you from manually encoding approve(spender,0) calldata.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T12:50:42.917Z","isFirstParty":false}