Skip to content

Commit

Permalink
Remove unnecessary changes
Browse files Browse the repository at this point in the history
  • Loading branch information
embiem committed Aug 21, 2022
1 parent 4d086bd commit 54412c1
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions packages/hardhat/test/ClaimCODE.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,6 @@ import MerkleGenerator from '../utils/merkleGenerator';
const TOKEN_DECIMALS = 18;

const setup = deployments.createFixture(async () => {
const unnamedAccounts = await getUnnamedAccounts();

const airdrop = {
[unnamedAccounts[1]]: 100,
[unnamedAccounts[2]]: 200,
[unnamedAccounts[3]]: 300,
};
console.log(airdrop);

const generator = new MerkleGenerator(TOKEN_DECIMALS, airdrop);
const { merkleRoot, merkleTree } = await generator.process();

await deployments.fixture(['ClaimCODE']);

const merkleProofCf = await ethers.getContractFactory('MerkleProofWrapper');
Expand All @@ -35,6 +23,18 @@ const setup = deployments.createFixture(async () => {
const mockERC721 = await mockERC721Cf.deploy();
await mockERC721.deployed();

const unnamedAccounts = await getUnnamedAccounts();

const airdrop = {
[unnamedAccounts[1]]: 100,
[unnamedAccounts[2]]: 200,
[unnamedAccounts[3]]: 300,
};
console.log(airdrop);

const generator = new MerkleGenerator(TOKEN_DECIMALS, airdrop);
const { merkleRoot, merkleTree } = await generator.process();

const CODE = <CODE>await ethers.getContract('CODE');
const ClaimCODE = <ClaimCODE>await ethers.getContract('ClaimCODE');
const users = await setupUsers(unnamedAccounts, { ClaimCODE });
Expand Down Expand Up @@ -80,7 +80,7 @@ describe('Claim CODE', function () {
expect(treasury).to.equal(owner);
});

it('Deployment should revoke admin role of deployer & only leave only treasury as admin', async function () {
it('Deployment should revoke admin role of deployer & leave only treasury as admin', async function () {
const { CODE } = await setup();
const { deployer, treasury } = await getNamedAccounts();
const adminRole = await CODE.DEFAULT_ADMIN_ROLE();
Expand Down Expand Up @@ -116,7 +116,7 @@ describe('Claim CODE', function () {
});

it('can claim correct allocation amount only', async function () {
const { users, merkleProof, CODE, ClaimCODE, codeAdmin, merkleRoot, merkleTree } = await setup();
const { users, merkleProof, merkleRoot, merkleTree, CODE, ClaimCODE, codeAdmin } = await setup();

// Get tokens for address correctly
const correctFormattedAddress: string = ethers.utils.getAddress(users[1].address);
Expand Down Expand Up @@ -183,7 +183,7 @@ describe('Claim CODE', function () {
});

it('cannot claim if contract is paused', async function () {
const { users, merkleProof, CODE, ClaimCODE, treasuryOwnedClaimCODE, merkleRoot, merkleTree } = await setup();
const { users, merkleRoot, merkleProof, merkleTree, CODE, ClaimCODE, treasuryOwnedClaimCODE } = await setup();

const userId = 2;
const userAmount = 200;
Expand Down

0 comments on commit 54412c1

Please sign in to comment.