# Base Contract Verification

> Base Contract Verification is a paid API for AI agents from base-agent-preflight.bytoken2023.workers.dev, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-15).

Verifies a Base (EVM) smart contract address and returns risk assessment, flags, and provenance metadata

## Facts

- Endpoint: GET https://base-agent-preflight.bytoken2023.workers.dev/v1/x402/base/contract-verification
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/base-contract-verification-7f62a0bb
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_8umdNv8q4EQgkjyvS5Uk0

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 base-contract-verification-7f62a0bb
```

Example prompt: Before I interact with this contract, can you verify the Base contract at 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 and tell me its risk score and any safety flags?

## When to prefer this

Use this endpoint when an AI agent needs to safety-check a Base (eip155:8453) smart contract address before signing a transaction, approving a token spend, or depositing funds — especially in autonomous DeFi workflows where human review is unavailable. Prefer this over generic blockchain explorers when you need a structured, machine-readable risk score and flag array rather than human-readable HTML.

## Known failure modes

- Invalid or malformed address (not matching ^0x[a-fA-F0-9]{40}$) returns a validation error
- Contract address not found or not deployed on Base returns empty or null result
- Rate limiting or payment failure (402) if USDC micropayment is not attached
- Network timeout if Base node is temporarily unavailable
- EOA (non-contract) address may return low-confidence or empty assessment

## How this service works

Verifies a contract address on Base and returns source verification status, compiler metadata, proxy info, and provenance. Useful for checking whether a contract is verified and how complete that verification is.

## Output

Returns a JSON object with the Base network identifier (eip155:8453), product name, risk_level (e.g. 'low'), numeric risk_score (0–100), an array of flags for any detected issues, plus identity, activity, provenance, and assessment objects providing detailed contract context.

## 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"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "address"
     ],
     "properties": {
      "address": {
       "type": "string",
       "pattern": "^0x[a-fA-F0-9]{40}$",
       "description": "Base contract address to verify."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "network": {
       "type": "string"
      },
      "product": {
       "type": "string"
      },
      "activity": {
       "type": "object"
      },
      "identity": {
       "type": "object"
      },
      "assessment": {
       "type": "object"
      },
      "provenance": {
       "type": "object"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "network": "eip155:8453",
  "product": "base-contract-verification",
  "assessment": {
   "flags": [],
   "risk_level": "low",
   "risk_score": 0
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/base-contract-verification-7f62a0bb/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from base-agent-preflight.bytoken2023.workers.dev](https://www.zero.xyz/host/base-agent-preflight.bytoken2023.workers.dev/llms.txt)
