# Tereno Contract Guard

> Tereno Contract Guard is a paid API for AI agents from www.tereno.xyz, paid per call via x402, $0.1/call, status unknown (last checked 2026-09-14).

Returns an allow, review, or block verdict for a Base smart contract by running bounded code, proxy, and pause safety checks with evidence and freshness metadata.

## Facts

- Endpoint: GET https://www.tereno.xyz/api/v1/capabilities/contract.guard/invoke
- 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/tereno-contract-guard-5ceadaf5
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_oerSNcV9kLoU8_Roa-cKu

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 tereno-contract-guard-5ceadaf5
```

Example prompt: Before I interact with this contract at 0xAbC123...def (Base), can you run a safety preflight check and tell me if it's safe — my wallet is 0x1aB2...3cD4?

## When to prefer this

Choose this endpoint when you need a fast, structured safety verdict on a specific Base network smart contract before initiating any transaction or approval — particularly when you need evidence-backed allow/review/block classification and block freshness, rather than generic on-chain analytics or audit reports.

## Known failure modes

- Invalid or malformed contract address (not a valid 0x hex address) returns an error
- Wallet address doesn't match verified x402 payer, causing payment/auth rejection
- Contract address not found or not deployed on Base returns a not-found error
- Stale or missing block data may reduce freshness confidence
- Payment not processed or invalid quote ID results in 402 payment required error

## How this service works

Is this Base contract safe to interact with? Detect whether an address has no code, is an upgradeable proxy, or is currently paused, and get a bounded allow, review or block trust verdict with evidence and block freshness before you call it. Positive-sum by design: $0.03 when nobody has checked this contract yet, $0.02 on a shared bytecode fingerprint, $0.01 once another agent has computed the full answer — and the wallet that computed it first earns a share of every reuse.

## Output

A verdict of allow, review, or block for the given Base contract address, along with supporting evidence (e.g. bounded code flags, proxy detection, pause mechanism findings) and block freshness indicating how recent the analysis is.

## 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": {
      "quote": {
       "type": "string",
       "description": "Optional single-use quote id."
      },
      "address": {
       "type": "string",
       "pattern": "^0x[a-fA-F0-9]{40}$",
       "description": "Base contract address to preflight."
      }
     },
     "additionalProperties": false
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "capabilityId",
      "invocationId",
      "verdict",
      "result",
      "pricing",
      "receiptUrl"
     ],
     "properties": {
      "result": {
       "type": "object"
      },
      "pricing": {
       "type": "object"
      },
      "verdict": {
       "enum": [
        "allow",
        "review",
        "block"
       ]
      },
      "nextCall": {
       "type": [
        "object",
        "null"
       ]
      },
      "receiptUrl": {
       "type": "string"
      },
      "capabilityId": {
       "const": "contract.guard"
      },
      "invocationId": {
       "type": "string"
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/tereno-contract-guard-5ceadaf5/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from www.tereno.xyz](https://www.zero.xyz/host/www.tereno.xyz/llms.txt)
