@paraswap/dex-lib 2.35.3-quick-perps-proxy.2 → 2.35.3-quick-perps-proxy.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/abi/aerodrome/aerodrome-pool-factory.json +586 -0
- package/build/config.js +39 -13
- package/build/config.js.map +1 -1
- package/build/constants.d.ts +2 -1
- package/build/constants.js +1 -0
- package/build/constants.js.map +1 -1
- package/build/dex/balancer-v2/config.js +10 -2
- package/build/dex/balancer-v2/config.js.map +1 -1
- package/build/dex/generic-rfq/generic-rfq.d.ts +2 -1
- package/build/dex/generic-rfq/generic-rfq.js +5 -4
- package/build/dex/generic-rfq/generic-rfq.js.map +1 -1
- package/build/dex/index.js +2 -0
- package/build/dex/index.js.map +1 -1
- package/build/dex/maverick-v1/config.js +9 -0
- package/build/dex/maverick-v1/config.js.map +1 -1
- package/build/dex/maverick-v1/maverick-v1.js +11 -2
- package/build/dex/maverick-v1/maverick-v1.js.map +1 -1
- package/build/dex/pancakeswap-v3/config.js +17 -0
- package/build/dex/pancakeswap-v3/config.js.map +1 -1
- package/build/dex/solidly/config.js +22 -1
- package/build/dex/solidly/config.js.map +1 -1
- package/build/dex/solidly/forks-override/aerodrome.d.ts +14 -0
- package/build/dex/solidly/forks-override/aerodrome.js +48 -0
- package/build/dex/solidly/forks-override/aerodrome.js.map +1 -0
- package/build/dex/solidly/solidly.js +1 -0
- package/build/dex/solidly/solidly.js.map +1 -1
- package/build/dex/uniswap-v3/config.js +29 -1
- package/build/dex/uniswap-v3/config.js.map +1 -1
- package/build/dex/weth/config.js +3 -0
- package/build/dex/weth/config.js.map +1 -1
- package/build/dex/woo-fi-v2/config.js +13 -0
- package/build/dex/woo-fi-v2/config.js.map +1 -1
- package/build/dex-helper/dummy-dex-helper.js +4 -1
- package/build/dex-helper/dummy-dex-helper.js.map +1 -1
- package/build/stateful-event-subscriber.d.ts +0 -1
- package/build/stateful-event-subscriber.js +2 -12
- package/build/stateful-event-subscriber.js.map +1 -1
- package/build/workers.d.ts +0 -0
- package/build/workers.js +2 -0
- package/build/workers.js.map +1 -0
- package/package.json +1 -1
- package/src/abi/aerodrome/aerodrome-pool-factory.json +586 -0
- package/src/config.ts +40 -14
- package/src/constants.ts +1 -0
- package/src/dex/balancer-v2/balancer-v2-e2e.test.ts +120 -1
- package/src/dex/balancer-v2/config.ts +11 -2
- package/src/dex/generic-rfq/generic-rfq.ts +7 -4
- package/src/dex/hashflow/hashflow-e2e.test.ts +36 -3
- package/src/dex/index.ts +2 -0
- package/src/dex/maverick-v1/config.ts +10 -0
- package/src/dex/maverick-v1/maverick-v1-e2e.test.ts +115 -1
- package/src/dex/maverick-v1/maverick-v1.ts +12 -2
- package/src/dex/pancakeswap-v3/config.ts +19 -0
- package/src/dex/pancakeswap-v3/pancakeswap-v3-e2e.test.ts +114 -0
- package/src/dex/solidly/config.ts +24 -1
- package/src/dex/solidly/forks-override/aerodrome.ts +53 -0
- package/src/dex/solidly/solidly-e2e.test.ts +88 -0
- package/src/dex/solidly/solidly-integration.test.ts +66 -0
- package/src/dex/solidly/solidly.ts +1 -0
- package/src/dex/uniswap-v3/config.ts +30 -1
- package/src/dex/uniswap-v3/uniswap-v3-e2e.test.ts +110 -0
- package/src/dex/uniswap-v3/uniswap-v3-integration.test.ts +140 -0
- package/src/dex/weth/config.ts +3 -0
- package/src/dex/woo-fi-v2/config.ts +13 -0
- package/src/dex/woo-fi-v2/woo-fi-v2-e2e.test.ts +64 -0
- package/src/dex-helper/dummy-dex-helper.ts +4 -1
- package/src/stateful-event-subscriber.ts +2 -12
- package/tests/constants-e2e.ts +47 -0
- package/tests/tenderly-simulation.ts +2 -2
- package/tests/utils-e2e.ts +3 -1
|
@@ -51,8 +51,6 @@ export abstract class StatefulEventSubscriber<State>
|
|
|
51
51
|
|
|
52
52
|
private _lastPublishedTimeMs: number = 0;
|
|
53
53
|
|
|
54
|
-
private isForcedGenerateStateIsRunning = false;
|
|
55
|
-
|
|
56
54
|
constructor(
|
|
57
55
|
public readonly parentName: string,
|
|
58
56
|
_name: string,
|
|
@@ -97,16 +95,8 @@ export abstract class StatefulEventSubscriber<State>
|
|
|
97
95
|
this.logger.debug(
|
|
98
96
|
`${this.parentName}: ${this.name}: forced to regenerate state`,
|
|
99
97
|
);
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
}
|
|
103
|
-
this.isForcedGenerateStateIsRunning = true;
|
|
104
|
-
try {
|
|
105
|
-
const state = await this.generateState(blockNumber);
|
|
106
|
-
this.setState(state, blockNumber);
|
|
107
|
-
} finally {
|
|
108
|
-
this.isForcedGenerateStateIsRunning = false;
|
|
109
|
-
}
|
|
98
|
+
const state = await this.generateState(blockNumber);
|
|
99
|
+
this.setState(state, blockNumber);
|
|
110
100
|
} else {
|
|
111
101
|
if (this.dexHelper.config.isSlave && this.masterPoolNeeded) {
|
|
112
102
|
let stateAsString = await this.dexHelper.cache.hget(
|
package/tests/constants-e2e.ts
CHANGED
|
@@ -883,6 +883,41 @@ export const Tokens: {
|
|
|
883
883
|
decimals: 6,
|
|
884
884
|
},
|
|
885
885
|
},
|
|
886
|
+
[Network.BASE]: {
|
|
887
|
+
PRIME: {
|
|
888
|
+
address: '0xfA980cEd6895AC314E7dE34Ef1bFAE90a5AdD21b',
|
|
889
|
+
decimals: 18,
|
|
890
|
+
},
|
|
891
|
+
WETH: {
|
|
892
|
+
address: '0x4200000000000000000000000000000000000006',
|
|
893
|
+
decimals: 18,
|
|
894
|
+
},
|
|
895
|
+
MAV: {
|
|
896
|
+
address: '0x64b88c73A5DfA78D1713fE1b4c69a22d7E0faAa7',
|
|
897
|
+
decimals: 18,
|
|
898
|
+
},
|
|
899
|
+
USDC: {
|
|
900
|
+
address: '0x833589fcd6edb6e08f4c7c32d4f71b54bda02913',
|
|
901
|
+
decimals: 6,
|
|
902
|
+
},
|
|
903
|
+
USDbC: {
|
|
904
|
+
address: '0xd9aAEc86B65D86f6A7B5B1b0c42FFA531710b6CA',
|
|
905
|
+
decimals: 6,
|
|
906
|
+
},
|
|
907
|
+
DAI: {
|
|
908
|
+
address: '0x50c5725949a6f0c72e6c4a641f24049a917db0cb',
|
|
909
|
+
decimals: 18,
|
|
910
|
+
},
|
|
911
|
+
BAL: {
|
|
912
|
+
address: '0x4158734d47fc9692176b5085e0f52ee0da5d47f1',
|
|
913
|
+
decimals: 18,
|
|
914
|
+
},
|
|
915
|
+
GOLD: {
|
|
916
|
+
address: '0xbeFD5C25A59ef2C1316c5A4944931171F30Cd3E4',
|
|
917
|
+
decimals: 18,
|
|
918
|
+
},
|
|
919
|
+
ETH: { address: ETHER_ADDRESS, decimals: 18 },
|
|
920
|
+
},
|
|
886
921
|
};
|
|
887
922
|
|
|
888
923
|
export const Holders: {
|
|
@@ -1102,6 +1137,17 @@ export const Holders: {
|
|
|
1102
1137
|
WBTC: '0x99b31498b0a1dae01fc3433e3cb60f095340935c',
|
|
1103
1138
|
USDC: '0x99b31498b0a1dae01fc3433e3cb60f095340935c',
|
|
1104
1139
|
},
|
|
1140
|
+
[Network.BASE]: {
|
|
1141
|
+
WETH: '0x4bb6b2efe7036020ba6f02a05602546c9f25bf28',
|
|
1142
|
+
PRIME: '0x956bcc6b56c99db382d9d97a30ba5f1402144b3e',
|
|
1143
|
+
ETH: '0xdd9176ea3e7559d6b68b537ef555d3e89403f742',
|
|
1144
|
+
MAV: '0x7499785aa5d1bdf0a0ac862c1ef3698d3cba6568',
|
|
1145
|
+
USDC: '0xaac391f166f33cdaefaa4afa6616a3bea66b694d',
|
|
1146
|
+
USDbC: '0xc9d05a1c3c8e01dcb701d6185cdc21a5bb94becb',
|
|
1147
|
+
DAI: '0x20f03e26968b179025f65c1f4afadfd3959c8d03',
|
|
1148
|
+
BAL: '0x854b004700885a61107b458f11ecc169a019b764',
|
|
1149
|
+
GOLD: '0x1374c25b3710758c326ee0c70ec48b595d5ccf8c',
|
|
1150
|
+
},
|
|
1105
1151
|
};
|
|
1106
1152
|
|
|
1107
1153
|
export const SmartTokens = Object.keys(Tokens).reduce((acc, _network) => {
|
|
@@ -1126,4 +1172,5 @@ export const NativeTokenSymbols: { [network: number]: string } = {
|
|
|
1126
1172
|
[Network.FANTOM]: 'FTM',
|
|
1127
1173
|
[Network.ARBITRUM]: 'ETH',
|
|
1128
1174
|
[Network.OPTIMISM]: 'ETH',
|
|
1175
|
+
[Network.BASE]: 'ETH',
|
|
1129
1176
|
};
|
|
@@ -149,13 +149,13 @@ export class TenderlySimulation implements TransactionSimulator {
|
|
|
149
149
|
return {
|
|
150
150
|
success: true,
|
|
151
151
|
gasUsed: data.transaction.gas_used,
|
|
152
|
-
|
|
152
|
+
url: `https://dashboard.tenderly.co/${TENDERLY_ACCOUNT_ID}/${TENDERLY_PROJECT}/fork/${this.forkId}/simulation/${lastTx}`,
|
|
153
153
|
transaction: data.transaction,
|
|
154
154
|
};
|
|
155
155
|
} else {
|
|
156
156
|
return {
|
|
157
157
|
success: false,
|
|
158
|
-
|
|
158
|
+
url: `https://dashboard.tenderly.co/${TENDERLY_ACCOUNT_ID}/${TENDERLY_PROJECT}/fork/${this.forkId}/simulation/${lastTx}`,
|
|
159
159
|
error: `Simulation failed: ${data.transaction.error_info.error_message} at ${data.transaction.error_info.address}`,
|
|
160
160
|
};
|
|
161
161
|
}
|
package/tests/utils-e2e.ts
CHANGED
|
@@ -86,6 +86,7 @@ const MULTISIG: { [nid: number]: string } = {
|
|
|
86
86
|
[Network.AVALANCHE]: '0x1e2ECA5e812D08D2A7F8664D69035163ff5BfEC2',
|
|
87
87
|
[Network.OPTIMISM]: '0xf01121e808F782d7F34E857c27dA31AD1f151b39',
|
|
88
88
|
[Network.ARBITRUM]: '0x90DfD8a6454CFE19be39EaB42ac93CD850c7f339',
|
|
89
|
+
[Network.BASE]: '0x6C674c8Df1aC663b822c4B6A56B4E5e889379AE0',
|
|
89
90
|
};
|
|
90
91
|
|
|
91
92
|
class APIParaswapSDK implements IParaSwapSDK {
|
|
@@ -298,6 +299,7 @@ export async function testE2E(
|
|
|
298
299
|
),
|
|
299
300
|
);
|
|
300
301
|
expect(whitelistTx.success).toEqual(true);
|
|
302
|
+
console.log(`Successfully whitelisted ${deployedTestContractAddress}`);
|
|
301
303
|
|
|
302
304
|
if (testContractType === 'router') {
|
|
303
305
|
const setImplementationTx = await ts.simulate(
|
|
@@ -622,7 +624,7 @@ export async function newTestE2E({
|
|
|
622
624
|
parseInt(priceRoute.gasCost) - parseInt(swapTx!.gasUsed)
|
|
623
625
|
}`,
|
|
624
626
|
);
|
|
625
|
-
console.log(`Tenderly URL: ${swapTx!.
|
|
627
|
+
console.log(`Tenderly URL: ${swapTx!.url}`);
|
|
626
628
|
expect(swapTx!.success).toEqual(true);
|
|
627
629
|
}
|
|
628
630
|
} finally {
|