# Smart Contract ABI Lookup via Sourcify

> Smart Contract ABI Lookup via Sourcify is a paid API for AI agents from api.x-402.online, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-01).

Returns the verified ABI of a smart contract on any EVM-compatible chain from Sourcify, including function signatures, event names, contract name, compiler version, proxy details, and the full ABI JSON.

## Facts

- Endpoint: GET https://api.x-402.online/v1/chain/abi?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/smart-contract-abi-lookup-via-sourcify-6d254100
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_ohy6Cy4IKT-UaMwBC2oMe

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 smart-contract-abi-lookup-via-sourcify-6d254100
```

Example prompt: Can you fetch the verified ABI for the smart contract at 0x8335aced2a0a332e0c3fe6f8d843d1f3fe4d2a11 on Base (chain ID 8453)? I need the function signatures and event names so I can interact with it.

## When to prefer this

Choose this endpoint when you need human-readable, verified ABI data for a smart contract on any EVM chain and want it sourced from Sourcify's verification registry. It is ideal when you need function signatures, event names, or proxy resolution without needing to compile source code yourself. Prefer this over raw on-chain bytecode scraping or Etherscan APIs when Sourcify verification coverage is sufficient and you want a pay-per-call model with no API key management.

## Known failure modes

- Contract not verified on Sourcify — returns an error indicating no verified source is available for that address/chain combination
- Invalid or malformed contract address — returns a validation error
- Unsupported chain ID — returns an error if the chain is not indexed
- Network timeout fetching data from Sourcify — returns a gateway or timeout error
- Contract exists on-chain but has no Sourcify verification — returns not-found response

## How this service works

The verified ABI of a smart contract on any EVM chain from Sourcify: function signatures, event names, contract name, compiler version and proxy implementations, plus the full ABI JSON ready for a client. Query: ?address=0x8335…&chain_id=8453

## Output

Returns a structured response containing the contract's full ABI JSON (array of function and event descriptors), individual function signatures, event names, the contract name, compiler version used, and proxy implementation details if applicable — sourced from Sourcify's verified contract registry.

## 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"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "properties": {}
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/smart-contract-abi-lookup-via-sourcify-6d254100/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.x-402.online](https://www.zero.xyz/host/api.x-402.online/llms.txt)
