{"uid":"cap_VhnsFW7Akx1gnenYJD9N-","slug":"solidity-mapping-storage-slot-calculator-08d3335c","name":"Solidity Mapping Storage Slot Calculator","description":"Compute the storage slot of a Solidity mapping entry — Genesis402 / UnyKorn Operator Network","url":"https://twin.unykorn.org/storage-slot-mapping?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"params":{"type":"object","properties":{"key":{"type":"string"},"slot":{"type":"integer","minimum":0},"keyType":{"type":"string"}}}}},"responseSchema":{"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>"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_ZHEu3ZEgHYn2LcV3JqfSm","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes the EVM storage slot for a Solidity mapping entry given a key, base slot, and key type","exampleAgentPrompt":"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.","exampleUseCases":[{"title":"Debug contract storage state directly","prompt":"I'm debugging a Solidity contract and need to read the raw storage value for mapping(address => uint256) at base slot 2, for key 0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe with keyType address — what's the storage slot?"},{"title":"Verify allowance mapping slot for ERC20 audit","prompt":"For a smart contract audit, I need to verify the storage slot of a nested mapping — outer key is 0xABCDEF0123456789 at base slot 5, keyType is uint256. Can you compute that storage slot?"},{"title":"Automate state inspection in CI pipeline","prompt":"Our test pipeline needs to check contract state after each deploy — can you calculate the storage slot for mapping key 0x1234567890abcdef at slot 0, keyType address, so we can call eth_getStorageAt to verify the value?"}],"resultDescription":"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.","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T04:08:16.701Z","isFirstParty":false,"canonicalSlug":"solidity-mapping-storage-slot-calculator-08d3335c"}