Derive a Solidity storage slot
compute_storage_slotDerive storage slot locations for EVM mappings, nested mappings, arrays, and keccak-based layouts. Compute Solidity slots from keys, base slots, indices, or words.
Instructions
Derive storage slots. kind=mapping: keccak256(pad32(key).pad32(slot)). kind=nested_mapping: applied left to right. kind=array: keccak256(pad32(slot))+index. kind=keccak_words: keccak256 over concatenated 32-byte words, which is what hand-written assembly does when it MSTOREs values and hashes the region. kind=keccak_utf8 / keccak_hex: plain hashing.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | No | Key, for kind=mapping. | |
| keys | No | Keys outermost-first, for kind=nested_mapping. | |
| kind | Yes | ||
| slot | No | Base slot, for mapping/nested_mapping/array. | |
| index | No | Element index, for kind=array. | |
| input | No | String for keccak_utf8, or hex for keccak_hex. | |
| words | No | Values to pad to 32 bytes and hash, for kind=keccak_words. |