-
Notifications
You must be signed in to change notification settings - Fork 2
Adds solution for level 8 "Vault" #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Adding Vault solution
justinleapline
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution! Here are a couple of things I suggest to change.
| Solution: | ||
|
|
||
| ``` | ||
| var password = web3.eth.getStorageAt(instance, index);` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this tutorial is focused around Metamask, I don't think we need to reference other ways. May cause confusion.
| var password = web3.eth.getStorageAt(instance, index);` |
| ``` | ||
| var password = web3.eth.getStorageAt(instance, index);` | ||
| // For Metamask use callback function | ||
| web3.eth.getStorageAt(instance.address, 1, (err,res)=>{password=res}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This may be an easier example.
| web3.eth.getStorageAt(instance.address, 1, (err,res)=>{password=res}); | |
| web3.eth.getStorageAt(contract.address, 1, function(error, result) {password = web3.toAscii(result)}) |
| We'll be able to finally see the key string to unlock the vault! | ||
|
|
||
| > "A very strong secret password :)" | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| To unlock the vault finally, run the following command: | |
| `await contract.unlock(password)` | |
No description provided.