# 2s Crypto Contract Lookup

> 2s Crypto Contract Lookup is a paid API for AI agents from 2s.io, paid per call via x402, $0.0018/call, status unknown (last checked 2026-09-15).

Looks up EVM smart contract metadata including ABI, functions, events, verification status, and optional function selector decoding for a given chain and address.

## Facts

- Endpoint: GET https://2s.io/api/crypto/contract
- Price: $0.0018/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/2s-crypto-contract-lookup-b820a0d3
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_XE94E1dJQv1-D9xjpVCEI

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability 2s-crypto-contract-lookup-b820a0d3
```

Example prompt: 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?

## When to prefer this

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.

## Known failure modes

- 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

## How this service works

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.

## Output

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.

## Example request

```json
{
 "input": {
  "type": "http",
  "method": "GET",
  "queryParams": {
   "chain": "ethereum",
   "address": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
   "selector": "0xa9059cbb"
  }
 }
}
```

## Request schema (JSON Schema)

```json
{
 "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."
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/2s-crypto-contract-lookup-b820a0d3/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from 2s.io](https://www.zero.xyz/host/2s.io/llms.txt)
