crypto

Decode an EVM smart contract.

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.

get/api/crypto/contract

Request

  • Base URL: https://2s.io
  • URL: https://2s.io/api/crypto/contract
  • Auth: API key in header PAYMENT-SIGNATURE

Query parameters

chain'ethereum' | 'base' | 'polygon' | 'arbitrum' | 'optimism' | 'bsc' | 'avalanche' required

EVM chain: ethereum, base, polygon, arbitrum, optimism, bsc, or avalanche.

addressstring required

0x-prefixed 40-hex contract address.

selectorstring

Optional 0x 4-byte function selector to decode (e.g. 0xa9059cbb).

trial1

Try before you buy. Set to 1 for one free real call per endpoint per hour — no wallet or payment needed — to verify the endpoint before paying. Equivalent to sending the "X-2s-Trial: 1" request header. Listed only on operations that offer a trial; the others always answer 402.

Response

(unresolved $ref)

Changes

No recorded changes to this operation across all 1 revision of this API.