Skip to content

Instantly share code, notes, and snippets.

@saurfang
Created April 14, 2018 22:48
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save saurfang/529dbd46ac8729c679550abb669351c8 to your computer and use it in GitHub Desktop.
Save saurfang/529dbd46ac8729c679550abb669351c8 to your computer and use it in GitHub Desktop.
// address of deployed contract
var contractAddress = '0xDd56dCD052548Ac005563f42d13B4D502deCd379';
// get storage at slot 0
var storageAt0;
web3.eth.getStorageAt(contractAddress, 0, (err, res) => {
// convert to uint
console.log(`0: uint8: ${web3.toDecimal(res)}`);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment