{"uid":"cap_EPyVNygFxUMmpNO39_jpW","slug":"base-contract-abi-reverse-engineer-interface-detector-ebec73ec","name":"Base Contract ABI Reverse-Engineer & Interface Detector","description":"Self-computed Base onchain toolkit for AI agents: ERC-20 safety scan, manipulation-resistant TWAP price oracle, gas/fee oracle, calldata decoder, token/address/contract intel, wallet approval-risk audit, and batch token triage — all computed live from raw Base chain, no third-party data.","url":"https://x402-data-api.bodhinindustries.workers.dev/abi","method":"GET","headers":{},"bodySchema":{"type":"object","required":["address"],"properties":{"address":{"type":"string","description":"Base contract to reverse-engineer (alias: contract)."},"resolve":{"type":"string","description":"Resolve selectors to names via 4byte: 'true' (default) or 'false'."},"followProxy":{"type":"string","description":"Also merge the implementation's selectors if the target is a proxy: 'true' or 'false' (default)."}}},"responseSchema":{"type":"object","properties":{"block":{"type":"integer","description":"Base block height"},"address":{"type":"string","description":"contract"},"functions":{"type":"array","items":{"type":"object","properties":{"resolved":{"type":"boolean","description":"resolved via 4byte"},"selector":{"type":"string","description":"4-byte selector"},"signatures":{"type":"array","items":{"type":"string"}},"primarySignature":{"type":"string","description":"canonical signature (or null)"}}}},"computedAt":{"type":"string","description":"ISO-8601 timestamp"},"isContract":{"type":"boolean","description":"has bytecode"},"selectorCount":{"type":"integer","description":"unique selectors recovered"},"interfaceGuess":{"type":"array","items":{"type":"string"},"description":"e.g. erc20, erc721, erc4626"},"thirdPartyDataUsed":{"type":"boolean","description":"true when resolve!=false"}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","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.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_Pur0L0S9_KAJw386YQUIM","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Recovers 4-byte function selectors from a Base contract's bytecode and resolves them to human-readable signatures, guessing the implemented ERC interface (ERC-20, ERC-721, ERC-4626, etc.)","exampleAgentPrompt":"Can you reverse-engineer the ABI of this Base contract at 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 — resolve the selectors to real function names and tell me what ERC interface it looks like it implements? Also follow the proxy if there is one.","exampleUseCases":[{"title":"Identify unknown token contract standard","prompt":"I found this contract at 0x4ed4E862860beD51a9570b96d89aF5E1B0Efefed on Base and I have no idea if it's an ERC-20, ERC-721, or something else entirely. Can you inspect its bytecode, resolve the function selectors to human-readable signatures, and tell me what ERC interface it most likely implements?"},{"title":"Audit unverified proxy contract functions","prompt":"This Base contract at 0x2626664c2603336E57B271c5C0b26F421741e481 isn't verified on Etherscan and I need to know what functions it exposes before I interact with it. Can you pull the selectors straight from the bytecode and resolve them to real function names so I can understand what I'm dealing with?"},{"title":"Compare two contracts' interfaces","prompt":"I'm trying to figure out if these two Base contracts at 0x50c5725949A6F0c72E6C4a641F24049A917DB0Cb and 0x27D2DECb4bFC9C76F0309b8E88dec3a601Fe25a8 implement the same interface. Can you decode the function selectors from both their bytecodes and tell me whether they match the same ERC standard?"}],"resultDescription":"Returns a list of recovered 4-byte function selectors with resolved human-readable signatures (via 4byte.directory), a best-guess ERC interface label (e.g. erc20, erc721, erc4626), total selector count, a boolean indicating whether the address has contract bytecode, the Base block height at computation time, and an ISO-8601 timestamp. Includes a flag indicating whether any third-party data (4byte resolution) was used.","failureModes":["Address is an EOA (wallet), not a contract — isContract returns false, no selectors","Invalid or malformed address string — likely 400-level error","Contract has no recoverable selectors (e.g. minimal proxy with no public functions)","4byte resolution unavailable or returns no matches — resolved flag is false for those selectors","Payment not included or insufficient — 402 Payment Required"],"whenToPreferThis":"Use this endpoint when you need to inspect an unverified or unknown Base contract's callable functions without access to a verified ABI. Ideal for auditing proxy contracts, identifying ERC token standards from bytecode alone, or reverse-engineering contract interfaces without relying on Etherscan or other third-party indexers. Prefer this over Etherscan ABI lookups when the contract is unverified or when you want trustless, on-chain-derived data.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T12:52:02.910Z","isFirstParty":false}