# Storage Layout Compatibility Analyzer

> Storage Layout Compatibility Analyzer is a paid API for AI agents from forensik.halowerk.com, paid per call via x402, $0.001/call, status unknown (last checked 2026-12-01).

Analyzes caller-supplied evidence metrics to classify smart contract storage layout compatibility risk, returning a confidence score, risk score, and threshold-based classification.

## Facts

- Endpoint: POST https://forensik.halowerk.com/v1/storage-layout-compatibility?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-12-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/storage-layout-compatibility-analyzer-0e8e17ad
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_VI0cmLcASciKz5RvgJile

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 storage-layout-compatibility-analyzer-0e8e17ad -d '<json body>'
```

Example prompt: Can you assess the storage layout compatibility risk for the contract upgrade at address 0xABC123 — I'm seeing 2 slot collisions, 1 type mismatch, and no unsafe gap changes as of 2025-06-01T12:00:00Z?

## When to prefer this

Use this endpoint when you need a fast, deterministic, threshold-based risk classification of smart contract storage layout compatibility from your own pre-collected metrics — specifically when you already have slot_collision_count, type_mismatch_count, or unsafe_gap_change data and want an auditable score with explicit threshold disclosure. Prefer this over a full on-chain audit service when you want to analyze only your own evidence without external chain queries, or when you need a lightweight, low-cost ($0.001) signal for automated upgrade pipelines.

## Known failure modes

- Insufficient evidence items (minItems:1 violated) returns a validation error
- strict:true with missing documented metrics returns a rejection
- Invalid metric enum values return a schema validation error
- Evidence timestamps in wrong format return an ISO-8601 parse error
- Exceeding 50 evidence items or 20 context properties returns a payload size error
- Payment not included or insufficient USDC causes x402 payment required response

## How this service works

Storage Layout Compatibility analyses only the evidence supplied by the caller. It does not claim to query a chain, identify a legal status or replace an independent audit. Missing signals lower confidence and are listed explicitly; every classification includes the exact thresholds used.

## Output

Returns a JSON object containing: a risk_score (numeric), confidence percentage, low/medium/high classification, a recommendation text explaining which thresholds were or were not crossed, the scope (caller_supplied_evidence_only), the subject echoed back, and a generated_at timestamp. Missing metrics are explicitly listed and lower the confidence score.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "strict": {
   "type": "boolean",
   "default": false,
   "description": "Reject unless all documented metrics are supplied."
  },
  "context": {
   "type": "object",
   "description": "Optional non-secret labels returned unchanged for correlation.",
   "maxProperties": 20,
   "additionalProperties": {
    "type": [
     "string",
     "number",
     "boolean",
     "null"
    ]
   }
  },
  "subject": {
   "type": "string",
   "maxLength": 256,
   "minLength": 1,
   "description": "Address, transaction, protocol, asset, proposal or other subject being assessed."
  },
  "evidence": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "metric",
     "value"
    ],
    "properties": {
     "note": {
      "type": "string",
      "maxLength": 500
     },
     "value": {
      "type": [
       "number",
       "boolean"
      ]
     },
     "metric": {
      "enum": [
       "slot_collision_count",
       "type_mismatch_count",
       "unsafe_gap_change"
      ],
      "type": "string"
     },
     "source": {
      "type": "string",
      "maxLength": 300,
      "minLength": 1,
      "description": "Evidence source or query identifier."
     },
     "timestamp": {
      "type": "string",
      "maxLength": 40,
      "minLength": 10,
      "description": "ISO-8601 observation time."
     }
    },
    "additionalProperties": false
   },
   "maxItems": 50,
   "minItems": 1,
   "description": "Caller-supplied observations. Repeated metrics form a time series; the newest timestamp is assessed."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "scope": "caller_supplied_evidence_only",
  "engine": "verify",
  "service": "Storage Layout Compatibility",
  "subject": "storage-layout-compatibility-sample",
  "confidence": 100,
  "risk_score": 13,
  "generated_at": "2026-10-23T00:07:35.806Z",
  "classification": "low",
  "recommendation": "No supplied metric crossed a warning thr",
  "service_number": 98
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/storage-layout-compatibility-analyzer-0e8e17ad/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from forensik.halowerk.com](https://www.zero.xyz/host/forensik.halowerk.com/llms.txt)
