Skip to main content Link Search Menu Expand Document (external link)

Proxies Storage

Note: If you are new to understanding how smart contract storage slots work, review an entry level guide first, like the solidity docs.

Storing state variables is important for any smart contract, but especially so for proxies. Checking the values stored at specific storage slots in a contract is a useful way to check if the proxy is working as expected. Once the storage slot for a variable is known, a tool like seth, cast, or your favorite web3 JS/Python library (ethersJS, etc.) can pull the data at that location directly from the blockchain. These tools can help identify the storage slot of the variables found in the deployed contract.

Storage Slot Analysis for Verified Contracts

Storage Slot Analysis for Unverified Contracts (and Verified Contracts)

  • Contract Library: When viewing a contract, can navigate to the “Read/Write” tab and choose “Storage dump” to see all values stored in all storage slots. Doesn’t require a verified contract. The decompiler is also very helpful.
  • smart-contract-storage-viewer: Useful tool from tintinweb to view what a contract has stored in specific storage slots. This tool is only useful if you already know the storage slot value locations to view or want to view a range of many sequential storage slot values.
  • Etherscan: The “Switch to Opcodes View” button next to the contract creation code and review all the SLOAD operations to identify storage slots that hold (or held) values.