{"uid":"cap_opU0l4GW9kq7UkTXpPKGx","slug":"avasis-erc-20-allowance-checker-base-c465c436","name":"Avasis ERC-20 Allowance Checker (Base)","description":"ERC-20 allowance check on Base (chain 8453, $0.02): owner + token + spender -> allowance (raw + units, unlimited flag), balance, spendable now = min(allowance, balance), USD exposure, spender code check (EOA = drainer pattern), Permit2 note. Add amount for a needs-approval check (shortfall) + approve calldata; revoke calldata always. Phrases: erc20 allowance, token approval check, needs approval, approve calldata, revoke approval. GET or POST JSON. Not an ERC-20 -> 404, never charged.","url":"https://agents.avasis.ai/v1/base/erc20-allowance?utm_source=zero.xyz","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"},"queryParams":{"type":"object","required":["owner","token","spender"],"properties":{"chain":{"type":"string","description":"optional; must be base / 8453 on this route"},"owner":{"type":"string","description":"the token holder whose approval you are checking (0x + 40 hex)"},"token":{"type":"string","description":"ERC-20 token contract on Base (0x + 40 hex)"},"amount":{"type":"string","description":"optional amount in token units (e.g. 100.5): adds the needs-approval check (sufficient allowance / balance, shortfall) and exact approve calldata"},"spender":{"type":"string","description":"the contract or account that would call transferFrom (router, Permit2, bridge, ...) (0x + 40 hex)"}},"additionalProperties":false}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","required":["chain","token","owner","spender","allowance","spendable_now","calldata","headline"],"properties":{"usd":{"type":"object"},"kind":{"type":"string"},"rail":{"type":"string"},"chain":{"type":"string"},"check":{"type":["object","null"]},"owner":{"type":"string"},"token":{"type":"object"},"spender":{"type":"object"},"calldata":{"type":"object"},"chain_id":{"type":"integer"},"headline":{"type":"string"},"allowance":{"type":"object"},"block_number":{"type":"integer"},"owner_balance":{"type":"object"},"spendable_now":{"type":"object"},"also_available":{"type":"object"},"covers_full_balance":{"type":["boolean","null"]}}}}}}},"responseSchema":{"type":"json","example":{"usd":{"note":"exposure = spendable_now at the current price","price":1,"exposure":11285.04,"allowance":null,"price_source":"stablecoin peg (known issuer)","owner_balance":11285.04},"kind":"erc20-allowance","rail":"evm-rails-1","chain":"base","check":{"amount":"250","verdict":"READY: the spender can move this amount now","amount_raw":"250000000","needs_approval":false,"shortfall_balance":"0","sufficient_balance":true,"shortfall_allowance":"0","sufficient_allowance":true,"approve_exact_calldata":null},"owner":"0x8fae03e3e0cb922297495bc22ee2a7c997f89b8d","reads":{"rpc":"fixture","calls":8,"elapsed_ms":0},"token":{"known":"USDC (Circle)","symbol":"USDC","address":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","decimals":6,"decimals_source":"decimals()"},"spender":{"note":"Permit2 keeps its own per-spender allowances on top of this ERC-20 approval","known":"Uniswap Permit2","address":"0x000000000022d473030f116ddee9f6b43ac78ba3","permit2":true,"is_contract":true},"calldata":{"to":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","from":"the owner","note":"approve(spender, amount) as 0x calldata, ready to sign from the owner; prefer an exact amount over unlimited; revoke = approve(spender, 0). Simulate first: /v1/<chain>/tx-precheck","revoke":"0x095ea7b3000000000000000000000000000000000022d473030f116ddee9f6b43ac78ba30000000000000000000000000000000000000000000000000000000000000000","approve_exact":null,"approve_unlimited":"0x095ea7b3000000000000000000000000000000000022d473030f116ddee9f6b43ac78ba3ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"},"chain_id":8453,"headline":"USDC on Base: 0x8fae…9b8d allows Uniswap Permit2 UNLIMITED; balance 11,285.039971 (exposure $11,285.04); READY for 250","allowance":{"raw":"115792089237316195423570985008687907853269984665640564039457584007913129639935","zero":false,"amount":"115792089237316195423570985008687907853269984665640564039457584007913129.639935","unlimited":true,"pct_of_balance":100},"block_number":53354727,"owner_balance":{"raw":"11285039971","error":null,"amount":"11285.039971"},"spendable_now":{"raw":"11285039971","note":"what the spender could move right now = min(allowance, owner balance)","amount":"11285.039971","limited_by":"balance"},"covers_full_balance":true}},"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_fxSldTW5ruYXq1SLZMiqH","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":"Returns the current ERC-20 token allowance a spender has over an owner's balance on Base, including optional approval sufficiency checks and ready-to-sign calldata.","exampleAgentPrompt":"Check the USDC allowance my wallet 0x8fae03e3e0cb922297495bc22ee2a7c997f89b8d has granted to Uniswap Permit2 (0x000000000022d473030f116ddee9f6b43ac78ba3) on Base, and tell me if that allowance covers a transfer of 250 USDC — include the calldata to revoke if needed.","exampleUseCases":[{"title":"Pre-swap allowance safety check","prompt":"Before I swap 500 USDC on Uniswap on Base, check whether my wallet 0x8fae03e3e0cb922297495bc22ee2a7c997f89b8d has already approved Permit2 (0x000000000022d473030f116ddee9f6b43ac78ba3) for at least that amount, and give me the approve calldata if not."},{"title":"Revoke unlimited ERC-20 approval","prompt":"I think I gave an unlimited USDC approval to some contract on Base. Check the allowance my address 0x8fae03e3e0cb922297495bc22ee2a7c997f89b8d gave to 0x000000000022d473030f116ddee9f6b43ac78ba3 for the USDC token 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913, and give me the calldata to revoke it."},{"title":"DeFi bridge approval readiness","prompt":"My wallet is 0xAbC1234567890abcdef1234567890abcdef12345. Check if I've approved the Across bridge contract 0x3baD7AD0728f9917d1Bf08af5782dCbD516cDd96 to spend my WETH (0x4200000000000000000000000000000000000006) on Base, and whether the allowance covers 1.5 WETH — show me the approve calldata if I still need to set it."}],"resultDescription":"A JSON object containing: the current allowance (raw and human-readable, with unlimited flag), the owner's token balance, the USD exposure value, a spendable_now figure, a headline summary string, spender and token metadata (known protocol name, contract flag, Permit2 flag), optional approval sufficiency verdict (READY/shortfall), exact approve and revoke calldata ready to sign, and the block number at which data was read.","failureModes":["Missing required query params (owner, token, or spender) returns a 400-level error","Invalid or non-checksummed Ethereum address format causes a parse error","Token contract address does not exist on Base returns zero allowance or RPC error","Network/RPC timeout results in a 5xx error","Payment not included or insufficient causes an x402 payment-required response","Non-Base chain ID supplied may be rejected or routed incorrectly"],"whenToPreferThis":"Use this endpoint when you need a complete allowance picture for an ERC-20 token on Base in a single call — especially when you also need approval sufficiency validation against a specific amount and ready-to-sign approve/revoke calldata. Prefer this over raw RPC calls when you want enriched metadata (known protocol names, USD exposure, Permit2 detection) without setting up an account or API key. Best suited for DeFi automation agents that need to gate-check approvals before executing swaps, bridges, or other transferFrom-based operations.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-02T18:32:50.148Z","isFirstParty":false,"canonicalSlug":"avasis-erc-20-allowance-checker-base-c465c436"}