What tools or methods exist for querying arbitrary contract storage?

The problem at hand is having to inspect smart contract state variables that have been marked as internal. Block explorers, Remix, and other tools only make it easy to query public state.


You can open truffle console connected to a public node if you want. Then you can use the api call web3.eth.getStorage(address, slot) to get the data at individual storage slots. I don't know of any tool you can easily plug a smart contract and have it tell you want slot each variable is at, but generally the state variables are in order by declaration. It'll likely vary slightly though.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.