# VulnHunt Smart Contract Change Detection API

> VulnHunt Smart Contract Change Detection API is a paid API for AI agents from vulnhunt-agent-api-production.up.railway.app, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-15).

Returns the latest observed state change for a smart contract on a specified chain, including which fields changed, previous and current state, and whether reassessment is required.

## Facts

- Endpoint: GET https://vulnhunt-agent-api-production.up.railway.app/v1/contracts/%7Bchain_id%7D/%7Baddress%7D/change
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/vulnhunt-smart-contract-change-detection-api-29618867
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_izVxZQrpBfizIziElF5X3

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 vulnhunt-smart-contract-change-detection-api-29618867
```

Example prompt: Has the smart contract at 0x1234...abcd on Ethereum (chain ID 1) changed recently? I need to know which fields were modified, what the previous and current state looked like, and whether a security reassessment is needed.

## When to prefer this

Use this endpoint when you need to know specifically whether a smart contract's on-chain state has changed between observations — particularly for proxy upgrade detection, implementation address tracking, or triggering downstream security reassessments. Prefer this over general blockchain explorers when you need structured change-diff data (before/after state) with security-context flags like reassessment_required, rather than raw transaction history.

## Known failure modes

- Contract address not found or not yet observed returns coverage status indicating no data
- Invalid chain_id returns an error
- Malformed contract address returns validation error
- Contract has no recorded changes returns a status indicating no change observed
- Service unavailable returns 5xx error
- Payment not completed (x402) returns 402 Payment Required

## How this service works

Read-only historical smart-contract security intelligence for autonomous agents.

## Output

Returns a JSON object with a 'change' object describing which fields changed (e.g. 'implementation'), the change status ('changed' or otherwise), the timestamp it was observed, the previous and current on-chain state values, and a boolean indicating whether reassessment is required. Also includes a 'coverage' object with the observation status of this contract.

## 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",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   },
   "additionalProperties": true
  }
 },
 "additionalProperties": false
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "change": {
   "fields": [
    "implementation"
   ],
   "status": "changed",
   "observed_at": "2026-01-01T00:00:00Z",
   "current_state": {
    "implementation": "0x0000000000000000000000000000000000000001"
   },
   "previous_state": {
    "implementation": "0x0000000000000000000000000000000000000000"
   },
   "reassessment_required": true
  },
  "coverage": {
   "status": "observed"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/vulnhunt-smart-contract-change-detection-api-29618867/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from vulnhunt-agent-api-production.up.railway.app](https://www.zero.xyz/host/vulnhunt-agent-api-production.up.railway.app/llms.txt)
