Storage

Storage & deploys

storage slot calculator

Calculate Solidity storage slots for mappings (including nested), dynamic arrays, ERC-7201 namespaced storage and EIP-1967 proxy slots. Read them with cast storage or vm.load.

runs in your browser
value slot
0x64472529e030f133702bf0bda31587893597ab47a57a340ef897dd07f5621ded
read it with cast
cast storage <contract> 0x64472529e030f133702bf0bda31587893597ab47a57a340ef897dd07f5621ded --rpc-url $RPC_URL
read it in a foundry test
vm.load(address(target), bytes32(0x64472529e030f133702bf0bda31587893597ab47a57a340ef897dd07f5621ded))

good to know

how is a mapping's storage slot computed?

value slot = keccak256(abi.encode(key, slot)) for value-type keys, or keccak256(bytes(key) ++ slot) for string and bytes keys. nested mappings repeat it with the previous result as the slot.

what is erc-7201?

namespaced storage: a struct lives at keccak256(abi.encode(uint256(keccak256(id)) - 1)) & ~0xff so upgradeable contracts and their parents never collide. openzeppelin 5 uses it everywhere.

how do i find a proxy's implementation?

read the eip-1967 implementation slot 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc on the proxy. the last 20 bytes are the implementation address.