Everything that is inside a contract is visible to all observers external to the blockchain. Making variables private only prevents other contracts from reading or modifying the information, but it will still be visible to the whole world outside of the blockchain
Add the following test to the PasswordStore.t.sol test file. Run the test with forge t --mt test_AnyoneCanSeePassword -vv
We can also use web3.js function web3.eth.getStorageAt(address, position) or simply use etherscan to find out the password.
Everyone can see the password from the owner.
Foundry
Use a commit-reveal scheme to store the password
Private functions and state variables are only visible for the contract they are defined in and not in derived contracts. In this case private doesn't mean secret/confidential
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.