# Tereno Contract Change Monitor

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

Detects whether a Base smart contract has changed since Tereno last observed it, flagging proxy upgrades, admin takeovers, bytecode swaps, or newly paused states.

## Facts

- Endpoint: GET https://www.tereno.xyz/api/v1/capabilities/contract.change/invoke
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/tereno-contract-change-monitor-de8f09d6
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_-2k4UqQqO4dI55rQhdc2C

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-change-monitor-de8f09d6
```

Example prompt: Has the Base contract at 0x1234567890abcdef1234567890abcdef12345678 changed since Tereno last checked it — any proxy upgrades, admin changes, or bytecode swaps?

## When to prefer this

Use this endpoint when you need to verify that a specific Base smart contract has not been silently modified since a prior audit or observation — especially for detecting post-audit rug-pull patterns like proxy upgrades, admin takeovers, bytecode swaps, or newly paused contracts. Prefer this over generic block explorers or static analysis tools when you need a diff against a known-good historical baseline rather than a one-time snapshot, and when you want a machine-readable verdict (allow/review/block) suitable for automated decision-making.

## Known failure modes

- Invalid or non-checksummed contract address returns a 400-level error
- Contract address has no deployed code (EOA or undeployed), resulting in an error or empty baseline
- No previous Tereno observation exists — baseline is created on first call, so 'changed' is always false on first invocation
- Stale or expired quote ID causes payment failure
- Network congestion on Base may delay block state resolution
- Payment not included or insufficient USDC causes 402 rejection

## How this service works

Monitor a Base contract and get the diff, not another scan. Every call compares the address against Tereno's previous observation and names what actually moved: a proxy implementation swap, an admin change, new bytecode, a contract that just got paused. Unchanged is an answer too, and every answer carries the block it stops being valid at, so a bot knows when to look again. $0.02 when nobody has watched this address yet, $0.01 once another agent has.

## Output

Returns a boolean 'changed' flag, a list of specific detected changes (e.g. proxy upgrade, admin takeover, bytecode swap, pause), the current contract state snapshot, whether this call created a new baseline, the block number until which the result is valid, and an allow/review/block verdict with pricing and receipt URL.

## 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 compare with its previous Tereno observation."
      }
     },
     "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",
       "required": [
        "changed",
        "baselineCreated",
        "changes",
        "current",
        "validUntilBlock"
       ],
       "properties": {
        "changed": {
         "type": "boolean"
        },
        "changes": {
         "type": "array"
        },
        "current": {
         "type": "object"
        },
        "baselineCreated": {
         "type": "boolean"
        },
        "validUntilBlock": {
         "type": "integer"
        }
       }
      },
      "pricing": {
       "type": "object"
      },
      "verdict": {
       "enum": [
        "allow",
        "review",
        "block"
       ]
      },
      "nextCall": {
       "type": [
        "object",
        "null"
       ]
      },
      "receiptUrl": {
       "type": "string"
      },
      "capabilityId": {
       "const": "contract.change"
      },
      "invocationId": {
       "type": "string"
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/tereno-contract-change-monitor-de8f09d6/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)
