@paraswap/dex-lib 3.8.38 → 3.8.39-1701-1507
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/USDM.json +807 -0
- package/build/abi/bebop/BebopSettlement.abi.json +2137 -0
- package/build/abi/wUSDM.json +757 -0
- package/build/config.js +16 -9
- package/build/config.js.map +1 -1
- package/build/dex/aave-v2/aave-v2.d.ts +1 -0
- package/build/dex/aave-v2/aave-v2.js +1 -0
- package/build/dex/aave-v2/aave-v2.js.map +1 -1
- package/build/dex/aave-v3/aave-v3.d.ts +1 -0
- package/build/dex/aave-v3/aave-v3.js +1 -0
- package/build/dex/aave-v3/aave-v3.js.map +1 -1
- package/build/dex/aave-v3-stata/aave-v3-stata.d.ts +1 -0
- package/build/dex/aave-v3-stata/aave-v3-stata.js +1 -0
- package/build/dex/aave-v3-stata/aave-v3-stata.js.map +1 -1
- package/build/dex/bancor/bancor.d.ts +1 -0
- package/build/dex/bancor/bancor.js +1 -0
- package/build/dex/bancor/bancor.js.map +1 -1
- package/build/dex/bebop/bebop.d.ts +55 -0
- package/build/dex/bebop/bebop.js +524 -0
- package/build/dex/bebop/bebop.js.map +1 -0
- package/build/dex/bebop/config.d.ts +3 -0
- package/build/dex/bebop/config.js +38 -0
- package/build/dex/bebop/config.js.map +1 -0
- package/build/dex/bebop/constants.d.ts +9 -0
- package/build/dex/bebop/constants.js +13 -0
- package/build/dex/bebop/constants.js.map +1 -0
- package/build/dex/bebop/rate-fetcher.d.ts +22 -0
- package/build/dex/bebop/rate-fetcher.js +80 -0
- package/build/dex/bebop/rate-fetcher.js.map +1 -0
- package/build/dex/bebop/types.d.ts +76 -0
- package/build/dex/bebop/types.js +3 -0
- package/build/dex/bebop/types.js.map +1 -0
- package/build/dex/bebop/validators.d.ts +4 -0
- package/build/dex/bebop/validators.js +42 -0
- package/build/dex/bebop/validators.js.map +1 -0
- package/build/dex/bebop/websocket-fetcher.d.ts +35 -0
- package/build/dex/bebop/websocket-fetcher.js +87 -0
- package/build/dex/bebop/websocket-fetcher.js.map +1 -0
- package/build/dex/compound/compound.d.ts +1 -0
- package/build/dex/compound/compound.js +1 -0
- package/build/dex/compound/compound.js.map +1 -1
- package/build/dex/curve-v1/curve-v1.d.ts +1 -0
- package/build/dex/curve-v1/curve-v1.js +1 -0
- package/build/dex/curve-v1/curve-v1.js.map +1 -1
- package/build/dex/dodo-v1/dodo-v1.d.ts +1 -0
- package/build/dex/dodo-v1/dodo-v1.js +1 -0
- package/build/dex/dodo-v1/dodo-v1.js.map +1 -1
- package/build/dex/hashflow/hashflow.d.ts +6 -4
- package/build/dex/hashflow/hashflow.js +183 -29
- package/build/dex/hashflow/hashflow.js.map +1 -1
- package/build/dex/hashflow/types.d.ts +2 -0
- package/build/dex/hashflow/types.js.map +1 -1
- package/build/dex/idex.d.ts +8 -1
- package/build/dex/index.js +2 -0
- package/build/dex/index.js.map +1 -1
- package/build/dex/jarvis-v6/jarvis-v6.d.ts +1 -0
- package/build/dex/jarvis-v6/jarvis-v6.js +1 -0
- package/build/dex/jarvis-v6/jarvis-v6.js.map +1 -1
- package/build/dex/lido/lido.d.ts +1 -0
- package/build/dex/lido/lido.js +1 -0
- package/build/dex/lido/lido.js.map +1 -1
- package/build/dex/lite-psm/lite-psm.d.ts +1 -0
- package/build/dex/lite-psm/lite-psm.js +1 -0
- package/build/dex/lite-psm/lite-psm.js.map +1 -1
- package/build/dex/maker-psm/maker-psm.d.ts +1 -0
- package/build/dex/maker-psm/maker-psm.js +1 -0
- package/build/dex/maker-psm/maker-psm.js.map +1 -1
- package/build/dex/nerve/nerve.d.ts +1 -0
- package/build/dex/nerve/nerve.js +1 -0
- package/build/dex/nerve/nerve.js.map +1 -1
- package/build/dex/polygon-migrator/polygon-migrator.d.ts +1 -0
- package/build/dex/polygon-migrator/polygon-migrator.js +1 -0
- package/build/dex/polygon-migrator/polygon-migrator.js.map +1 -1
- package/build/dex/simple-exchange.d.ts +3 -1
- package/build/dex/simple-exchange.js +1 -0
- package/build/dex/simple-exchange.js.map +1 -1
- package/build/dex/smoothy/smoothy.d.ts +1 -0
- package/build/dex/smoothy/smoothy.js +1 -0
- package/build/dex/smoothy/smoothy.js.map +1 -1
- package/build/dex/spark/spark.d.ts +1 -0
- package/build/dex/spark/spark.js +1 -0
- package/build/dex/spark/spark.js.map +1 -1
- package/build/dex/stable-pool/stable-pool.d.ts +3 -2
- package/build/dex/stable-pool/stable-pool.js +2 -1
- package/build/dex/stable-pool/stable-pool.js.map +1 -1
- package/build/dex/swaap-v2/swaap-v2.d.ts +5 -3
- package/build/dex/swaap-v2/swaap-v2.js +112 -21
- package/build/dex/swaap-v2/swaap-v2.js.map +1 -1
- package/build/dex/swaap-v2/types.d.ts +2 -0
- package/build/dex/swaap-v2/types.js.map +1 -1
- package/build/dex/trader-joe-v2.1/base.d.ts +1 -0
- package/build/dex/trader-joe-v2.1/base.js +1 -0
- package/build/dex/trader-joe-v2.1/base.js.map +1 -1
- package/build/dex/weth/weth.d.ts +1 -0
- package/build/dex/weth/weth.js +1 -0
- package/build/dex/weth/weth.js.map +1 -1
- package/build/dex/woo-fi-v2/woo-fi-v2-pool.d.ts +2 -2
- package/build/dex/woo-fi-v2/woo-fi-v2-pool.js +30 -9
- package/build/dex/woo-fi-v2/woo-fi-v2-pool.js.map +1 -1
- package/build/dex/woo-fi-v2/woo-fi-v2.js +1 -1
- package/build/dex/woo-fi-v2/woo-fi-v2.js.map +1 -1
- package/build/dex/wusdm/config.d.ts +3 -0
- package/build/dex/wusdm/config.js +29 -0
- package/build/dex/wusdm/config.js.map +1 -0
- package/build/dex/wusdm/types.d.ts +10 -0
- package/build/dex/wusdm/types.js +3 -0
- package/build/dex/wusdm/types.js.map +1 -0
- package/build/dex/wusdm/wusdm.d.ts +39 -0
- package/build/dex/wusdm/wusdm.js +212 -0
- package/build/dex/wusdm/wusdm.js.map +1 -0
- package/build/executor/Executor01BytecodeBuilder.d.ts +3 -3
- package/build/executor/Executor01BytecodeBuilder.js +65 -16
- package/build/executor/Executor01BytecodeBuilder.js.map +1 -1
- package/build/executor/Executor02BytecodeBuilder.d.ts +4 -4
- package/build/executor/Executor02BytecodeBuilder.js +65 -18
- package/build/executor/Executor02BytecodeBuilder.js.map +1 -1
- package/build/executor/Executor03BytecodeBuilder.d.ts +2 -2
- package/build/executor/Executor03BytecodeBuilder.js +52 -8
- package/build/executor/Executor03BytecodeBuilder.js.map +1 -1
- package/build/executor/ExecutorBytecodeBuilder.d.ts +5 -4
- package/build/executor/ExecutorBytecodeBuilder.js +4 -4
- package/build/executor/ExecutorBytecodeBuilder.js.map +1 -1
- package/build/executor/ExecutorDetector.js +2 -1
- package/build/executor/ExecutorDetector.js.map +1 -1
- package/build/executor/types.d.ts +1 -0
- package/build/executor/types.js +1 -0
- package/build/executor/types.js.map +1 -1
- package/build/generic-swap-transaction-builder.d.ts +2 -0
- package/build/generic-swap-transaction-builder.js +49 -11
- package/build/generic-swap-transaction-builder.js.map +1 -1
- package/build/implementations/local-paraswap-sdk.js +3 -1
- package/build/implementations/local-paraswap-sdk.js.map +1 -1
- package/build/lib/fetcher/wsFetcher.d.ts +35 -0
- package/build/lib/fetcher/wsFetcher.js +87 -0
- package/build/lib/fetcher/wsFetcher.js.map +1 -0
- package/build/router/simpleswap.js +51 -13
- package/build/router/simpleswap.js.map +1 -1
- package/build/types.d.ts +2 -0
- package/package.json +4 -2
- package/src/abi/bebop/BebopSettlement.abi.json +2137 -0
- package/src/config.ts +17 -9
- package/src/dex/aave-v2/aave-v2.ts +2 -0
- package/src/dex/aave-v3/aave-v3.ts +2 -0
- package/src/dex/aave-v3-stata/aave-v3-stata.ts +2 -0
- package/src/dex/bancor/bancor.ts +2 -0
- package/src/dex/bebop/bebop-e2e.test.ts +195 -0
- package/src/dex/bebop/bebop-integration.test.ts +170 -0
- package/src/dex/bebop/bebop.ts +732 -0
- package/src/dex/bebop/config.ts +37 -0
- package/src/dex/bebop/constants.ts +9 -0
- package/src/dex/bebop/rate-fetcher.ts +138 -0
- package/src/dex/bebop/types.ts +81 -0
- package/src/dex/bebop/validators.ts +43 -0
- package/src/dex/compound/compound.ts +2 -0
- package/src/dex/curve-v1/curve-v1.ts +2 -0
- package/src/dex/dodo-v1/dodo-v1.ts +2 -0
- package/src/dex/hashflow/hashflow-e2e.test.ts +281 -28
- package/src/dex/hashflow/hashflow.ts +285 -54
- package/src/dex/hashflow/types.ts +2 -0
- package/src/dex/idex.ts +18 -1
- package/src/dex/index.ts +2 -0
- package/src/dex/jarvis-v6/jarvis-v6.ts +2 -0
- package/src/dex/lido/lido.ts +2 -0
- package/src/dex/lite-psm/lite-psm.ts +2 -0
- package/src/dex/maker-psm/maker-psm.ts +2 -0
- package/src/dex/nerve/nerve.ts +2 -0
- package/src/dex/polygon-migrator/polygon-migrator.ts +2 -0
- package/src/dex/simple-exchange.ts +4 -2
- package/src/dex/smoothy/smoothy.ts +2 -0
- package/src/dex/spark/spark.ts +2 -0
- package/src/dex/stable-pool/stable-pool.ts +4 -1
- package/src/dex/swaap-v2/swaap-v2-e2e.test.ts +13 -13
- package/src/dex/swaap-v2/swaap-v2.ts +217 -32
- package/src/dex/swaap-v2/types.ts +2 -0
- package/src/dex/trader-joe-v2.1/base.ts +2 -0
- package/src/dex/weth/weth.ts +2 -0
- package/src/dex/woo-fi-v2/woo-fi-v2-pool.ts +58 -27
- package/src/dex/woo-fi-v2/woo-fi-v2.ts +1 -2
- package/src/executor/Executor01BytecodeBuilder.ts +105 -11
- package/src/executor/Executor02BytecodeBuilder.ts +95 -8
- package/src/executor/Executor03BytecodeBuilder.ts +89 -5
- package/src/executor/ExecutorBytecodeBuilder.ts +6 -0
- package/src/executor/ExecutorDetector.ts +2 -1
- package/src/executor/types.ts +1 -0
- package/src/generic-swap-transaction-builder.ts +96 -24
- package/src/implementations/local-paraswap-sdk.ts +21 -10
- package/src/lib/fetcher/wsFetcher.ts +126 -0
- package/src/router/simpleswap.ts +94 -18
- package/src/types.ts +2 -0
- package/tests/constants-e2e.ts +2 -2
- package/tests/utils-e2e.ts +308 -2
|
@@ -19,7 +19,8 @@ export class ExecutorDetector {
|
|
|
19
19
|
> = {
|
|
20
20
|
[SwapSide.SELL]: {
|
|
21
21
|
[RouteExecutionType.SINGLE_STEP]: Executors.ONE, // simpleSwap via Executor01
|
|
22
|
-
[RouteExecutionType.HORIZONTAL_SEQUENCE]: Executors.ONE, // multiSwap via Executor01
|
|
22
|
+
// [RouteExecutionType.HORIZONTAL_SEQUENCE]: Executors.ONE, // multiSwap via Executor01
|
|
23
|
+
[RouteExecutionType.HORIZONTAL_SEQUENCE]: Executors.TWO, // multiSwap via Executor02
|
|
23
24
|
[RouteExecutionType.VERTICAL_BRANCH]: Executors.TWO, // simpleSwap with percentage on a path via Executor02
|
|
24
25
|
[RouteExecutionType.VERTICAL_BRANCH_HORIZONTAL_SEQUENCE]: Executors.TWO, // multiSwap with percentages on paths via Executor02
|
|
25
26
|
// megaSwap via Executor02
|
package/src/executor/types.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export enum Flag {
|
|
2
2
|
SEND_ETH_EQUAL_TO_FROM_AMOUNT_PLUS_INSERT_FROM_AMOUNT_DONT_CHECK_BALANCE_AFTER_SWAP = 18, // // (flag 18 mod 4) = case 2: sendEth equal to fromAmount + insert fromAmount, (flag 18 mod 3) = case 0: don't check balance after swap
|
|
3
3
|
SEND_ETH_EQUAL_TO_FROM_AMOUNT_PLUS_INSERT_FROM_AMOUNT_CHECK_SRC_TOKEN_BALANCE_AFTER_SWAP = 14, // (flag 14 mod 4) = case 2: sendEth equal to fromAmount + insert fromAmount, (flag 14 mod 3) = case 2: case 2: check "srcToken" balance after swap
|
|
4
|
+
SEND_ETH_EQUAL_TO_FROM_AMOUNT_CHECK_ETH_BALANCE_AFTER_SWAP = 13, // (flag 13 mod 4) = case 1: sendEth equal to fromAmount, (flag 13 mod 3) = case 1: check eth balance after swap
|
|
4
5
|
INSERT_FROM_AMOUNT_CHECK_SRC_TOKEN_BALANCE_AFTER_SWAP = 11, // (flag 11 mod 4) = case 3: insert fromAmount, (flag 11 mod 3) = case 2: check "srcToken" balance after swap
|
|
5
6
|
SEND_ETH_EQUAL_TO_FROM_AMOUNT_DONT_CHECK_BALANCE_AFTER_SWAP = 9, // (flag 9 mod 4) = case 1: sendEth equal to fromAmount, (flag 9 mod 3) = case 0: don't check balance after swap
|
|
6
7
|
DONT_INSERT_FROM_AMOUNT_CHECK_SRC_TOKEN_BALANCE_AFTER_SWAP = 8, // (flag 8 mod 4) = case 0: don't insert fromAmount, (flag 8 mod 3) = case 2: check "srcToken" balance after swap
|
|
@@ -123,6 +123,8 @@ export class GenericSwapTransactionBuilder {
|
|
|
123
123
|
recipient,
|
|
124
124
|
wethDeposit,
|
|
125
125
|
wethWithdraw,
|
|
126
|
+
wethDepositForNeedUnwrapWeth,
|
|
127
|
+
wethWithdrawForNeedUnwrapWeth,
|
|
126
128
|
} = this.getDexCallsParams(
|
|
127
129
|
priceRoute,
|
|
128
130
|
routeIndex,
|
|
@@ -148,6 +150,9 @@ export class GenericSwapTransactionBuilder {
|
|
|
148
150
|
isGlobalDestToken:
|
|
149
151
|
priceRoute.destToken.toLowerCase() ===
|
|
150
152
|
destToken.toLowerCase(),
|
|
153
|
+
priceRoute: priceRoute,
|
|
154
|
+
swap: swap,
|
|
155
|
+
swapExchange: se,
|
|
151
156
|
},
|
|
152
157
|
executorAddress,
|
|
153
158
|
);
|
|
@@ -156,30 +161,47 @@ export class GenericSwapTransactionBuilder {
|
|
|
156
161
|
dexParams,
|
|
157
162
|
wethDeposit,
|
|
158
163
|
wethWithdraw,
|
|
164
|
+
wethDepositForNeedUnwrapWeth,
|
|
165
|
+
wethWithdrawForNeedUnwrapWeth,
|
|
159
166
|
};
|
|
160
167
|
}),
|
|
161
168
|
),
|
|
162
169
|
),
|
|
163
170
|
);
|
|
164
171
|
|
|
165
|
-
const {
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
172
|
+
const {
|
|
173
|
+
exchangeParams,
|
|
174
|
+
srcAmountWethToDeposit,
|
|
175
|
+
destAmountWethToWithdraw,
|
|
176
|
+
srcAmountWethToWithdrawForNeedUnwrapWeth,
|
|
177
|
+
destAmountWethToDepositForNeeUnwrapWeth,
|
|
178
|
+
} = await rawDexParams.reduce<{
|
|
179
|
+
exchangeParams: DexExchangeParam[];
|
|
180
|
+
srcAmountWethToDeposit: bigint;
|
|
181
|
+
destAmountWethToWithdraw: bigint;
|
|
182
|
+
srcAmountWethToWithdrawForNeedUnwrapWeth: bigint;
|
|
183
|
+
destAmountWethToDepositForNeeUnwrapWeth: bigint;
|
|
184
|
+
}>(
|
|
185
|
+
(acc, se) => {
|
|
186
|
+
acc.srcAmountWethToDeposit += BigInt(se.wethDeposit);
|
|
187
|
+
acc.destAmountWethToWithdraw += BigInt(se.wethWithdraw);
|
|
188
|
+
acc.srcAmountWethToWithdrawForNeedUnwrapWeth += BigInt(
|
|
189
|
+
se.wethWithdrawForNeedUnwrapWeth,
|
|
190
|
+
);
|
|
191
|
+
acc.destAmountWethToDepositForNeeUnwrapWeth += BigInt(
|
|
192
|
+
se.wethDepositForNeedUnwrapWeth,
|
|
193
|
+
);
|
|
194
|
+
acc.exchangeParams.push(se.dexParams);
|
|
195
|
+
return acc;
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
exchangeParams: [],
|
|
199
|
+
srcAmountWethToDeposit: 0n,
|
|
200
|
+
destAmountWethToWithdraw: 0n,
|
|
201
|
+
srcAmountWethToWithdrawForNeedUnwrapWeth: 0n,
|
|
202
|
+
destAmountWethToDepositForNeeUnwrapWeth: 0n,
|
|
203
|
+
},
|
|
204
|
+
);
|
|
183
205
|
|
|
184
206
|
const maybeWethCallData = this.getDepositWithdrawWethCallData(
|
|
185
207
|
srcAmountWethToDeposit,
|
|
@@ -187,11 +209,19 @@ export class GenericSwapTransactionBuilder {
|
|
|
187
209
|
side,
|
|
188
210
|
);
|
|
189
211
|
|
|
212
|
+
const maybeWethCallDataForNeedUnwrapWeth =
|
|
213
|
+
this.getDepositWithdrawWethCallData(
|
|
214
|
+
destAmountWethToDepositForNeeUnwrapWeth,
|
|
215
|
+
srcAmountWethToWithdrawForNeedUnwrapWeth,
|
|
216
|
+
side,
|
|
217
|
+
);
|
|
218
|
+
|
|
190
219
|
const buildExchangeParams = await this.addDexExchangeApproveParams(
|
|
191
220
|
bytecodeBuilder,
|
|
192
221
|
priceRoute,
|
|
193
222
|
exchangeParams,
|
|
194
223
|
maybeWethCallData,
|
|
224
|
+
maybeWethCallDataForNeedUnwrapWeth,
|
|
195
225
|
);
|
|
196
226
|
|
|
197
227
|
return bytecodeBuilder.buildByteCode(
|
|
@@ -199,6 +229,7 @@ export class GenericSwapTransactionBuilder {
|
|
|
199
229
|
buildExchangeParams,
|
|
200
230
|
userAddress,
|
|
201
231
|
maybeWethCallData,
|
|
232
|
+
maybeWethCallDataForNeedUnwrapWeth,
|
|
202
233
|
);
|
|
203
234
|
}
|
|
204
235
|
|
|
@@ -599,9 +630,11 @@ export class GenericSwapTransactionBuilder {
|
|
|
599
630
|
destAmount: string;
|
|
600
631
|
wethDeposit: bigint;
|
|
601
632
|
wethWithdraw: bigint;
|
|
633
|
+
wethDepositForNeedUnwrapWeth: bigint;
|
|
634
|
+
wethWithdrawForNeedUnwrapWeth: bigint;
|
|
602
635
|
} {
|
|
603
636
|
const wethAddress =
|
|
604
|
-
this.dexAdapterService.dexHelper.config.data.wrappedNativeTokenAddress;
|
|
637
|
+
this.dexAdapterService.dexHelper.config.data.wrappedNativeTokenAddress.toLowerCase();
|
|
605
638
|
|
|
606
639
|
const side = priceRoute.side;
|
|
607
640
|
|
|
@@ -617,6 +650,9 @@ export class GenericSwapTransactionBuilder {
|
|
|
617
650
|
|
|
618
651
|
let wethWithdraw = 0n;
|
|
619
652
|
|
|
653
|
+
let wethWithdrawForNeedUnwrapWeth = 0n;
|
|
654
|
+
let wethDepositForNeedUnwrapWeth = 0n;
|
|
655
|
+
|
|
620
656
|
// For case of buy apply slippage is applied to srcAmount in equal proportion as the complete swap
|
|
621
657
|
// This assumes that the sum of all swaps srcAmount would sum to priceRoute.srcAmount
|
|
622
658
|
// Also that it is a direct swap.
|
|
@@ -633,7 +669,19 @@ export class GenericSwapTransactionBuilder {
|
|
|
633
669
|
// should work if the final slippage check passes.
|
|
634
670
|
const _destAmount = side === SwapSide.SELL ? '1' : se.destAmount;
|
|
635
671
|
|
|
636
|
-
|
|
672
|
+
const dexNeedWrapNative =
|
|
673
|
+
typeof dex.needWrapNative === 'function'
|
|
674
|
+
? dex.needWrapNative(priceRoute, swap, se)
|
|
675
|
+
: dex.needWrapNative;
|
|
676
|
+
|
|
677
|
+
const dexNeedUnwrapWeth =
|
|
678
|
+
dex.needUnwrapWeth !== undefined
|
|
679
|
+
? typeof dex.needUnwrapWeth === 'function'
|
|
680
|
+
? dex.needUnwrapWeth(priceRoute, swap, se)
|
|
681
|
+
: dex.needUnwrapWeth
|
|
682
|
+
: false;
|
|
683
|
+
|
|
684
|
+
if (isETHAddress(swap.srcToken) && dexNeedWrapNative) {
|
|
637
685
|
_src = wethAddress;
|
|
638
686
|
wethDeposit = BigInt(_srcAmount);
|
|
639
687
|
}
|
|
@@ -641,27 +689,50 @@ export class GenericSwapTransactionBuilder {
|
|
|
641
689
|
const forceUnwrap =
|
|
642
690
|
isETHAddress(swap.destToken) &&
|
|
643
691
|
(isMultiSwap || isMegaSwap) &&
|
|
644
|
-
!
|
|
692
|
+
!dexNeedWrapNative &&
|
|
645
693
|
!isLastSwap;
|
|
646
694
|
|
|
647
|
-
if ((isETHAddress(swap.destToken) &&
|
|
648
|
-
_dest = forceUnwrap && !
|
|
695
|
+
if ((isETHAddress(swap.destToken) && dexNeedWrapNative) || forceUnwrap) {
|
|
696
|
+
_dest = forceUnwrap && !dexNeedWrapNative ? _dest : wethAddress;
|
|
649
697
|
wethWithdraw = BigInt(se.destAmount);
|
|
650
698
|
}
|
|
651
699
|
|
|
700
|
+
if (dexNeedUnwrapWeth) {
|
|
701
|
+
const wethAddr =
|
|
702
|
+
this.dexAdapterService.dexHelper.config.data.wrappedNativeTokenAddress.toLowerCase();
|
|
703
|
+
if (swap.srcToken.toLowerCase() === wethAddr) {
|
|
704
|
+
_src = ETHER_ADDRESS;
|
|
705
|
+
wethWithdrawForNeedUnwrapWeth = BigInt(_srcAmount);
|
|
706
|
+
|
|
707
|
+
if (side === SwapSide.BUY) {
|
|
708
|
+
wethDepositForNeedUnwrapWeth = 1n; // to add wrap after dex call for tokens remainder for buy side cases
|
|
709
|
+
}
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
if (swap.destToken.toLowerCase() === wethAddr) {
|
|
713
|
+
_dest = ETHER_ADDRESS;
|
|
714
|
+
wethDepositForNeedUnwrapWeth = BigInt(se.destAmount); // cant use _destAmount here because _destAmount could be 1
|
|
715
|
+
}
|
|
716
|
+
}
|
|
717
|
+
|
|
652
718
|
const needToWithdrawAfterSwap = _dest === wethAddress && wethWithdraw;
|
|
719
|
+
const needToDepositAfterSwap =
|
|
720
|
+
swap.destToken.toLowerCase() === wethAddress &&
|
|
721
|
+
wethDepositForNeedUnwrapWeth;
|
|
653
722
|
|
|
654
723
|
return {
|
|
655
724
|
srcToken: _src,
|
|
656
725
|
destToken: _dest,
|
|
657
726
|
recipient:
|
|
658
|
-
needToWithdrawAfterSwap || !isLastSwap
|
|
727
|
+
needToWithdrawAfterSwap || !isLastSwap || needToDepositAfterSwap
|
|
659
728
|
? executionContractAddress
|
|
660
729
|
: this.dexAdapterService.dexHelper.config.data.augustusV6Address!,
|
|
661
730
|
srcAmount: _srcAmount,
|
|
662
731
|
destAmount: _destAmount,
|
|
663
732
|
wethDeposit,
|
|
664
733
|
wethWithdraw,
|
|
734
|
+
wethWithdrawForNeedUnwrapWeth,
|
|
735
|
+
wethDepositForNeedUnwrapWeth,
|
|
665
736
|
};
|
|
666
737
|
}
|
|
667
738
|
|
|
@@ -670,6 +741,7 @@ export class GenericSwapTransactionBuilder {
|
|
|
670
741
|
priceRoute: OptimalRate,
|
|
671
742
|
dexExchangeParams: DexExchangeParam[],
|
|
672
743
|
maybeWethCallData?: DepositWithdrawReturn,
|
|
744
|
+
maybeWethCallDataForNeedUnwrapWeth?: DepositWithdrawReturn,
|
|
673
745
|
): Promise<DexExchangeBuildParam[]> {
|
|
674
746
|
const spender = bytecodeBuilder.getAddress();
|
|
675
747
|
const tokenTargetMapping: {
|
|
@@ -262,16 +262,27 @@ export class LocalParaswapSDK implements IParaSwapSDK {
|
|
|
262
262
|
}
|
|
263
263
|
|
|
264
264
|
const { recipient } =
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
265
|
+
priceRoute.version === ParaSwapVersion.V5
|
|
266
|
+
? this.transactionBuilderV5.getDexCallsParams(
|
|
267
|
+
priceRoute,
|
|
268
|
+
routeIndex,
|
|
269
|
+
swap,
|
|
270
|
+
swapIndex,
|
|
271
|
+
se,
|
|
272
|
+
minMaxAmount.toString(),
|
|
273
|
+
dex,
|
|
274
|
+
executionContractAddress,
|
|
275
|
+
)
|
|
276
|
+
: this.transactionBuilder.getDexCallsParams(
|
|
277
|
+
priceRoute,
|
|
278
|
+
routeIndex,
|
|
279
|
+
swap,
|
|
280
|
+
swapIndex,
|
|
281
|
+
se,
|
|
282
|
+
minMaxAmount.toString(),
|
|
283
|
+
dex,
|
|
284
|
+
executionContractAddress,
|
|
285
|
+
);
|
|
275
286
|
|
|
276
287
|
const [preprocessedRoute, txInfo] =
|
|
277
288
|
await dexLibExchange.preProcessTransaction(
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { Logger } from 'log4js';
|
|
2
|
+
import { RequestConfig, Response } from '../../dex-helper/irequest-wrapper';
|
|
3
|
+
import {
|
|
4
|
+
connection as WebSocketConnection,
|
|
5
|
+
client as WebSocketClient,
|
|
6
|
+
} from 'websocket';
|
|
7
|
+
|
|
8
|
+
export class SkippingRequest {
|
|
9
|
+
constructor(public message = '') {}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export type RequestInfo<T> = {
|
|
13
|
+
requestFunc?: (
|
|
14
|
+
options: RequestConfig,
|
|
15
|
+
) => Promise<Response<T> | SkippingRequest>;
|
|
16
|
+
requestOptions: RequestConfig;
|
|
17
|
+
caster: (data: unknown) => T;
|
|
18
|
+
authenticate?: (options: RequestConfig) => RequestConfig;
|
|
19
|
+
excludedFieldsCaching?: string[];
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export type RequestInfoWithHandler<T> = {
|
|
23
|
+
info: RequestInfo<T>;
|
|
24
|
+
handler: (data: T) => void;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export class WebSocketFetcher<T> {
|
|
28
|
+
private requests: RequestInfoWithHandler<T>;
|
|
29
|
+
public lastFetchSucceeded: boolean = false;
|
|
30
|
+
private stop: boolean = true;
|
|
31
|
+
private ws: WebSocketClient = new WebSocketClient();
|
|
32
|
+
private connection: WebSocketConnection | null = null;
|
|
33
|
+
|
|
34
|
+
constructor(requestsInfo: RequestInfoWithHandler<T>, private logger: Logger) {
|
|
35
|
+
this.requests = requestsInfo;
|
|
36
|
+
this.ws.on('connect', this.connected.bind(this));
|
|
37
|
+
this.ws.on('connectFailed', this.connectFailed.bind(this));
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
private connected(connection: WebSocketConnection) {
|
|
41
|
+
this.connection = connection;
|
|
42
|
+
this.logger.info(`Connected to ${this.requests.info.requestOptions.url}`);
|
|
43
|
+
this.connection.on('error', this.onError.bind(this));
|
|
44
|
+
this.connection.on('close', this.onClose.bind(this));
|
|
45
|
+
this.connection.on('message', this.onMessage.bind(this));
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
private connectFailed(error: any) {
|
|
49
|
+
this.logger.error(`Connect Error: ${error.toString()}`);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
private onClose() {
|
|
53
|
+
this.logger.info(`Connection closed`);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
private onError(error: any) {
|
|
57
|
+
this.logger.error(`Connection Error: ${error.toString()}`);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
private onMessage(message: any) {
|
|
61
|
+
if (message.type === 'utf8') {
|
|
62
|
+
const response = JSON.parse(message.utf8Data) as Response<T>;
|
|
63
|
+
const reqInfo = this.requests;
|
|
64
|
+
const info = reqInfo.info;
|
|
65
|
+
const options = reqInfo.info.requestOptions;
|
|
66
|
+
this.logger.debug(`(${options.url}) received new data`);
|
|
67
|
+
|
|
68
|
+
try {
|
|
69
|
+
const parsedData = info.caster(response);
|
|
70
|
+
reqInfo.handler(parsedData);
|
|
71
|
+
} catch (e) {
|
|
72
|
+
this.logger.info(e);
|
|
73
|
+
this.logger.info(
|
|
74
|
+
`(${options.url}) received incorrect data ${JSON.stringify(
|
|
75
|
+
response,
|
|
76
|
+
).replace(/(?:\r\n|\r|\n)/g, ' ')}`,
|
|
77
|
+
e,
|
|
78
|
+
);
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
private connect() {
|
|
85
|
+
const authorization =
|
|
86
|
+
this.requests.info.requestOptions.headers!.authorization;
|
|
87
|
+
const name = this.requests.info.requestOptions.headers!.name;
|
|
88
|
+
if (typeof authorization !== 'string') {
|
|
89
|
+
throw new Error('Authorization header is not a string');
|
|
90
|
+
}
|
|
91
|
+
if (typeof name !== 'string') {
|
|
92
|
+
throw new Error('Name header is not a string');
|
|
93
|
+
}
|
|
94
|
+
this.ws.connect(
|
|
95
|
+
this.requests.info.requestOptions.url!,
|
|
96
|
+
undefined,
|
|
97
|
+
undefined,
|
|
98
|
+
{
|
|
99
|
+
Authorization: authorization,
|
|
100
|
+
name: name,
|
|
101
|
+
},
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
startPolling(): void {
|
|
106
|
+
this.stop = false;
|
|
107
|
+
this.connect();
|
|
108
|
+
this.logger.info(
|
|
109
|
+
`Connection started for ${this.requests.info.requestOptions.url}`,
|
|
110
|
+
);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
stopPolling() {
|
|
114
|
+
if (this.connection) {
|
|
115
|
+
this.connection.close();
|
|
116
|
+
}
|
|
117
|
+
this.stop = true;
|
|
118
|
+
this.logger.info(
|
|
119
|
+
`Connection stopped for ${this.requests.info.requestOptions.url}`,
|
|
120
|
+
);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
isPolling(): boolean {
|
|
124
|
+
return !this.stop;
|
|
125
|
+
}
|
|
126
|
+
}
|
package/src/router/simpleswap.ts
CHANGED
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
TxInfo,
|
|
7
7
|
SimpleExchangeParam,
|
|
8
8
|
} from '../types';
|
|
9
|
-
import { SwapSide } from '../constants';
|
|
9
|
+
import { ETHER_ADDRESS, SwapSide } from '../constants';
|
|
10
10
|
import IParaswapABI from '../abi/IParaswap.json';
|
|
11
11
|
import { Interface } from '@ethersproject/abi';
|
|
12
12
|
import { isETHAddress, uuidToBytes16 } from '../utils';
|
|
@@ -95,9 +95,11 @@ export abstract class SimpleRouterBase<RouterParam>
|
|
|
95
95
|
swap.swapExchanges.map(async se => {
|
|
96
96
|
const dex = this.dexAdapterService.getTxBuilderDexByKey(se.exchange);
|
|
97
97
|
let _src = swap.srcToken;
|
|
98
|
-
let
|
|
98
|
+
let wethDepositForNeedWrapNative = 0n;
|
|
99
|
+
let wethDepositForNeedUnwrapWeth = 0n;
|
|
99
100
|
let _dest = swap.destToken;
|
|
100
|
-
let
|
|
101
|
+
let wethWithdrawForNeedWrapNative = 0n;
|
|
102
|
+
let wethWithdrawForNeedUnwrapWeth = 0n;
|
|
101
103
|
|
|
102
104
|
// For case of buy apply slippage is applied to srcAmount in equal proportion as the complete swap
|
|
103
105
|
// This assumes that the sum of all swaps srcAmount would sum to priceRoute.srcAmount
|
|
@@ -115,13 +117,23 @@ export abstract class SimpleRouterBase<RouterParam>
|
|
|
115
117
|
// should work if the final slippage check passes.
|
|
116
118
|
const _destAmount = this.side === SwapSide.SELL ? '1' : se.destAmount;
|
|
117
119
|
|
|
118
|
-
|
|
120
|
+
const dexNeedWrapNative =
|
|
121
|
+
typeof dex.needWrapNative === 'function'
|
|
122
|
+
? dex.needWrapNative(priceRoute, swap, se)
|
|
123
|
+
: dex.needWrapNative;
|
|
124
|
+
|
|
125
|
+
const dexNeedUnwrapWeth =
|
|
126
|
+
typeof dex.needUnwrapWeth === 'function'
|
|
127
|
+
? dex.needUnwrapWeth(priceRoute, swap, se)
|
|
128
|
+
: dex.needUnwrapWeth;
|
|
129
|
+
|
|
130
|
+
if (dexNeedWrapNative) {
|
|
119
131
|
if (isETHAddress(swap.srcToken)) {
|
|
120
132
|
if (swapIndex !== 0) {
|
|
121
133
|
throw new Error('Wrap native srcToken not in swapIndex 0');
|
|
122
134
|
}
|
|
123
135
|
_src = wethAddress;
|
|
124
|
-
|
|
136
|
+
wethDepositForNeedWrapNative = BigInt(_srcAmount);
|
|
125
137
|
}
|
|
126
138
|
|
|
127
139
|
if (isETHAddress(swap.destToken)) {
|
|
@@ -129,7 +141,21 @@ export abstract class SimpleRouterBase<RouterParam>
|
|
|
129
141
|
throw new Error('Wrap native destToken not in swapIndex last');
|
|
130
142
|
}
|
|
131
143
|
_dest = wethAddress;
|
|
132
|
-
|
|
144
|
+
wethWithdrawForNeedWrapNative = BigInt(_destAmount);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
if (dexNeedUnwrapWeth) {
|
|
149
|
+
const wethAddr =
|
|
150
|
+
this.dexAdapterService.dexHelper.config.data.wrappedNativeTokenAddress.toLowerCase();
|
|
151
|
+
if (swap.srcToken.toLowerCase() === wethAddr) {
|
|
152
|
+
_src = ETHER_ADDRESS;
|
|
153
|
+
wethWithdrawForNeedUnwrapWeth = BigInt(_srcAmount);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
if (swap.destToken.toLowerCase() === wethAddr) {
|
|
157
|
+
_dest = ETHER_ADDRESS;
|
|
158
|
+
wethDepositForNeedUnwrapWeth = BigInt(se.destAmount); // cant use _destAmount here because _destAmount could be 1
|
|
133
159
|
}
|
|
134
160
|
}
|
|
135
161
|
|
|
@@ -144,8 +170,10 @@ export abstract class SimpleRouterBase<RouterParam>
|
|
|
144
170
|
|
|
145
171
|
return {
|
|
146
172
|
simpleParams,
|
|
147
|
-
|
|
148
|
-
|
|
173
|
+
wethDepositForNeedWrapNative,
|
|
174
|
+
wethWithdrawForNeedWrapNative,
|
|
175
|
+
wethWithdrawForNeedUnwrapWeth,
|
|
176
|
+
wethDepositForNeedUnwrapWeth,
|
|
149
177
|
};
|
|
150
178
|
}),
|
|
151
179
|
),
|
|
@@ -153,16 +181,30 @@ export abstract class SimpleRouterBase<RouterParam>
|
|
|
153
181
|
|
|
154
182
|
const {
|
|
155
183
|
simpleExchangeDataList,
|
|
156
|
-
|
|
157
|
-
|
|
184
|
+
srcAmountWethToDepositForNeedWrapNative,
|
|
185
|
+
destAmountWethToWithdrawForNeedWrapNative,
|
|
186
|
+
srcAmountWethToWithdrawForNeedUnwrapWeth,
|
|
187
|
+
destAmountWethToDepositForNeeUnwrapWeth,
|
|
158
188
|
} = rawSimpleParams.reduce<{
|
|
159
189
|
simpleExchangeDataList: SimpleExchangeParam[];
|
|
160
|
-
|
|
161
|
-
|
|
190
|
+
srcAmountWethToDepositForNeedWrapNative: bigint;
|
|
191
|
+
srcAmountWethToWithdrawForNeedUnwrapWeth: bigint;
|
|
192
|
+
destAmountWethToWithdrawForNeedWrapNative: bigint;
|
|
193
|
+
destAmountWethToDepositForNeeUnwrapWeth: bigint;
|
|
162
194
|
}>(
|
|
163
195
|
(acc, se) => {
|
|
164
|
-
acc.
|
|
165
|
-
|
|
196
|
+
acc.srcAmountWethToDepositForNeedWrapNative += BigInt(
|
|
197
|
+
se.wethDepositForNeedWrapNative,
|
|
198
|
+
);
|
|
199
|
+
acc.srcAmountWethToWithdrawForNeedUnwrapWeth += BigInt(
|
|
200
|
+
se.wethWithdrawForNeedUnwrapWeth,
|
|
201
|
+
);
|
|
202
|
+
acc.destAmountWethToWithdrawForNeedWrapNative += BigInt(
|
|
203
|
+
se.wethWithdrawForNeedWrapNative,
|
|
204
|
+
);
|
|
205
|
+
acc.destAmountWethToDepositForNeeUnwrapWeth += BigInt(
|
|
206
|
+
se.wethDepositForNeedUnwrapWeth,
|
|
207
|
+
);
|
|
166
208
|
// V6 doesn't have simpleParams
|
|
167
209
|
if (se.simpleParams) {
|
|
168
210
|
acc.simpleExchangeDataList.push(se.simpleParams);
|
|
@@ -172,8 +214,10 @@ export abstract class SimpleRouterBase<RouterParam>
|
|
|
172
214
|
},
|
|
173
215
|
{
|
|
174
216
|
simpleExchangeDataList: [],
|
|
175
|
-
|
|
176
|
-
|
|
217
|
+
srcAmountWethToDepositForNeedWrapNative: 0n,
|
|
218
|
+
srcAmountWethToWithdrawForNeedUnwrapWeth: 0n,
|
|
219
|
+
destAmountWethToWithdrawForNeedWrapNative: 0n,
|
|
220
|
+
destAmountWethToDepositForNeeUnwrapWeth: 0n,
|
|
177
221
|
},
|
|
178
222
|
);
|
|
179
223
|
|
|
@@ -188,10 +232,16 @@ export abstract class SimpleRouterBase<RouterParam>
|
|
|
188
232
|
);
|
|
189
233
|
|
|
190
234
|
const maybeWethCallData = this.getDepositWithdrawWethCallData(
|
|
191
|
-
|
|
192
|
-
|
|
235
|
+
srcAmountWethToDepositForNeedWrapNative,
|
|
236
|
+
destAmountWethToWithdrawForNeedWrapNative,
|
|
193
237
|
);
|
|
194
238
|
|
|
239
|
+
const maybeWethCallDataForNeedUnwrapWeth =
|
|
240
|
+
this.getDepositWithdrawWethCallData(
|
|
241
|
+
destAmountWethToDepositForNeeUnwrapWeth,
|
|
242
|
+
srcAmountWethToWithdrawForNeedUnwrapWeth,
|
|
243
|
+
);
|
|
244
|
+
|
|
195
245
|
if (maybeWethCallData) {
|
|
196
246
|
if (maybeWethCallData.deposit) {
|
|
197
247
|
simpleExchangeDataFlat.callees.unshift(
|
|
@@ -211,6 +261,32 @@ export abstract class SimpleRouterBase<RouterParam>
|
|
|
211
261
|
}
|
|
212
262
|
}
|
|
213
263
|
|
|
264
|
+
if (maybeWethCallDataForNeedUnwrapWeth) {
|
|
265
|
+
if (maybeWethCallDataForNeedUnwrapWeth.withdraw) {
|
|
266
|
+
simpleExchangeDataFlat.callees.unshift(
|
|
267
|
+
maybeWethCallDataForNeedUnwrapWeth.withdraw.callee,
|
|
268
|
+
);
|
|
269
|
+
simpleExchangeDataFlat.values.unshift(
|
|
270
|
+
maybeWethCallDataForNeedUnwrapWeth.withdraw.value,
|
|
271
|
+
);
|
|
272
|
+
simpleExchangeDataFlat.calldata.unshift(
|
|
273
|
+
maybeWethCallDataForNeedUnwrapWeth.withdraw.calldata,
|
|
274
|
+
);
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
if (maybeWethCallDataForNeedUnwrapWeth.deposit) {
|
|
278
|
+
simpleExchangeDataFlat.callees.push(
|
|
279
|
+
maybeWethCallDataForNeedUnwrapWeth.deposit.callee,
|
|
280
|
+
);
|
|
281
|
+
simpleExchangeDataFlat.values.push(
|
|
282
|
+
maybeWethCallDataForNeedUnwrapWeth.deposit.value,
|
|
283
|
+
);
|
|
284
|
+
simpleExchangeDataFlat.calldata.push(
|
|
285
|
+
maybeWethCallDataForNeedUnwrapWeth.deposit.calldata,
|
|
286
|
+
);
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
|
|
214
290
|
return {
|
|
215
291
|
partialContractSimpleData: this.buildPartialContractSimpleData(
|
|
216
292
|
simpleExchangeDataFlat,
|
package/src/types.ts
CHANGED
|
@@ -159,6 +159,7 @@ export type AdapterExchangeParam = {
|
|
|
159
159
|
|
|
160
160
|
export type DexExchangeParam = {
|
|
161
161
|
needWrapNative: boolean;
|
|
162
|
+
needUnwrapWeth?: boolean;
|
|
162
163
|
skipApproval?: boolean;
|
|
163
164
|
wethAddress?: string;
|
|
164
165
|
exchangeData: string;
|
|
@@ -304,6 +305,7 @@ export type Config = {
|
|
|
304
305
|
uniswapV3EventLoggingSampleRate?: number;
|
|
305
306
|
swaapV2AuthToken?: string;
|
|
306
307
|
dexalotAuthToken?: string;
|
|
308
|
+
bebopAuthToken?: string;
|
|
307
309
|
idleDaoAuthToken?: string;
|
|
308
310
|
forceRpcFallbackDexs: string[];
|
|
309
311
|
apiKeyTheGraph: string;
|
package/tests/constants-e2e.ts
CHANGED
|
@@ -1532,7 +1532,7 @@ export const Holders: {
|
|
|
1532
1532
|
AA_iETHv2: '0xA118aD79E2152b9a3c7Df8B8791887762b0f1D49',
|
|
1533
1533
|
BB_iETHv2: '0x15079cBAa74C1df2a602fAc88Bd5b98B08FfE6A4',
|
|
1534
1534
|
ETH: '0x176F3DAb24a159341c0509bB36B833E7fdd0a132',
|
|
1535
|
-
USDC: '
|
|
1535
|
+
USDC: '0xd8A3c2901b736170b70088a0Df9AA914317d43C6',
|
|
1536
1536
|
USDE: '0x8707f238936c12c309bfc2B9959C35828AcFc512',
|
|
1537
1537
|
AMPL: '0x223592a191ECfC7FDC38a9256c3BD96E771539A9',
|
|
1538
1538
|
WBTC: '0x6daB3bCbFb336b29d06B9C793AEF7eaA57888922',
|
|
@@ -1770,7 +1770,7 @@ export const Holders: {
|
|
|
1770
1770
|
WETH: '0x3368e17064c9ba5d6f1f93c4c678bea00cc78555',
|
|
1771
1771
|
BAL: '0x7b7b957c284c2c227c980d6e2f804311947b84d0',
|
|
1772
1772
|
USDCe: '0x62383739d68dd0f844103db8dfb05a7eded5bbe6',
|
|
1773
|
-
USDC: '
|
|
1773
|
+
USDC: '0x62383739D68Dd0F844103Db8dFb05a7EdED5BBE6',
|
|
1774
1774
|
OHM: '0xebce5f29ff5ca9aa330ebdf7ec6b5f474bff271e',
|
|
1775
1775
|
USDT: '0xf977814e90da44bfa03b6295a0616a897441acec',
|
|
1776
1776
|
POPS: '0x4b78b52e7de4d8b7d367297cb8a87c1875a9d591',
|