Skip to content

Commit

Permalink
Move a lot of values to constants
Browse files Browse the repository at this point in the history
  • Loading branch information
Zoe Nolan committed Oct 24, 2023
1 parent a0f0110 commit cf253e8
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions test/DiscountTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,12 @@ describe("Discounts", () => {
let annualPassContract: TestPassOne;
let lifetimePassContract: TestPassTwo;

const nullAddress = "0x0000000000000000000000000000000000000000";
const mintCostAllowlist = ethers.utils.parseEther("0.4");
const mintCostGeneral = ethers.utils.parseEther("0.8");

const hundreadPercentInBps = 10000;
const annualPassDiscountBps = 2500;
const lifetimePassDiscountBps = 5000;

beforeEach(async () => {
signer = (await ethers.getSigners())[0];
Expand Down Expand Up @@ -78,10 +83,8 @@ describe("Discounts", () => {
)) as TestPassTwo;
lifetimePassContract.initialize();

const mintCostAllowlist = ethers.utils.parseEther("0.4");
const mintCostGeneral = ethers.utils.parseEther("0.8");
await minterContract.setPricing(10, 500, mintCostAllowlist, mintCostGeneral, 2, 1);
await minterContract.updateDiscounts(annualPassContract.address, lifetimePassContract.address, 2500, 5000);
await minterContract.updateDiscounts(annualPassContract.address, lifetimePassContract.address, annualPassDiscountBps, lifetimePassDiscountBps);
});

it("A non pass holder can not mint while the drop is not for sale", async () => {
Expand Down Expand Up @@ -339,7 +342,7 @@ describe("Discounts", () => {
});

it("A pass holder can mint for free with 100% discount", async () => {
await minterContract.updateDiscounts(annualPassContract.address, lifetimePassContract.address, 10000, 10000);
await minterContract.updateDiscounts(annualPassContract.address, lifetimePassContract.address, hundreadPercentInBps, hundreadPercentInBps);

await annualPassContract.connect(user).mint(userAddress);
await minterContract.setAllowedMinter(2);
Expand Down

0 comments on commit cf253e8

Please sign in to comment.