Skip to content

Commit 375b853

Browse files
committed
fix pr comments
1 parent b7df4ef commit 375b853

18 files changed

+205
-130
lines changed

hardhat.config.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,12 @@ const config: HardhatUserConfig = {
2121
version: "0.8.26",
2222
settings: {
2323
optimizer: { enabled: true, runs: 200 },
24-
viaIR: true, // Required for complex contracts
2524
},
2625
},
2726
networks: {
2827
hardhat: {
2928
blockGasLimit: 40_000_000,
3029
accounts: {
31-
count: 20,
32-
initialIndex: 0,
33-
mnemonic: "test test test test test test test test test test test junk",
34-
path: "m/44'/60'/0'/0",
3530
accountsBalance: "10000000000000000000000", // 10k ETH
3631
},
3732
},

package.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@
55
"main": "index.js",
66
"scripts": {
77
"test": "hardhat test",
8-
"test:setup": "hardhat test --grep 'Setup'",
9-
"test:interaction": "hardhat test --grep 'Interaction'",
10-
"test:combined": "hardhat test --grep 'Combined'",
118
"test:all": "hardhat test",
129
"e2e": "forge build && npm run typechain && hardhat test test/e2e/tests/e2e.test.ts",
1310
"e2e:run": "forge build && npm run typechain && npx ts-node test/e2e/src/E2ECliRunner.ts",

test/e2e/instances/interaction/AdvancedInteraction.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,12 +174,11 @@ export const advancedInteraction: TestInteractionData = {
174174
reason: "Check auction state parameters",
175175
assert: {
176176
type: AssertionInterfaceType.AUCTION,
177-
isGraduated: false,
177+
isGraduated: true,
178178
clearingPrice: "79228162514264337593543950336000",
179179
currencyRaised: "661363636363636363",
180180
latestCheckpoint: {
181181
clearingPrice: "79228162514264337593543950336000",
182-
currencyRaisedQ96_X7: "523986256628430050902756580631272727272727272726000000",
183182
currencyRaisedAtClearingPriceQ96_X7: "0",
184183
cumulativeMpsPerPrice: "435754893828453856764491726848000",
185184
cumulativeMps: "5500000",

test/e2e/instances/interaction/VariationInteraction.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ export const variationInteraction: TestInteractionData = {
9090
reason: "Check auction state with variance on currencyRaised",
9191
assert: {
9292
type: AssertionInterfaceType.AUCTION,
93-
isGraduated: false,
93+
isGraduated: true,
9494
clearingPrice: "79228162514264337593543950336000",
9595
// Currency raised will vary based on random bid amounts
9696
// Expected around 0.326 ETH with variance due to bid variations
@@ -101,10 +101,6 @@ export const variationInteraction: TestInteractionData = {
101101
latestCheckpoint: {
102102
clearingPrice: "79228162514264337593543950336000",
103103
// These will also vary, so we use VariableAmount with raw amount variation
104-
currencyRaisedQ96_X7: {
105-
amount: "80593446990424197784923982579080313706988320995000000",
106-
variation: "30%", // +/- 30% to account for variation
107-
},
108104
currencyRaisedAtClearingPriceQ96_X7: "0",
109105
cumulativeMpsPerPrice: {
110106
amount: "158456325028528675187087900672000",

test/e2e/instances/setup/AdvancedSetup.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ export const advancedSetup: TestSetupData = {
3636
},
3737
],
3838
},
39-
4039
auctionParameters: {
4140
currency: "0x0000000000000000000000000000000000000000" as Address,
4241
auctionedToken: "AdvancedToken",
@@ -47,8 +46,8 @@ export const advancedSetup: TestSetupData = {
4746
tickSpacing: "396140812571321687967719751680",
4847
validationHook: "0x0000000000000000000000000000000000000000" as Address,
4948
floorPrice: "79228162514264337593543950336000",
49+
requiredCurrencyRaised: "0",
5050
},
51-
5251
additionalTokens: [
5352
{
5453
name: "AdvancedToken",

test/e2e/instances/setup/ERC20Setup.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,10 @@ export const erc20Setup: TestSetupData = {
3434
fundsRecipient: "0x3333333333333333333333333333333333333333" as Address,
3535
auctionDurationBlocks: 50,
3636
claimDelayBlocks: 10,
37-
tickSpacing: 100,
37+
tickSpacing: 100n,
3838
validationHook: "0x0000000000000000000000000000000000000000" as Address,
3939
floorPrice: "79228162514264337593543950336000",
40+
requiredCurrencyRaised: "0",
4041
},
4142

4243
additionalTokens: [

test/e2e/instances/setup/ExtendedSetup.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ export const extendedSetup: TestSetupData = {
100100
tickSpacing: "69324642199981300000000", // From params - large value as string
101101
validationHook: "0x0000000000000000000000000000000000000000" as Address,
102102
floorPrice: "6932464219998130000000000", // 0.0000875 ETH in Q96 format
103+
requiredCurrencyRaised: "0",
103104
// Using the exact hex string from the params file
104105
auctionStepsData:
105106
"0x00000000000189c0325aa000000000010000000000001c2007a12000000000010000000000001c2007a12000000000010000000000001c200f424000000000010000000000001c200f424000000000010000000000001c200f424000000000010000000000001c202932e00000000001",
@@ -112,11 +113,5 @@ export const extendedSetup: TestSetupData = {
112113
totalSupply: "1000000000000000000000000000", // 1 billion tokens (1e9 * 1e18)
113114
percentAuctioned: "15.0", // 15% of 1B = 150M tokens
114115
},
115-
{
116-
name: "USDC",
117-
decimals: "6",
118-
totalSupply: "1000000000000",
119-
percentAuctioned: "0.0",
120-
},
121116
],
122117
};

test/e2e/instances/setup/SimpleSetup.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,10 @@ export const simpleSetup: TestSetupData = {
2929
fundsRecipient: "0x3333333333333333333333333333333333333333" as Address,
3030
auctionDurationBlocks: 50,
3131
claimDelayBlocks: 10,
32-
tickSpacing: 100,
32+
tickSpacing: 100n,
3333
validationHook: "0x0000000000000000000000000000000000000000" as Address,
3434
floorPrice: "79228162514264337593543950336000",
35+
requiredCurrencyRaised: "0",
3536
},
3637

3738
additionalTokens: [
@@ -41,11 +42,5 @@ export const simpleSetup: TestSetupData = {
4142
totalSupply: "1000000000000000000000",
4243
percentAuctioned: "10.0",
4344
},
44-
{
45-
name: "USDC",
46-
decimals: "6",
47-
totalSupply: "1000000000000",
48-
percentAuctioned: "0.0",
49-
},
5045
],
5146
};

test/e2e/instances/setup/VariationSetup.ts

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,10 @@ export const variationSetup: TestSetupData = {
3434
fundsRecipient: "0x4444444444444444444444444444444444444444" as Address,
3535
auctionDurationBlocks: 50,
3636
claimDelayBlocks: 10,
37-
tickSpacing: 100,
37+
tickSpacing: 100n,
3838
validationHook: "0x0000000000000000000000000000000000000000" as Address,
39-
floorPrice: "79228162514264337593543950336000",
39+
floorPrice: 79228162514264337593543950336000n,
40+
requiredCurrencyRaised: "0",
4041
},
4142

4243
additionalTokens: [
@@ -46,11 +47,5 @@ export const variationSetup: TestSetupData = {
4647
totalSupply: "1000000000000000000000",
4748
percentAuctioned: "10.0",
4849
},
49-
{
50-
name: "USDC",
51-
decimals: "6",
52-
totalSupply: "1000000000000",
53-
percentAuctioned: "0.0",
54-
},
5550
],
5651
};

test/e2e/schemas/TestInteractionSchema.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,6 @@ export interface AuctionAssertion {
133133

134134
export interface InternalCheckpointStruct {
135135
clearingPrice: string | VariableAmount;
136-
currencyRaisedQ96_X7: string | VariableAmount;
137136
currencyRaisedAtClearingPriceQ96_X7: string | VariableAmount;
138137
cumulativeMpsPerPrice: string | VariableAmount;
139138
cumulativeMps: string | VariableAmount;

0 commit comments

Comments
 (0)