Skip to content

Instantly share code, notes, and snippets.

@voith
Last active August 24, 2023 12:55
Show Gist options
  • Save voith/0b76dd0f08616340d0667eed786a5fd5 to your computer and use it in GitHub Desktop.
Save voith/0b76dd0f08616340d0667eed786a5fd5 to your computer and use it in GitHub Desktop.
Snippet for reading private variables using foundry
function testReadPrivateVars() external {
for(uint i=0; i < 100; i++){
console.logBytes32(vm.load(address, bytes32(i)));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment