# Solidity Mapping Storage Slot Calculator

> Solidity Mapping Storage Slot Calculator is a paid API for AI agents from twin.unykorn.org, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-02).

Computes the EVM storage slot for a Solidity mapping entry given a key, base slot, and key type

## Facts

- Endpoint: POST https://twin.unykorn.org/storage-slot-mapping?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/solidity-mapping-storage-slot-calculator-08d3335c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_VhnsFW7Akx1gnenYJD9N-

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 solidity-mapping-storage-slot-calculator-08d3335c -d '<json body>'
```

Example prompt: Compute the EVM storage slot for the Solidity mapping at base slot 1, where the key is 0xAbCd1234...5678 and the key type is address — I need the slot hash so I can call eth_getStorageAt directly.

## When to prefer this

Use this endpoint when you need to programmatically compute the exact EVM storage slot for a Solidity mapping entry to use with eth_getStorageAt or similar low-level storage reads. Prefer this over manual keccak256 computation when building agents, debuggers, audit tools, or CI pipelines that need reliable, on-demand slot derivation without setting up a local Solidity/ethers.js environment.

## Known failure modes

- Missing or invalid key parameter returns an error response
- Slot index below 0 (minimum 0) causes schema validation failure
- Unsupported or misspelled keyType may produce incorrect slot computation or error
- Network/payment failure returns non-ok response without slot result
- Malformed hex key string may cause computation error

## How this service works

Compute the storage slot of a Solidity mapping entry — Genesis402 / UnyKorn Operator Network

## Output

Returns a JSON object with ok=true, the computed storage slot value (keccak256-derived EVM slot), the computation type identifier, and a payment receipt including transaction hash, amount paid in USD, and a unique receipt ID.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "params": {
   "type": "object",
   "properties": {
    "key": {
     "type": "string"
    },
    "slot": {
     "type": "integer",
     "minimum": 0
    },
    "keyType": {
     "type": "string"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "type": "storage-slot-mapping",
  "receipt": {
   "tx_hash": "0x<64hex>",
   "amount_usd": 0.002,
   "receipt_id": "g402-<16hex>"
  },
  "generated_at": "<iso8601>"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/solidity-mapping-storage-slot-calculator-08d3335c/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from twin.unykorn.org](https://www.zero.xyz/host/twin.unykorn.org/llms.txt)
