An extremely simple version of a reentrancy attack, for educational purposes.
Recreate the two contracts in remix.ethereum.org and you are ready to go.
- Navigate your browser to Remix web IDE.
- Create a new file in your Remix workspace called InsecureVault.sol and paste the code from the corresponding file in this repo.
- Complete step 2 with Attack.sol as well.
- You're ready! We'll cover the rest in class.
I know, it's not very efficient. However, doing this in Remix just saves a lot of time troubleshooting potential differences in everyone's development environment during live classes.