in a second terminal window:
in a third terminal window:
Attacker.sol
and Reenterancy.sol
in packages/hardhat/contracts
App.jsx
in packages/react-app/src
Reenterancy.sol
directly. You can deposit, check your balance, and withdraw:Reenterancy.sol
contract has extra funds in it:Attacker.sol
:Attacker.sol
it will withdraw once and then re-enter and withdraw again:Reenterancy.sol
contract is now empty but the original account that deposited the extra funds thinks they still have a balance: