{"uid":"cap_B389u9HqOvPEiSLKyWmK2","slug":"agent-data-tools-revmesh2074-workers-dev-optimism-erc-20-allowance-59cbdd38","name":"Optimism ERC-20 Allowance","description":"ERC-20 token allowance on Optimism: how much a spender may move from an owner's wallet (allowance), raw and in token units, and whether the approval is unlimited. Use to check an approval before a swap or to audit risky open approvals; for the owner's balance use op_token_balance. Token is a ticker (USDC, USDT, WETH…) or a 0x contract; a missing contract is 404 and a non-ERC-20 422, both uncharged.","url":"https://agent-data-tools.revmesh2074.workers.dev/op/allowance?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","required":["token","owner","spender"],"properties":{"owner":{"type":"string","description":"0x wallet that gave the approval"},"token":{"type":"string","description":"Token: a ticker such as USDC or WETH, or the 0x ERC-20 contract address"},"spender":{"type":"string","description":"0x contract or wallet allowed to spend (the example is Uniswap Permit2)"}}},"responseSchema":{"type":"object","properties":{"raw":{"type":"string"},"chain":{"type":"string"},"owner":{"type":"string"},"token":{"type":"string"},"symbol":{"type":"string"},"chainId":{"type":"number"},"spender":{"type":"string"},"decimals":{"type":"number"},"allowance":{"type":"string"},"unlimited":{"type":"boolean"}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USD","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.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_3ZC4dNdtk64SjS_fSN9Rd","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"agent-data-tools.revmesh2074.workers.dev","brandSlug":"agent-data-tools-revmesh2074-workers-dev-x402","brandBaseUrl":"https://agent-data-tools.revmesh2074.workers.dev","brandDocsUrl":null,"whatItDoes":"Returns the ERC-20 token allowance on Optimism — how much a spender is approved to move from an owner's wallet, in both raw and human-readable units, plus whether the approval is unlimited.","exampleAgentPrompt":"Check how much USDC the Uniswap Permit2 contract (0x000000000022D473030F116dDEE9F6B43aC78BA3) is allowed to spend from my Optimism wallet 0xAbCd...1234 — I want to know the allowance amount and whether it's unlimited.","exampleUseCases":[{"title":"Pre-swap allowance check on Optimism","prompt":"Before I submit this USDC swap on Optimism, check whether my wallet 0xAbCd...1234 has already approved enough USDC for the Uniswap Permit2 contract 0x000000000022D473030F116dDEE9F6B43aC78BA3 to spend."},{"title":"Audit unlimited token approvals","prompt":"I want to audit my Optimism wallet 0xAbCd...1234 — check if the Aave lending pool 0x794a61358D6845594F94dc1DB02A252b5b4814aD has an unlimited WETH approval from me so I know if there's a risky open approval."},{"title":"DeFi security review before revoke","prompt":"Can you check how much USDT the SushiSwap router 0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506 is approved to spend from my Optimism wallet 0xDeFi...5678? I need the raw amount and whether it's an unlimited approval before I decide to revoke it."}],"resultDescription":"Returns a JSON object with the allowance in human-readable token units (allowance field), the raw integer allowance string (raw), a boolean flag indicating whether the approval is unlimited (unlimited), plus token metadata: symbol, decimals, chain name, and chainId, along with the owner and spender addresses echoed back for confirmation.","failureModes":["404 — token contract address not found on Optimism (uncharged)","422 — contract exists but is not an ERC-20 token (uncharged)","Invalid owner or spender address format returns an error","Network or RPC timeout if Optimism node is temporarily unreachable"],"whenToPreferThis":"Use this endpoint when you need to check or audit a token allowance on the Optimism network specifically. Prefer it over generic blockchain RPC calls because it resolves token tickers (USDC, WETH) without requiring the contract address, returns the allowance in both raw and human-readable units, and explicitly flags unlimited approvals. Choose over similar endpoints on other chains when your owner wallet and token are on Optimism (OP Mainnet). Use op_token_balance instead if you need the owner's actual token balance rather than an approval amount.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-29T12:41:24.632Z","isFirstParty":false,"canonicalSlug":"agent-data-tools-revmesh2074-workers-dev-optimism-erc-20-allowance-59cbdd38"}