{"uid":"cap_XE94E1dJQv1-D9xjpVCEI","slug":"2s-crypto-contract-lookup-b820a0d3","name":"2s Crypto Contract Lookup","description":"Decode an EVM smart contract. Pass chain (ethereum, base, polygon, arbitrum, optimism, bsc, avalanche) + address; returns whether the contract is source-verified (Sourcify), its name/compiler/language, whether it is a proxy and its implementation address, and human-readable function and event signatures from the ABI. Optionally pass selector (a 0x 4-byte function selector) to decode what it calls — resolved from the contract's own ABI when verified, otherwise from the public 4byte directory. Pairs with crypto.tx (which gives a `to` address + calldata): turn an opaque contract + selector into \"what is this and what does it do.\" Free, keyless.","url":"https://2s.io/api/crypto/contract","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","queryParams"],"properties":{"type":{"const":"http"},"method":{"const":"GET"},"queryParams":{"required":["chain","address"],"properties":{"chain":{"type":"string","description":"EVM chain (ethereum, base, polygon, …)."},"address":{"type":"string","description":"0x contract address."},"selector":{"type":"string","description":"Optional 0x 4-byte function selector to decode."}}}}}}},"responseSchema":null,"example":{"request":{"input":{"type":"http","method":"GET","queryParams":{"chain":"ethereum","address":"0xdAC17F958D2ee523a2206206994597C13D831ec7","selector":"0xa9059cbb"}}},"response":{"data":{"ok":true,"meta":{"verified":true},"items":[{"name":"TetherToken","chain":"ethereum","events":["AddedBlackList(address)","Approval(address,address,uint256)","Deprecate(address)","DestroyedBlackFunds(address,uint256)","Issue(uint256)","Params(uint256,uint256)","Pause()","Redeem(uint256)","RemovedBlackList(address)","Transfer(address,address,uint256)","Unpause()"],"address":"0xdAC17F958D2ee523a2206206994597C13D831ec7","decoded":{"source":"abi","selector":"0xa9059cbb","signature":"transfer(address,uint256)"},"isProxy":false,"compiler":"0.4.18+commit.9cf6e910","language":"Solidity","verified":true,"functions":["MAX_UINT()","_totalSupply()","addBlackList(address)","allowance(address,address)","allowed(address,address)","approve(address,uint256)","balanceOf(address)","balances(address)","basisPointsRate()","decimals()","deprecate(address)","deprecated()","destroyBlackFunds(address)","getBlackListStatus(address)","getOwner()","isBlackListed(address)","issue(uint256)","maximumFee()","name()","owner()","pause()","paused()","redeem(uint256)","removeBlackList(address)","setParams(uint256,uint256)","symbol()","totalSupply()","transfer(address,uint256)","transferFrom(address,address,uint256)","transferOwnership(address)","unpause()","upgradedAddress()"],"functionCount":32,"implementation":null}],"total":1,"source":{"url":"https://sourcify.dev","license":"Sourcify contract metadata (MIT-spirit, public); 4byte.directory public signature database. Live-wrapped.","provider":"Sourcify + 4byte.directory"}},"meta":{"cost":{"usd":0.0018,"tier":0},"caller":"x402","version":null,"endpoint":"crypto.contract","settlement":{"txHash":"0x797d8b7ec27fc8cce1c29d57532906ca7ad8ccadad815169e0f68149abe60c77","network":"eip155:8453","success":true}}}},"exampleRequest":{"chain":"ethereum","address":"0xdAC17F958D2ee523a2206206994597C13D831ec7","selector":"0xa9059cbb"},"tags":["x402"],"displayCostAmount":"0.0018","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","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.0018/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0045","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0045","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_Bt9PvYr88h70uSs3d-itk","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.0045","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Looks up EVM smart contract metadata including ABI, functions, events, verification status, and optional function selector decoding for a given chain and address.","exampleAgentPrompt":"Can you look up the smart contract at 0xdAC17F958D2ee523a2206206994597C13D831ec7 on Ethereum and tell me its name, whether it's verified, what functions it exposes, and decode the selector 0xa9059cbb?","exampleUseCases":null,"resultDescription":"Returns a JSON object with contract name, chain, list of ABI functions and events, verification status, compiler version, language (e.g. Solidity), proxy flag, implementation address (if proxy), decoded function signature for an optional selector, and the data source (Sourcify / 4byte.directory). Also includes a top-level verified flag and source metadata.","failureModes":["Contract address not found on the specified chain — returns empty items array","Invalid or unsupported chain name — may return error or empty result","Malformed 0x address — likely returns validation error","Unrecognized function selector — decoded field will be absent or null","Contract exists but is unverified — verified flag returns false, ABI may be incomplete","Network or upstream Sourcify/4byte.directory outage — may return error or degraded response"],"whenToPreferThis":"Use this endpoint when you need ground-truth EVM smart contract metadata (ABI, function list, events, verification, proxy info) for any Ethereum-compatible chain without needing an API key or subscription. Especially useful for decoding raw 4-byte selectors to human-readable signatures. Prefer over Etherscan API when you want no-signup pay-per-call access or when querying non-Ethereum chains like Base or Polygon.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T13:10:06.983Z","isFirstParty":false}