# EVM Contract Source & ABI Resolver

> EVM Contract Source & ABI Resolver is a paid API for AI agents from payai.agentstools.dev, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-10).

Fetches verified smart contract source code, ABI, compiler settings, NatSpec docs, and proxy implementation ABI for any EVM contract address across multiple networks

## Facts

- Endpoint: GET https://payai.agentstools.dev/contract/source?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-10
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/evm-contract-source-abi-resolver-608171a3
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Q1X-6eXhcG352lQxmetHt

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-source-abi-resolver-608171a3
```

Example prompt: Can you pull the verified source code, ABI, and NatSpec docs for the contract at 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 on Ethereum — and if it's a proxy, resolve it to the implementation ABI too?

## When to prefer this

Use this endpoint when you need verified source code, the full ABI, or NatSpec documentation for an EVM contract — especially for audit, integration, or security research tasks. It is superior to a raw Etherscan API call because it automatically resolves proxies to their implementation and bundles compiler metadata and NatSpec in one response. Prefer this over a wallet-balance or token-risk endpoint when your goal is understanding contract logic rather than token economics or balances.

## Known failure modes

- Contract address is not verified on the target network — returns an honest 'unverified' status rather than partial data
- Invalid address format (not 0x + 40 hex) — returns a 400-level validation error
- Unsupported network specified — returns an error listing valid networks
- EOA address (not a contract) passed — returns an appropriate error indicating no contract found
- Proxy resolution fails if implementation slot is non-standard — may return base proxy ABI only
- Payment not completed — returns 402 Payment Required

## How this service works

Fetch a verified smart-contract's full source, ABI, compiler settings and NatSpec docs for an EVM address, and automatically resolve a proxy to its implementation so the response also carries the implementation ABI. One call returns everything an audit or integration agent needs to understand the contract, keyless and pay-per-call. Unverified contracts are reported honestly.

## Output

Returns the contract's full verified Solidity source, ABI (including proxy implementation ABI if applicable), compiler version and optimization settings, and NatSpec documentation. If the contract is unverified, an honest error is returned indicating that. One response covers everything needed to audit or integrate with the contract.

## 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-source-abi-resolver-608171a3/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)
