Read the smart contract Vault.sol
, try to steal all eth from the vault.
You can write a hacker contract and add some code to pass the forge test
.
you need understand following knowledge points:
- reentrance
- ABI encoding
- delegatecall
$ anvil
forge script script/Vault.s.sol --rpc-url http://127.0.0.1:8545 --broadcast
forge test -vvv