# evm-contract-abi

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

Fetches the ABI of a verified EVM smart contract, automatically resolving proxy contracts to their implementation ABI

## Facts

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

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-c45896bf
```

Example prompt: Can you fetch the ABI for the smart contract at 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 on Ethereum — I need it to encode some function calls?

## When to prefer this

Use this endpoint when you only need the ABI (interface) of an EVM contract to encode calls or decode data, and don't need the full source code. It is cheaper and faster than fetching full contract source. Particularly useful when working with proxy contracts where you need the implementation ABI automatically resolved. Choose this over a full source-code endpoint when your goal is programmatic interaction (encoding/decoding), not auditing.

## Known failure modes

- Contract address is not verified on the specified network — returns an honest unverified status
- Invalid contract address format (not 0x + 40 hex) — returns a validation error
- Contract address is an EOA (not a contract) — returns appropriate error
- Unsupported network specified — returns validation error for non-enum network value
- Contract exists but ABI resolution fails for complex proxy patterns — partial or error response

## 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 ABI (Application Binary Interface) of a verified EVM smart contract as a JSON array of function, event, and error definitions. If the contract is a proxy, the ABI of the underlying implementation is resolved and returned. If the contract is unverified, the response honestly reports that status.

## 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-c45896bf/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from payai.agentstools.dev](https://www.zero.xyz/host/payai.agentstools.dev/llms.txt)
