# evm-contract-abi

> evm-contract-abi is a paid API for AI agents from api.agentstools.dev, paid per call via x402, $0.008/call, status unknown (last checked 2026-09-13).

Fetch the ABI of a verified EVM contract (resolving proxy to implementation) for encoding calls or decoding data

## Facts

- Endpoint: GET https://api.agentstools.dev/contract/abi
- Price: $0.008/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/evm-contract-abi-5a499294
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Fmle72ueqYfw6h_xkYWzx

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 evm-contract-abi-5a499294
```

Example prompt: Can you fetch the ABI for the contract at 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 on Ethereum so I can encode a call to its transfer function?

## When to prefer this

Use this endpoint when you only need a contract's ABI (interface) and don't need full source code, compiler metadata, or bytecode. It's cheaper and faster than fetching the full contract source. Ideal for agents that need to encode function calls or decode returned data on-the-fly. Particularly valuable when working with proxy contracts, as it automatically resolves to the implementation ABI. Prefer this over generic block explorer scraping when you need a structured, machine-ready ABI JSON.

## Known failure modes

- Contract address not found on specified network — returns error indicating no contract at that address
- Contract exists but is unverified — returns honest unverified status, no ABI
- Invalid address format (not 0x + 40 hex) — returns validation error
- Unsupported network specified — returns error listing supported networks
- Proxy resolution fails if implementation address is dynamic or non-standard
- Network RPC timeouts may cause intermittent errors

## How this service works

Fetch just the ABI of a verified EVM contract, resolving a proxy to its implementation ABI as well. A cheap slice for when you only need the interface to encode calls or decode data, not the full source. Unverified contracts are reported honestly.

## Output

Returns the contract ABI as a JSON array of function, event, and error descriptors. If the contract is a proxy, the ABI is resolved to the implementation contract's interface. If the contract is unverified, the response honestly reports that status rather than returning a partial or incorrect ABI.

## 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",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "address"
     ],
     "properties": {
      "address": {
       "type": "string",
       "description": "Contract address, 0x + 40 hex"
      },
      "network": {
       "enum": [
        "base",
        "ethereum",
        "arbitrum",
        "optimism",
        "polygon",
        "bnb"
       ],
       "type": "string",
       "description": "EVM network (default base)"
      }
     }
    }
   },
   "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/evm-contract-abi-5a499294/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.agentstools.dev](https://www.zero.xyz/host/api.agentstools.dev/llms.txt)
