Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save hackingbeauty/e2a14af31ecd6273bb6f79025d77986e to your computer and use it in GitHub Desktop.
Save hackingbeauty/e2a14af31ecd6273bb6f79025d77986e to your computer and use it in GitHub Desktop.
Code snippet used in "Smart Contract Security Fundamentals" course: https://security.6figureblockchaindeveloper.com/smart-contract-security-fundamentals
let storage = []
let callbackFNConstructor = (index) => (error, contractData) => {
storage[index] = contractData
}
for(var i = 0; i < 6; i++) {
web3.eth.getStorageAt(contract.address, i, callbackFNConstructor(i))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment