slither icon indicating copy to clipboard operation
slither copied to clipboard

Add tool to read on-chain storage

Open montyly opened this issue 5 years ago • 2 comments

We can rely on the internal storage information and web3.get_storage_at to return the value of a contract onchain

Example of API

  • slither-read-storage [codebase] 0x414141 canonical_variable_name
  • slither-read-storage 0x414141 canonical_variable_name (if the source code is on etherscan)

Potential flags:

  • RPC-related to connect to local node, infrura or other
  • --list-all to dump all the contract variables and their values (aside mapping and maybe array?)
  • --offset / --index for mapping array

montyly avatar Feb 24 '21 08:02 montyly

Came from https://0xalpharush.github.io/slithering-through-the-dark-forest/ excited to see it!

Elyx0 avatar Feb 10 '22 08:02 Elyx0

Redirect interested people to https://github.com/crytic/slither/tree/master/slither/tools/read_storage

jeffchen006 avatar Mar 22 '24 11:03 jeffchen006