{"uid":"cap_jDjHVHpLRjrMiWCmBPzEg","slug":"onchain-contract-address-function-selector-lookup-68bac74f","name":"Onchain Contract Address & Function Selector Lookup","description":"Contract decoder: pass a verified 0x contract address to get its function ABI, or a 0x-selector (8 hex) to decode which function it is. Send { input }. Agents understand contracts before calling them.","url":"https://x402-services-production.up.railway.app/api/crypto/contract","method":"POST","headers":{},"bodySchema":{"type":"object","required":["input"],"properties":{"input":{"type":"string","description":"A 0x contract address (40 hex) or 0x function selector (8 hex)"}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.003","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.003/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_v02mUWSkR-JEMBxyslWcS","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.003","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Resolves a 0x contract address or 4-byte function selector to on-chain metadata, ABI info, and risk/safety signals","exampleAgentPrompt":"Can you look up the smart contract at 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 and tell me what it is, what functions it exposes, and whether there are any risk flags on it?","exampleUseCases":[{"title":"Decode unknown function selector","prompt":"I'm seeing a transaction with function selector 0xa9059cbb — can you decode what function that maps to and which contracts use it?"},{"title":"Identify unfamiliar contract address","prompt":"Someone sent me a transaction from 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D — what contract is that and what does it do?"},{"title":"Pre-trade contract safety check","prompt":"Before I interact with the contract at 0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45, can you pull up its metadata and flag any known risks or honeypot signals?"}],"resultDescription":"Returns decoded contract or function selector information including contract name, ABI fragments, function signatures, and associated risk or safety signals for the queried address or selector.","failureModes":["Invalid hex input (not a valid 0x address or 4-byte selector) returns an error","Unverified or obscure contract with no indexed ABI may return minimal metadata","Network timeouts from underlying chain RPC nodes","Address not yet indexed by the intelligence backend"],"whenToPreferThis":"Use this endpoint when an agent needs to programmatically resolve an unknown contract address or function selector to human-readable metadata and safety signals, especially as part of a pre-trade safety check or transaction decoding workflow. Prefer this over generic block explorers when you need structured, machine-readable output with integrated risk signals in a single pay-per-call API.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T01:04:02.301Z","isFirstParty":false}