{"uid":"cap_2dipLqhGSG7YdEDkL8d1h","slug":"op-mainnet-erc-20-allowance-checker-98a135de","name":"OP Mainnet ERC-20 Allowance Checker","description":"ERC-20 allowance on OP Mainnet: how much a spender may transfer from an owner, whether the approval is effectively unlimited, the owner's balance, and the amount the spender could move right now.","url":"https://onchaincheck.dev/optimism/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":["token","owner","spender"],"properties":{"owner":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"Address that granted the approval"},"token":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"ERC-20 contract on OP Mainnet"},"spender":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"Address allowed to spend"}},"additionalProperties":false}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"raw":"60000000","chain":"optimism","owner":"0x9B1e7350517c2C94a990e55aC6c20De37675c703","token":"0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85","symbol":"USDC","spender":"0xFb4e4811C7A811E098A556bD79B64c20b479E431","allowance":"60","unlimited":false,"ownerBalance":"66.148476","spendableNow":"60"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","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.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_gB6HlY6AIqNvpM_iUfpAt","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns the ERC-20 allowance on OP Mainnet: how much a spender may transfer from an owner, whether it is unlimited, the owner's current balance, and the immediately spendable amount.","exampleAgentPrompt":"Check the USDC allowance on OP Mainnet for owner 0x9B1e7350517c2C94a990e55aC6c20De37675c703 and spender 0xFb4e4811C7A811E098A556bD79B64c20b479E431 — I want to know if the approval is unlimited, what the owner's balance is, and how much the spender can actually move right now.","exampleUseCases":[{"title":"Audit DeFi protocol spending limits","prompt":"I want to audit how much approval I've given to the Uniswap router on Optimism for my USDC — the token is 0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85, my wallet is 0x9B1e7350517c2C94a990e55aC6c20De37675c703, and the spender is 0xFb4e4811C7A811E098A556bD79B64c20b479E431. Tell me if it's unlimited and how much they could move right now."},{"title":"Check if approval is still active","prompt":"Has the approval I set for that lending protocol on OP Mainnet expired or been consumed? The token is 0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85, the owner is 0x9B1e7350517c2C94a990e55aC6c20De37675c703, and the spender is 0xFb4e4811C7A811E098A556bD79B64c20b479E431 — show me the remaining allowance and how much of my balance the spender can actually access."},{"title":"Verify safe withdrawal amount before swap","prompt":"Before I trigger a swap on Optimism, confirm that the spender 0xFb4e4811C7A811E098A556bD79B64c20b479E431 has enough allowance on token 0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85 from owner 0x9B1e7350517c2C94a990e55aC6c20De37675c703 to cover the transaction — what's the spendable amount right now?"}],"resultDescription":"Returns a JSON object containing the raw allowance value, human-readable allowance (e.g. '60'), whether the approval is effectively unlimited, the owner's current token balance, the amount the spender can move right now (min of allowance and balance), the token symbol, and the chain identifier ('optimism').","failureModes":["Invalid Ethereum address format for token, owner, or spender returns a validation error","Token address does not correspond to a valid ERC-20 contract on OP Mainnet may return zero or an error","RPC or node connectivity issues may cause timeouts or 5xx errors","Querying a non-existent approval returns allowance of 0 and spendableNow of 0"],"whenToPreferThis":"Choose this endpoint when you specifically need ERC-20 allowance data on OP Mainnet (Optimism L2) — especially when you need the combined view of allowance, unlimited flag, owner balance, and immediately spendable amount in a single call. Prefer it over generic RPC calls when you want a human-readable, pre-processed answer without writing contract ABI logic. Use the Base equivalent for Base chain queries.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-29T12:34:31.292Z","isFirstParty":false,"canonicalSlug":"op-mainnet-erc-20-allowance-checker-98a135de"}