# Base Contract ABI Fetcher with Proxy Detection

> Base Contract ABI Fetcher with Proxy Detection is a paid API for AI agents from defi-shield-hazel.vercel.app, paid per call via x402, $0.1/call, status unknown (last checked 2026-09-14).

Fetches the verified ABI for a smart contract address on the Base blockchain, with automatic proxy contract detection and resolution

## Facts

- Endpoint: POST https://defi-shield-hazel.vercel.app/api/data/contract-abi
- Price: $0.1/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/defi-shield-hazel-vercel-app-074bb2be
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_HGsgDsrPb1kx-12e_BxfD

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 defi-shield-hazel-vercel-app-074bb2be -d '<json body>'
```

Example prompt: Can you fetch the verified ABI for the contract at 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 on Base, and make sure you resolve the actual implementation if it's a proxy?

## When to prefer this

Use this endpoint when you need to interact programmatically with a Base smart contract and require its ABI, especially when the contract may be a proxy (EIP-1967, transparent, UUPS) and you need the real implementation ABI rather than the proxy's minimal interface. Prefer over raw Etherscan API calls when proxy detection and resolution is needed automatically.

## Known failure modes

- Contract address not verified on Base — unverified contracts have no ABI available
- Invalid or malformed contract address — returns error
- Contract is a proxy but implementation is unverified — partial or no ABI returned
- Network errors reaching Base RPC or Etherscan-compatible API
- Rate limit or payment failure for the $0.1 USDC per-call fee

## Output

Returns the verified ABI (as a JSON array of function/event definitions) for the given Base contract address, with proxy detection — if the contract is a proxy, the ABI returned is for the underlying implementation contract, not just the proxy shell.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "bodyType",
    "body",
    "method"
   ],
   "properties": {
    "body": {
     "properties": {
      "address": {
       "type": "string",
       "description": "Contract address to fetch ABI (0x + 40 hex chars)"
      }
     }
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "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/defi-shield-hazel-vercel-app-074bb2be/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from defi-shield-hazel.vercel.app](https://www.zero.xyz/host/defi-shield-hazel.vercel.app/llms.txt)
