Hello Solidity Expert,
I am working on Ethernaut challenge 8 called Vault: Ethernaut See the contract code at the end of this post.
I feel I solved the challenge but for some reason I cannot open the vault.
Here are the steps I have taken.
- I found the contract on Rinkeby and extracted the Bytes32 component from the constructor. Contract 0x5F694fcf2767ff28c0907eEAF6b705E8456a3665
- I entered the Bytes32 component into the parameter of the unlock function but the vault does not unlock?
I am not certain what I did wrong here. In my mind the Vault should open. Any hints or insights are welcome.
Thank you.
pragma solidity ^0.6.0;
contract Vault {
bool public locked;
bytes32 private password;
constructor(bytes32 _password) public {
locked = true;
password = _password;
}
function unlock(bytes32 _password) public {
if (password == _password) {
locked = false;
}
}
}