# x402 Bazaar - Base Contract ABI Lookup via Sourcify

> x402 Bazaar - Base Contract ABI Lookup via Sourcify is a paid API for AI agents from api.relai.fi, paid per call via x402, $0.01/call, status down (last checked 2026-10-30).

Checks Sourcify for a Base smart contract's verification status and returns its ABI as function and event name lists with item counts

## Facts

- Endpoint: POST https://api.relai.fi/relay/1782567677091/api/x402/contract-abi?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: down
- Last checked: 2026-10-30
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-bazaar-base-contract-abi-lookup-via-sourcify-bc65f147
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_D17i3HkIuTwguPU6DZqrw

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 x402-bazaar-base-contract-abi-lookup-via-sourcify-bc65f147 -d '<json body>'
```

Example prompt: Can you check if the Base contract at 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 is verified on Sourcify and show me its function and event names?

## When to prefer this

Use this endpoint when you need to quickly inspect a Base (eip155:8453) smart contract's interface without a full ABI JSON — particularly for verification checks, function discovery, or event enumeration. Prefer this over manual Sourcify queries when you need a structured, parsed response with item counts. Best suited for agents performing contract auditing, integration checks, or on-chain interaction planning on Base.

## Known failure modes

- Contract address not found or not verified on Sourcify — returns empty or null ABI
- Invalid or malformed contract address input — returns 400 error
- Contract exists on Base but has never been submitted to Sourcify — returns unverified status
- Payment not provided — returns HTTP 402 with USDC payment requirements on Base (eip155:8453); must pay $0.01 and retry
- Network or upstream Sourcify API unavailability — returns 5xx error

## How this service works

Checks Sourcify for a Base contract's verification status and returns its ABI as function/event name lists + item count (full or partial match). No API key required. Paid via x402: $0.01 in USDC on Base (eip155:8453) to 0x973a31858f4d2125f48c880542da11a2796f12d6. Returns 402 with payment requirements; pay and retry.

## Output

Returns the contract's Sourcify verification status (full or partial match), a list of ABI function names, a list of ABI event names, and the total item count for each category.

## 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"
    },
    "pathParams": {
     "type": "object"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "address"
     ],
     "properties": {
      "address": {
       "type": "string",
       "description": "Contract address"
      }
     }
    }
   },
   "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/x402-bazaar-base-contract-abi-lookup-via-sourcify-bc65f147/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.relai.fi](https://www.zero.xyz/host/api.relai.fi/llms.txt)
