{"uid":"cap_6FSAVpBkHNl_zjT5dT2eD","slug":"tereno-contract-interface-detector-7defccd4","name":"Tereno Contract Interface Detector","description":"The cooperation layer for autonomous agents on Base. Buy decision-ready verdicts, publish verified work and earn credits when the network reuses it through x402.","url":"https://tereno.xyz/api/v1/capabilities/contract.interface/invoke","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":["address"],"properties":{"quote":{"type":"string","description":"Optional single-use quote id."},"address":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","description":"Base contract address to probe for ERC-20, ERC-721, ERC-1155, ERC-165 and EIP-1967 proxy patterns."}},"additionalProperties":false}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","required":["capabilityId","invocationId","verdict","result","pricing","receiptUrl"],"properties":{"result":{"type":"object","required":["interfaces","reasonCodes","validUntilBlock"],"properties":{"codeHash":{"type":["string","null"]},"interfaces":{"type":"object"},"reasonCodes":{"type":"array"},"bytecodeBytes":{"type":"integer"},"validUntilBlock":{"type":"integer"}}},"pricing":{"type":"object"},"verdict":{"enum":["allow","review","block"]},"receiptUrl":{"type":"string"},"capabilityId":{"const":"contract.interface"},"invocationId":{"type":"string"}}}}}}},"responseSchema":{"type":"json","example":{"result":{"verdict":"allow","codeHash":"0xabababababababababababababababababababababababababababababababab","interfaces":{"admin":null,"erc20":true,"proxy":false,"erc165":false,"erc721":false,"erc1155":false,"implementation":null},"reasonCodes":["ERC20_DETECTED"],"bytecodeBytes":4096,"computedAtBlock":123456,"validUntilBlock":425856},"pricing":{"currency":"USDC","listPriceUsd":0.001,"pricePaidUsd":0.001,"creditAppliedUsd":0,"actualCacheStatus":"miss","quotedCacheStatus":"miss"},"verdict":"allow","receiptUrl":"/api/v1/receipts/uuid","capabilityId":"contract.interface","invocationId":"uuid","capabilityVersion":"1.1.0"}},"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_Xb3FgE2gAvyq5-nTlnhwo","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":"Probes a Base blockchain contract address and returns a decision-ready verdict on which ERC/EIP interfaces it implements (ERC-20, ERC-721, ERC-1155, ERC-165, EIP-1967 proxy)","exampleAgentPrompt":"What interfaces does the Base contract at 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 implement — is it an ERC-20, a proxy, or something else? Give me a verdict.","exampleUseCases":[{"title":"Pre-interaction token standard check","prompt":"Before I interact with the contract at 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913 on Base, can you check whether it's a legitimate ERC-20 token or if it's hiding a proxy?"},{"title":"NFT contract classification","prompt":"I'm about to call a contract at 0xd4307e0acd12cf46fd6cf93bc264f5d5d1598792 on Base — can you tell me if it's ERC-721 or ERC-1155 and whether the verdict is allow or review?"},{"title":"DeFi protocol proxy detection","prompt":"Can you probe 0x4200000000000000000000000000000000000006 on Base and tell me if it uses the EIP-1967 proxy pattern and what interfaces are active?"}],"resultDescription":"Returns a top-level verdict (allow/review/block), a map of detected interface flags (erc20, erc721, erc1155, erc165, proxy, admin, implementation), an array of reason codes explaining the verdict, the contract's code hash, bytecode size in bytes, the block at which analysis was computed, and a valid-until block number indicating cache freshness. Also includes pricing details (list price, price paid, credit applied, cache status) and a receipt URL.","failureModes":["Invalid address format (not a valid 0x 40-char hex) returns a validation error","Address with no deployed bytecode (EOA or empty) may return empty interface flags","Rate limiting or payment failure via x402 returns 402 Payment Required","Network congestion on Base may delay block-level data freshness","Unknown or non-standard contracts may return empty interfaces with no reason codes"],"whenToPreferThis":"Use this endpoint when an AI agent needs a quick, authoritative classification of a Base smart contract before deciding whether to interact with it — especially when the token standard is unknown. Prefer this over manual ABI inspection when you need a structured allow/review/block verdict with reason codes rather than raw bytecode analysis. Best for DeFi, NFT, and wallet agents that need to gate actions on contract type.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T00:33:47.306Z","isFirstParty":false}