{"uid":"cap_iURZGpEr_yC76gSXF6VS1","slug":"erc-20-allowance-checker-base-optimism-mainnet-f737e0ac","name":"ERC-20 Allowance Checker (Base / Optimism / Mainnet)","description":"Pay-per-call on-chain API for AI agents and developers: wallet audits, token safety audits (honeypot detection), live gas prices, token prices, transaction receipts, balances, ENS resolution, block data, ERC-20 allowances, transaction simulation, swap quotes and multicall batches — all computed on-chain via public RPCs (no external market API). Pay per request in USDC on Base via the x402 exact scheme (EIP-3009 transferWithAuthorization). No API key, no signup, no subscription.","url":"https://x402-audit.tatschluizguilherme.workers.dev/allowance","method":"GET","headers":{},"bodySchema":null,"responseSchema":{"type":"json","example":{"owner":"0x8e8d53a67b59e6f2a28e0d6d52012a2b0e3e1886","token":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","symbol":"USDC","network":"base","spender":"0xd8da6bf26964af9d7eed9e03e53415d37aa96045","decimals":6,"blockNumber":24400123,"tokenExists":true,"allowanceWei":"0","allowanceFormatted":"0"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.1","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"registry","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.1/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.1","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.1","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_vcRmJssxvcVr-LNYFsFIS","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.1","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns the on-chain ERC-20 allowance (how much a spender is permitted to transfer from an owner wallet) on Base, Optimism, or Ethereum Mainnet, including formatted amount, decimals, symbol, and block number.","exampleAgentPrompt":"Check how much USDC the Uniswap v3 router (0xE592427A0AEce92De3Edee1F18E0157C05861564) is approved to spend from wallet 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 on Base — give me the allowance in both wei and formatted, plus the token symbol and current block.","exampleUseCases":[{"title":"Pre-swap approval check on Base","prompt":"Before I swap, check if the 1inch router at 0x1111111254EEB25477B68fb85Ed929f73A960582 is approved to spend my USDC (0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913) on Base — my wallet is 0xAbCd1234...5678. How much is it allowed to move?"},{"title":"DeFi security audit of wallet allowances","prompt":"I want to audit my wallet 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 — check if the Aave v3 pool contract 0x794a61358D6845594F94dc1DB02A252b5b4814aD is approved to spend any WETH (0x4200000000000000000000000000000000000006) on Optimism and tell me the exact allowance."},{"title":"Smart contract integration verification","prompt":"I'm integrating a new vault contract at 0xVaultAddress on Ethereum Mainnet — can you check whether our token 0xTokenAddress has approved the vault to spend from the deployer wallet 0xDeployerAddress, and tell me the formatted allowance and token decimals?"}],"resultDescription":"Returns a JSON object containing: the token contract address, owner address, spender address, the allowance in wei (raw), the formatted allowance (human-readable decimal), the token symbol, token decimals, and the block number at which the query was made — all retrieved directly from on-chain RPC without relying on any block explorer API.","failureModes":["Invalid or non-contract token address returns an error or zero allowance","Unsupported network returns a validation error","Malformed Ethereum address (wrong checksum or length) causes a request rejection","Token contract that doesn't implement the ERC-20 allowance function may cause an RPC revert","Network congestion or RPC timeout may cause a delayed or failed response"],"whenToPreferThis":"Prefer this endpoint when you need a trustless, explorer-independent on-chain allowance check across Base, Optimism, or Ethereum Mainnet. Ideal for pre-transaction approval validation in DeFi workflows, security audits, or any agent pipeline that cannot rely on third-party explorer APIs. Use over block-explorer scraping when you need structured, machine-readable output with wei and formatted values in one call.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T00:42:41.494Z","isFirstParty":false}