@paraswap/dex-lib 3.8.1 → 3.8.3-integral-dex
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/.vscode/launch.json +9 -49
- package/.vscode/settings.json +2 -1
- package/build/abi/Uncompressor.json +250 -0
- package/build/abi/integral/factory.json +333 -0
- package/build/abi/integral/oracle.json +501 -0
- package/build/abi/integral/pool.json +1041 -0
- package/build/abi/{wombat/pool.json → integral/relayer.json} +720 -473
- package/build/abi/oswap/oswap.abi.json +452 -0
- package/build/config.js +1 -1
- package/build/dex/aave-v1/aave-v1.d.ts +1 -2
- package/build/dex/aave-v1/aave-v1.js +0 -23
- package/build/dex/aave-v1/aave-v1.js.map +1 -1
- package/build/dex/compound.js +1 -1
- package/build/dex/compound.js.map +1 -1
- package/build/dex/curve-v1-factory/config.js +10 -47
- package/build/dex/curve-v1-factory/config.js.map +1 -1
- package/build/dex/curve-v1-factory/curve-v1-factory.d.ts +2 -2
- package/build/dex/curve-v1-factory/curve-v1-factory.js +36 -96
- package/build/dex/curve-v1-factory/curve-v1-factory.js.map +1 -1
- package/build/dex/curve-v1-factory/price-handlers/functions/constants.js.map +1 -1
- package/build/dex/curve-v1-factory/price-handlers/functions/get_dx.js +1 -13
- package/build/dex/curve-v1-factory/price-handlers/functions/get_dx.js.map +1 -1
- package/build/dex/curve-v1-factory/state-polling-pools/custom-pool-polling.d.ts +2 -2
- package/build/dex/curve-v1-factory/state-polling-pools/custom-pool-polling.js +1 -1
- package/build/dex/curve-v1-factory/state-polling-pools/custom-pool-polling.js.map +1 -1
- package/build/dex/curve-v1-factory/state-polling-pools/factory-pool-polling.js +1 -1
- package/build/dex/curve-v1-factory/state-polling-pools/factory-pool-polling.js.map +1 -1
- package/build/dex/curve-v1-factory/state-polling-pools/pool-polling-base.d.ts +3 -4
- package/build/dex/curve-v1-factory/state-polling-pools/pool-polling-base.js +9 -24
- package/build/dex/curve-v1-factory/state-polling-pools/pool-polling-base.js.map +1 -1
- package/build/dex/curve-v1-factory/types.d.ts +4 -20
- package/build/dex/curve-v1-factory/types.js +3 -11
- package/build/dex/curve-v1-factory/types.js.map +1 -1
- package/build/dex/curve-v1-stable-ng/config.js +0 -18
- package/build/dex/curve-v1-stable-ng/config.js.map +1 -1
- package/build/dex/etherfi/etherfi.d.ts +26 -0
- package/build/dex/etherfi/etherfi.js +96 -0
- package/build/dex/etherfi/etherfi.js.map +1 -0
- package/build/dex/index.js +21 -3
- package/build/dex/index.js.map +1 -1
- package/build/dex/integral/config.d.ts +4 -0
- package/build/dex/integral/config.js +20 -0
- package/build/dex/integral/config.js.map +1 -0
- package/build/dex/integral/context.d.ts +40 -0
- package/build/dex/integral/context.js +158 -0
- package/build/dex/integral/context.js.map +1 -0
- package/build/dex/integral/helpers.d.ts +17 -0
- package/build/dex/integral/helpers.js +157 -0
- package/build/dex/integral/helpers.js.map +1 -0
- package/build/dex/integral/integral-factory.d.ts +21 -0
- package/build/dex/integral/integral-factory.js +92 -0
- package/build/dex/integral/integral-factory.js.map +1 -0
- package/build/dex/integral/integral-pool.d.ts +46 -0
- package/build/dex/integral/integral-pool.js +143 -0
- package/build/dex/integral/integral-pool.js.map +1 -0
- package/build/dex/integral/integral-pricing.d.ts +18 -0
- package/build/dex/integral/integral-pricing.js +114 -0
- package/build/dex/integral/integral-pricing.js.map +1 -0
- package/build/dex/integral/integral-relayer.d.ts +39 -0
- package/build/dex/integral/integral-relayer.js +189 -0
- package/build/dex/integral/integral-relayer.js.map +1 -0
- package/build/dex/integral/integral-token.d.ts +24 -0
- package/build/dex/integral/integral-token.js +56 -0
- package/build/dex/integral/integral-token.js.map +1 -0
- package/build/dex/integral/integral.d.ts +41 -0
- package/build/dex/integral/integral.js +377 -0
- package/build/dex/integral/integral.js.map +1 -0
- package/build/dex/integral/types.d.ts +84 -0
- package/build/dex/integral/types.js +9 -0
- package/build/dex/integral/types.js.map +1 -0
- package/build/dex/integral/utils-e2e.d.ts +9 -0
- package/build/dex/integral/utils-e2e.js +131 -0
- package/build/dex/integral/utils-e2e.js.map +1 -0
- package/build/dex/integral/utils.d.ts +17 -0
- package/build/dex/integral/utils.js +94 -0
- package/build/dex/integral/utils.js.map +1 -0
- package/build/dex/oswap/config.d.ts +5 -0
- package/build/dex/oswap/config.js +31 -0
- package/build/dex/oswap/config.js.map +1 -0
- package/build/dex/oswap/oswap-pool.d.ts +51 -0
- package/build/dex/oswap/oswap-pool.js +150 -0
- package/build/dex/oswap/oswap-pool.js.map +1 -0
- package/build/dex/oswap/oswap.d.ts +46 -0
- package/build/dex/oswap/oswap.js +266 -0
- package/build/dex/oswap/oswap.js.map +1 -0
- package/build/dex/oswap/types.d.ts +20 -0
- package/build/dex/oswap/types.js +3 -0
- package/build/dex/oswap/types.js.map +1 -0
- package/build/dex/platypus/platypus.d.ts +1 -2
- package/build/dex/platypus/platypus.js +0 -45
- package/build/dex/platypus/platypus.js.map +1 -1
- package/build/dex/sdai/config.d.ts +11 -0
- package/build/dex/sdai/config.js +21 -0
- package/build/dex/sdai/config.js.map +1 -0
- package/build/dex/sdai/constants.d.ts +2 -0
- package/build/dex/sdai/constants.js +6 -0
- package/build/dex/sdai/constants.js.map +1 -0
- package/build/dex/sdai/scripts/validate-state.js +102 -0
- package/build/dex/sdai/scripts/validate-state.js.map +1 -0
- package/build/dex/sdai/sdai-pool.d.ts +16 -0
- package/build/dex/sdai/sdai-pool.js +85 -0
- package/build/dex/sdai/sdai-pool.js.map +1 -0
- package/build/dex/sdai/sdai.d.ts +51 -0
- package/build/dex/sdai/sdai.js +172 -0
- package/build/dex/sdai/sdai.js.map +1 -0
- package/build/dex/sdai/types.d.ts +21 -0
- package/build/dex/sdai/types.js +11 -0
- package/build/dex/sdai/types.js.map +1 -0
- package/build/dex/sdai/utils.d.ts +4 -0
- package/build/dex/sdai/utils.js +39 -0
- package/build/dex/sdai/utils.js.map +1 -0
- package/build/dex/stable-pool.js +8 -1
- package/build/dex/stable-pool.js.map +1 -1
- package/build/dex/swaap-v1/swaap-v1.d.ts +1 -2
- package/build/dex/swaap-v1/swaap-v1.js +0 -14
- package/build/dex/swaap-v1/swaap-v1.js.map +1 -1
- package/build/dex/uniswap-v3/contract-math/Oracle.js +4 -4
- package/build/dex/uniswap-v3/contract-math/Oracle.js.map +1 -1
- package/build/executor/compressor/Compressor.d.ts +23 -0
- package/build/executor/compressor/Compressor.js +144 -0
- package/build/executor/compressor/Compressor.js.map +1 -0
- package/build/executor/compressor/compress.d.ts +17 -0
- package/build/executor/compressor/compress.js +187 -0
- package/build/executor/compressor/compress.js.map +1 -0
- package/build/executor/compressor/compress_functions/addressSubstitution.d.ts +6 -0
- package/build/executor/compressor/compress_functions/addressSubstitution.js +29 -0
- package/build/executor/compressor/compress_functions/addressSubstitution.js.map +1 -0
- package/build/executor/compressor/compress_functions/addressSubstitutionFromObject.d.ts +10 -0
- package/build/executor/compressor/compress_functions/addressSubstitutionFromObject.js +40 -0
- package/build/executor/compressor/compress_functions/addressSubstitutionFromObject.js.map +1 -0
- package/build/executor/compressor/compress_functions/byteSubstitution.d.ts +11 -0
- package/build/executor/compressor/compress_functions/byteSubstitution.js +64 -0
- package/build/executor/compressor/compress_functions/byteSubstitution.js.map +1 -0
- package/build/executor/compressor/compress_functions/ffSubstitution.d.ts +7 -0
- package/build/executor/compressor/compress_functions/ffSubstitution.js +54 -0
- package/build/executor/compressor/compress_functions/ffSubstitution.js.map +1 -0
- package/build/executor/compressor/compress_functions/findLongestAndSubstitute.d.ts +8 -0
- package/build/executor/compressor/compress_functions/findLongestAndSubstitute.js +67 -0
- package/build/executor/compressor/compress_functions/findLongestAndSubstitute.js.map +1 -0
- package/build/executor/compressor/compress_functions/findLongestAndSubstitute_old.d.ts +8 -0
- package/build/executor/compressor/compress_functions/findLongestAndSubstitute_old.js +61 -0
- package/build/executor/compressor/compress_functions/findLongestAndSubstitute_old.js.map +1 -0
- package/build/executor/compressor/compress_functions/reverseAddressSubstitution.d.ts +6 -0
- package/build/executor/compressor/compress_functions/reverseAddressSubstitution.js +37 -0
- package/build/executor/compressor/compress_functions/reverseAddressSubstitution.js.map +1 -0
- package/build/executor/compressor/compress_functions/searchUnusedBytes.d.ts +9 -0
- package/build/executor/compressor/compress_functions/searchUnusedBytes.js +33 -0
- package/build/executor/compressor/compress_functions/searchUnusedBytes.js.map +1 -0
- package/build/executor/compressor/fetchSaved.js +17 -0
- package/build/executor/compressor/fetchSaved.js.map +1 -0
- package/build/executor/compressor/utils/computeCostL2.d.ts +2 -0
- package/build/executor/compressor/utils/computeCostL2.js +14 -0
- package/build/executor/compressor/utils/computeCostL2.js.map +1 -0
- package/build/executor/compressor/utils/findLongestDuplicatedString.d.ts +2 -0
- package/build/executor/compressor/utils/findLongestDuplicatedString.js +30 -0
- package/build/executor/compressor/utils/findLongestDuplicatedString.js.map +1 -0
- package/build/executor/compressor/utils/getAllIndexes.d.ts +2 -0
- package/build/executor/compressor/utils/getAllIndexes.js +12 -0
- package/build/executor/compressor/utils/getAllIndexes.js.map +1 -0
- package/build/executor/compressor/utils/getByteForAddress.d.ts +2 -0
- package/build/executor/compressor/utils/getByteForAddress.js +14 -0
- package/build/executor/compressor/utils/getByteForAddress.js.map +1 -0
- package/build/executor/compressor/utils/intTo2Bytes.d.ts +2 -0
- package/build/executor/compressor/utils/intTo2Bytes.js +14 -0
- package/build/executor/compressor/utils/intTo2Bytes.js.map +1 -0
- package/build/executor/compressor/utils/intTo3Bytes.d.ts +2 -0
- package/build/executor/compressor/utils/intTo3Bytes.js +18 -0
- package/build/executor/compressor/utils/intTo3Bytes.js.map +1 -0
- package/build/executor/compressor/utils/intToByte.d.ts +2 -0
- package/build/executor/compressor/utils/intToByte.js +10 -0
- package/build/executor/compressor/utils/intToByte.js.map +1 -0
- package/build/generic-swap-transaction-builder.js +3 -1
- package/build/generic-swap-transaction-builder.js.map +1 -1
- package/build/router/simpleswap.js +3 -1
- package/build/router/simpleswap.js.map +1 -1
- package/package.json +2 -2
- package/src/abi/BProtocol.json +1155 -0
- package/src/abi/Jarvis.json +1172 -0
- package/src/abi/MStableAsset.json +1545 -0
- package/src/abi/OneInchLp.json +1304 -0
- package/src/abi/Onebit.json +736 -0
- package/src/abi/Shell.json +1294 -0
- package/src/abi/TraderJoeV2Router.json +50 -0
- package/src/abi/integral/factory.json +333 -0
- package/src/abi/integral/oracle.json +501 -0
- package/src/abi/integral/pool.json +1041 -0
- package/src/abi/integral/relayer.json +1536 -0
- package/src/abi/zrx.v2.json +1967 -0
- package/src/abi/zrx.v3.json +3454 -0
- package/src/abi/zrx.v4.json +2193 -0
- package/src/config.ts +1 -1
- package/src/dex/OneInchLp.ts +84 -0
- package/src/dex/bProtocol/bProtocol-e2e.test.ts +93 -0
- package/src/dex/bProtocol/bProtocol.ts +108 -0
- package/src/dex/bProtocol/types.ts +13 -0
- package/src/dex/curve-v1-factory/config.ts +10 -47
- package/src/dex/curve-v1-factory/curve-v1-factory-e2e.test.ts +16 -92
- package/src/dex/curve-v1-factory/curve-v1-factory-integration.test.ts +5 -125
- package/src/dex/curve-v1-factory/curve-v1-factory.ts +45 -137
- package/src/dex/curve-v1-factory/price-handlers/functions/constants.ts +2 -0
- package/src/dex/curve-v1-factory/price-handlers/functions/get_dx.ts +1 -24
- package/src/dex/curve-v1-factory/state-polling-pools/custom-pool-polling.ts +2 -3
- package/src/dex/curve-v1-factory/state-polling-pools/factory-pool-polling.ts +0 -1
- package/src/dex/curve-v1-factory/state-polling-pools/pool-polling-base.ts +10 -31
- package/src/dex/curve-v1-factory/types.ts +6 -22
- package/src/dex/curve-v1-stable-ng/config.ts +0 -18
- package/src/dex/curve-v1-stable-ng/curve-v1-stable-ng-e2e.test.ts +0 -17
- package/src/dex/index.ts +20 -3
- package/src/dex/integral/config.ts +20 -0
- package/src/dex/integral/context.ts +287 -0
- package/src/dex/integral/integral-e2e.test.ts +86 -0
- package/src/dex/integral/integral-events.test.ts +412 -0
- package/src/dex/integral/integral-factory.ts +146 -0
- package/src/dex/integral/integral-integration.test.ts +221 -0
- package/src/dex/integral/integral-pool.ts +198 -0
- package/src/dex/integral/integral-pricing.ts +190 -0
- package/src/dex/integral/integral-relayer.ts +285 -0
- package/src/dex/integral/integral-token.ts +95 -0
- package/src/dex/integral/integral.ts +523 -0
- package/src/dex/integral/test-artifacts/configs.json +1 -0
- package/src/dex/integral/test-artifacts/logs.json +1 -0
- package/src/dex/integral/test-artifacts/states.json +1 -0
- package/src/dex/integral/types.ts +88 -0
- package/src/dex/integral/utils-e2e.ts +194 -0
- package/src/dex/integral/utils.ts +146 -0
- package/src/dex/jarvis.ts +262 -0
- package/src/dex/mStable.ts +147 -0
- package/src/dex/onebit/onebit.ts +113 -0
- package/src/dex/onebit/types.ts +17 -0
- package/src/dex/shell.ts +84 -0
- package/src/dex/trader-joe-v2.ts +148 -0
- package/src/dex/uniswap-v3/contract-math/Oracle.ts +5 -4
- package/src/dex/zerox/config.ts +31 -0
- package/src/dex/zerox/index.ts +328 -0
- package/src/dex/zerox/order.ts +62 -0
- package/src/dex/zerox/types.ts +82 -0
- package/src/dex/zerox/zerox-e2e.test.ts +110 -0
- package/src/generic-swap-transaction-builder.ts +3 -1
- package/src/router/simpleswap.ts +3 -1
- package/tests/constants-e2e.ts +1 -1
- package/tests/utils-e2e.ts +0 -2
- package/.vscode/tasks.json +0 -15
- package/build/abi/uniswap-v3/AlienBaseV3Router.abi.json +0 -52
- package/build/dex/aave-v2/tokens-avalanche.json +0 -44
- package/build/dex/aave-v2/tokens-mainnet.json +0 -188
- package/build/dex/aave-v2/tokens-polygon.json +0 -44
- package/build/dex/maker-psm/scripts/gem.abi.json +0 -136
- package/build/dex/maker-psm/scripts/validate-state.js +0 -185
- package/build/dex/maker-psm/scripts/validate-state.js.map +0 -1
- package/build/dex/maker-psm/scripts/vat.abi.json +0 -243
- package/build/dex/solidly-v3/scripts/check-event-pool-event.js +0 -53
- package/build/dex/solidly-v3/scripts/check-event-pool-event.js.map +0 -1
- package/build/dex/uniswap-v3/forks/alien-base-v3/alien-base-v3.d.ts +0 -17
- package/build/dex/uniswap-v3/forks/alien-base-v3/alien-base-v3.js +0 -64
- package/build/dex/uniswap-v3/forks/alien-base-v3/alien-base-v3.js.map +0 -1
- package/build/dex/uniswap-v3/forks/alien-v3/alien-v3.d.ts +0 -17
- package/build/dex/uniswap-v3/forks/alien-v3/alien-v3.js +0 -79
- package/build/dex/uniswap-v3/forks/alien-v3/alien-v3.js.map +0 -1
- package/src/abi/curve-v1-factory/CurveV1Router.abi.json +0 -331
- package/src/dex/curve-v1-factory/optimizer.ts +0 -61
- /package/build/dex/{solidly-v3/scripts/check-event-pool-event.d.ts → sdai/scripts/validate-state.d.ts} +0 -0
- /package/build/{dex/maker-psm/scripts/validate-state.d.ts → executor/compressor/fetchSaved.d.ts} +0 -0
package/src/config.ts
CHANGED
|
@@ -228,7 +228,7 @@ const baseConfigs: { [network: number]: BaseConfig } = {
|
|
|
228
228
|
adapterAddresses: {
|
|
229
229
|
AvalancheAdapter01: '0x745Ec73855CeC7249E5fF4c9DD81cc65b4D297a9',
|
|
230
230
|
AvalancheAdapter02: '0xA10c9a84E72d9DfF424Fe2284B6460784bed407E',
|
|
231
|
-
AvalancheBuyAdapter: '
|
|
231
|
+
AvalancheBuyAdapter: '0x654dE10890f8B2C5bF54E50Af169a7E93165C416',
|
|
232
232
|
},
|
|
233
233
|
uniswapV2ExchangeRouterAddress:
|
|
234
234
|
'0x53e693c6C7FFC4446c53B205Cf513105Bf140D7b',
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { Interface, JsonFragment } from '@ethersproject/abi';
|
|
2
|
+
import { NULL_ADDRESS, SwapSide } from '../constants';
|
|
3
|
+
import { AdapterExchangeParam, Address, SimpleExchangeParam } from '../types';
|
|
4
|
+
import { IDexTxBuilder } from './idex';
|
|
5
|
+
import { SimpleExchange } from './simple-exchange';
|
|
6
|
+
import OneInchLpABI from '../abi/OneInchLp.json';
|
|
7
|
+
import { isETHAddress } from '../utils';
|
|
8
|
+
import Web3 from 'web3';
|
|
9
|
+
import { IDexHelper } from '../dex-helper';
|
|
10
|
+
|
|
11
|
+
export type OneInchLpData = {
|
|
12
|
+
exchange: string; // _DOUBLE_CHECK_
|
|
13
|
+
};
|
|
14
|
+
type OneInchLpParam = [
|
|
15
|
+
src: string,
|
|
16
|
+
dst: string,
|
|
17
|
+
amount: string,
|
|
18
|
+
minReturn: string,
|
|
19
|
+
referral: string,
|
|
20
|
+
];
|
|
21
|
+
enum OneInchLpFunctions {
|
|
22
|
+
swap = 'swap',
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export class OneInchLp
|
|
26
|
+
extends SimpleExchange
|
|
27
|
+
implements IDexTxBuilder<OneInchLpData, OneInchLpParam>
|
|
28
|
+
{
|
|
29
|
+
static dexKeys = ['oneinchlp'];
|
|
30
|
+
exchangeRouterInterface: Interface;
|
|
31
|
+
|
|
32
|
+
constructor(dexHelper: IDexHelper) {
|
|
33
|
+
super(dexHelper, 'oneinchlp');
|
|
34
|
+
this.exchangeRouterInterface = new Interface(
|
|
35
|
+
OneInchLpABI as JsonFragment[],
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
getAdapterParam(
|
|
40
|
+
srcToken: string,
|
|
41
|
+
destToken: string,
|
|
42
|
+
srcAmount: string,
|
|
43
|
+
destAmount: string,
|
|
44
|
+
data: OneInchLpData,
|
|
45
|
+
side: SwapSide,
|
|
46
|
+
): AdapterExchangeParam {
|
|
47
|
+
return {
|
|
48
|
+
targetExchange: data.exchange,
|
|
49
|
+
payload: '0x',
|
|
50
|
+
networkFee: '0',
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
async getSimpleParam(
|
|
55
|
+
srcToken: string,
|
|
56
|
+
destToken: string,
|
|
57
|
+
srcAmount: string,
|
|
58
|
+
destAmount: string,
|
|
59
|
+
data: OneInchLpData,
|
|
60
|
+
side: SwapSide,
|
|
61
|
+
): Promise<SimpleExchangeParam> {
|
|
62
|
+
const swapFunction = OneInchLpFunctions.swap;
|
|
63
|
+
const swapFunctionParams: OneInchLpParam = [
|
|
64
|
+
isETHAddress(srcToken) ? NULL_ADDRESS : srcToken,
|
|
65
|
+
isETHAddress(destToken) ? NULL_ADDRESS : destToken,
|
|
66
|
+
srcAmount,
|
|
67
|
+
destAmount,
|
|
68
|
+
NULL_ADDRESS,
|
|
69
|
+
];
|
|
70
|
+
const swapData = this.exchangeRouterInterface.encodeFunctionData(
|
|
71
|
+
swapFunction,
|
|
72
|
+
swapFunctionParams,
|
|
73
|
+
);
|
|
74
|
+
|
|
75
|
+
return this.buildSimpleParamWithoutWETHConversion(
|
|
76
|
+
srcToken,
|
|
77
|
+
srcAmount,
|
|
78
|
+
destToken,
|
|
79
|
+
destAmount,
|
|
80
|
+
swapData,
|
|
81
|
+
data.exchange,
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import dotenv from 'dotenv';
|
|
2
|
+
dotenv.config();
|
|
3
|
+
|
|
4
|
+
import { testE2E } from '../../../tests/utils-e2e';
|
|
5
|
+
import {
|
|
6
|
+
Tokens,
|
|
7
|
+
Holders,
|
|
8
|
+
NativeTokenSymbols,
|
|
9
|
+
} from '../../../tests/constants-e2e';
|
|
10
|
+
|
|
11
|
+
import { ContractMethod, Network, SwapSide } from '../../constants';
|
|
12
|
+
import { StaticJsonRpcProvider } from '@ethersproject/providers';
|
|
13
|
+
import { generateConfig } from '../../config';
|
|
14
|
+
|
|
15
|
+
const dexKey = 'bprotocol';
|
|
16
|
+
|
|
17
|
+
// ! LIQUIDITY ISSUES
|
|
18
|
+
|
|
19
|
+
const testForNetwork = (
|
|
20
|
+
network: Network,
|
|
21
|
+
swapMap: Map<SwapSide, ContractMethod[]>,
|
|
22
|
+
) => {
|
|
23
|
+
const tokens = Tokens[network];
|
|
24
|
+
const holders = Holders[network];
|
|
25
|
+
|
|
26
|
+
const nativeSymbol = NativeTokenSymbols[network];
|
|
27
|
+
|
|
28
|
+
const provider = new StaticJsonRpcProvider(
|
|
29
|
+
generateConfig(network).privateHttpProvider,
|
|
30
|
+
network,
|
|
31
|
+
);
|
|
32
|
+
|
|
33
|
+
const tokensToTest = [
|
|
34
|
+
[
|
|
35
|
+
{
|
|
36
|
+
symbol: 'LUSD',
|
|
37
|
+
amount: '100000000000000000000',
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
symbol: 'ETH',
|
|
41
|
+
amount: '35360886801038522',
|
|
42
|
+
},
|
|
43
|
+
],
|
|
44
|
+
];
|
|
45
|
+
|
|
46
|
+
swapMap.forEach((contractMethods, side) =>
|
|
47
|
+
contractMethods.forEach((contractMethod: string) => {
|
|
48
|
+
tokensToTest.forEach(pair => {
|
|
49
|
+
describe(`${contractMethod}`, () => {
|
|
50
|
+
it(`${pair[0].symbol} -> ${pair[1].symbol}`, async () => {
|
|
51
|
+
await testE2E(
|
|
52
|
+
tokens[pair[0].symbol],
|
|
53
|
+
tokens[pair[1].symbol],
|
|
54
|
+
holders[pair[0].symbol],
|
|
55
|
+
side === SwapSide.SELL ? pair[0].amount : pair[1].amount,
|
|
56
|
+
side,
|
|
57
|
+
dexKey,
|
|
58
|
+
contractMethod as any,
|
|
59
|
+
network,
|
|
60
|
+
provider,
|
|
61
|
+
);
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
it(`${nativeSymbol} -> ${pair[0].symbol}`, async () => {
|
|
65
|
+
await testE2E(
|
|
66
|
+
tokens[nativeSymbol],
|
|
67
|
+
tokens[pair[0].symbol],
|
|
68
|
+
holders[nativeSymbol],
|
|
69
|
+
side === SwapSide.SELL ? '1000000000000000000' : pair[0].amount,
|
|
70
|
+
side,
|
|
71
|
+
dexKey,
|
|
72
|
+
contractMethod as any,
|
|
73
|
+
network,
|
|
74
|
+
provider,
|
|
75
|
+
);
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
});
|
|
79
|
+
}),
|
|
80
|
+
);
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
// Ensure you have the E2E_ENDPOINT_URL env variable set.
|
|
84
|
+
|
|
85
|
+
describe('bProtocol E2E', () => {
|
|
86
|
+
describe('Mainnet V6', () => {
|
|
87
|
+
const swapMap = new Map<SwapSide, ContractMethod[]>([
|
|
88
|
+
[SwapSide.SELL, [ContractMethod.swapExactAmountIn]],
|
|
89
|
+
]);
|
|
90
|
+
|
|
91
|
+
testForNetwork(Network.MAINNET, swapMap);
|
|
92
|
+
});
|
|
93
|
+
});
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { Interface, JsonFragment } from '@ethersproject/abi';
|
|
2
|
+
import { SwapSide } from '../../constants';
|
|
3
|
+
import {
|
|
4
|
+
AdapterExchangeParam,
|
|
5
|
+
Address,
|
|
6
|
+
DexExchangeParam,
|
|
7
|
+
NumberAsString,
|
|
8
|
+
SimpleExchangeParam,
|
|
9
|
+
} from '../../types';
|
|
10
|
+
import { IDexTxBuilder } from '../idex';
|
|
11
|
+
import { SimpleExchange } from '../simple-exchange';
|
|
12
|
+
import BProtocolABI from '../../abi/BProtocol.json';
|
|
13
|
+
import { IDexHelper } from '../../dex-helper';
|
|
14
|
+
import { BProtocolData, BProtocolFunctions, BProtocolParam } from './types';
|
|
15
|
+
import { extractReturnAmountPosition } from '../../executor/utils';
|
|
16
|
+
|
|
17
|
+
export class BProtocol
|
|
18
|
+
extends SimpleExchange
|
|
19
|
+
implements IDexTxBuilder<BProtocolData, BProtocolParam>
|
|
20
|
+
{
|
|
21
|
+
static dexKeys = ['bprotocol'];
|
|
22
|
+
exchangeRouterInterface: Interface;
|
|
23
|
+
|
|
24
|
+
constructor(dexHelper: IDexHelper) {
|
|
25
|
+
super(dexHelper, 'bprotocol');
|
|
26
|
+
this.exchangeRouterInterface = new Interface(
|
|
27
|
+
BProtocolABI as JsonFragment[],
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
getAdapterParam(
|
|
32
|
+
srcToken: string,
|
|
33
|
+
destToken: string,
|
|
34
|
+
srcAmount: string,
|
|
35
|
+
destAmount: string,
|
|
36
|
+
data: BProtocolData,
|
|
37
|
+
side: SwapSide,
|
|
38
|
+
): AdapterExchangeParam {
|
|
39
|
+
return {
|
|
40
|
+
targetExchange: data.exchange,
|
|
41
|
+
payload: '0x',
|
|
42
|
+
networkFee: '0',
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
async getSimpleParam(
|
|
47
|
+
srcToken: string,
|
|
48
|
+
destToken: string,
|
|
49
|
+
srcAmount: string,
|
|
50
|
+
destAmount: string,
|
|
51
|
+
data: BProtocolData,
|
|
52
|
+
side: SwapSide,
|
|
53
|
+
): Promise<SimpleExchangeParam> {
|
|
54
|
+
const swapFunction = BProtocolFunctions.swap;
|
|
55
|
+
const swapFunctionParams: BProtocolParam = [
|
|
56
|
+
srcAmount,
|
|
57
|
+
destAmount,
|
|
58
|
+
this.augustusAddress,
|
|
59
|
+
];
|
|
60
|
+
const swapData = this.exchangeRouterInterface.encodeFunctionData(
|
|
61
|
+
swapFunction,
|
|
62
|
+
swapFunctionParams,
|
|
63
|
+
);
|
|
64
|
+
|
|
65
|
+
return this.buildSimpleParamWithoutWETHConversion(
|
|
66
|
+
srcToken,
|
|
67
|
+
srcAmount,
|
|
68
|
+
destToken,
|
|
69
|
+
destAmount,
|
|
70
|
+
swapData,
|
|
71
|
+
data.exchange,
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
getDexParam(
|
|
76
|
+
_srcToken: Address,
|
|
77
|
+
_destToken: Address,
|
|
78
|
+
srcAmount: NumberAsString,
|
|
79
|
+
destAmount: NumberAsString,
|
|
80
|
+
recipient: Address,
|
|
81
|
+
data: BProtocolData,
|
|
82
|
+
_side: SwapSide,
|
|
83
|
+
): DexExchangeParam {
|
|
84
|
+
const swapFunction = BProtocolFunctions.swap;
|
|
85
|
+
const swapFunctionParams: BProtocolParam = [
|
|
86
|
+
srcAmount,
|
|
87
|
+
destAmount,
|
|
88
|
+
recipient,
|
|
89
|
+
];
|
|
90
|
+
const swapData = this.exchangeRouterInterface.encodeFunctionData(
|
|
91
|
+
swapFunction,
|
|
92
|
+
swapFunctionParams,
|
|
93
|
+
);
|
|
94
|
+
return {
|
|
95
|
+
needWrapNative: this.needWrapNative,
|
|
96
|
+
dexFuncHasRecipient: true,
|
|
97
|
+
exchangeData: swapData,
|
|
98
|
+
targetExchange: data.exchange,
|
|
99
|
+
returnAmountPos:
|
|
100
|
+
_side === SwapSide.SELL
|
|
101
|
+
? extractReturnAmountPosition(
|
|
102
|
+
this.exchangeRouterInterface,
|
|
103
|
+
swapFunction,
|
|
104
|
+
)
|
|
105
|
+
: undefined,
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
}
|
|
@@ -25,7 +25,6 @@ const CurveV1FactoryConfig: DexConfigMap<DexParams> = {
|
|
|
25
25
|
maxPlainCoins: FACTORY_MAX_PLAIN_COINS,
|
|
26
26
|
},
|
|
27
27
|
],
|
|
28
|
-
router: '0x16C6521Dff6baB339122a0FE25a9116693265353', // https://github.com/curvefi/curve-router-ng
|
|
29
28
|
stateUpdatePeriodMs: 5 * 1000,
|
|
30
29
|
disabledPools: new Set([
|
|
31
30
|
'0x28B0Cf1baFB707F2c6826d10caf6DD901a6540C5', // It is rug pool token
|
|
@@ -222,8 +221,11 @@ const CurveV1FactoryConfig: DexConfigMap<DexParams> = {
|
|
|
222
221
|
address: '0x722272D36ef0Da72FF51c5A65Db7b870E2e8D4ee',
|
|
223
222
|
maxPlainCoins: FACTORY_MAX_PLAIN_COINS,
|
|
224
223
|
},
|
|
224
|
+
{
|
|
225
|
+
address: '0x1764ee18e8B3ccA4787249Ceb249356192594585', // factory stable ng
|
|
226
|
+
isStableNg: true,
|
|
227
|
+
},
|
|
225
228
|
],
|
|
226
|
-
router: '0x0DCDED3545D565bA3B19E683431381007245d983', // https://github.com/curvefi/curve-router-ng
|
|
227
229
|
stateUpdatePeriodMs: 2 * 1000,
|
|
228
230
|
disabledPools: new Set([
|
|
229
231
|
'0x666Dc3b4baBfd063FaF965BD020024AF0dC51B64',
|
|
@@ -335,7 +337,6 @@ const CurveV1FactoryConfig: DexConfigMap<DexParams> = {
|
|
|
335
337
|
maxPlainCoins: FACTORY_MAX_PLAIN_COINS,
|
|
336
338
|
},
|
|
337
339
|
],
|
|
338
|
-
router: '0x0DCDED3545D565bA3B19E683431381007245d983', // https://github.com/curvefi/curve-router-ng
|
|
339
340
|
stateUpdatePeriodMs: 2 * 1000,
|
|
340
341
|
disabledPools: new Set([]),
|
|
341
342
|
disabledImplementations: new Set([]),
|
|
@@ -456,7 +457,6 @@ const CurveV1FactoryConfig: DexConfigMap<DexParams> = {
|
|
|
456
457
|
maxPlainCoins: FACTORY_MAX_PLAIN_COINS,
|
|
457
458
|
},
|
|
458
459
|
],
|
|
459
|
-
router: '0x0DCDED3545D565bA3B19E683431381007245d983', // https://github.com/curvefi/curve-router-ng
|
|
460
460
|
stateUpdatePeriodMs: 2 * 1000,
|
|
461
461
|
// FIX: This must be removed when we go for full CurveV1 event based support
|
|
462
462
|
disabledPools: new Set(['0x16a7da911a4dd1d83f3ff066fe28f3c792c50d90']),
|
|
@@ -543,7 +543,6 @@ const CurveV1FactoryConfig: DexConfigMap<DexParams> = {
|
|
|
543
543
|
maxPlainCoins: FACTORY_MAX_PLAIN_COINS,
|
|
544
544
|
},
|
|
545
545
|
],
|
|
546
|
-
router: '0x2191718CD32d02B8E60BAdFFeA33E4B5DD9A0A0D', // https://github.com/curvefi/curve-router-ng
|
|
547
546
|
stateUpdatePeriodMs: 2 * 1000,
|
|
548
547
|
disabledPools: new Set([]),
|
|
549
548
|
disabledImplementations: new Set([]),
|
|
@@ -675,7 +674,6 @@ const CurveV1FactoryConfig: DexConfigMap<DexParams> = {
|
|
|
675
674
|
maxPlainCoins: FACTORY_MAX_PLAIN_COINS,
|
|
676
675
|
},
|
|
677
676
|
],
|
|
678
|
-
router: '0x0DCDED3545D565bA3B19E683431381007245d983', // https://github.com/curvefi/curve-router-ng
|
|
679
677
|
stateUpdatePeriodMs: 2 * 1000,
|
|
680
678
|
disabledPools: new Set([]),
|
|
681
679
|
disabledImplementations: new Set([]),
|
|
@@ -788,7 +786,6 @@ const CurveV1FactoryConfig: DexConfigMap<DexParams> = {
|
|
|
788
786
|
maxPlainCoins: FACTORY_MAX_PLAIN_COINS,
|
|
789
787
|
},
|
|
790
788
|
],
|
|
791
|
-
router: '0x4f37A9d177470499A2dD084621020b023fcffc1F', // https://github.com/curvefi/curve-router-ng
|
|
792
789
|
stateUpdatePeriodMs: 2 * 1000,
|
|
793
790
|
disabledPools: new Set([]),
|
|
794
791
|
disabledImplementations: new Set([]),
|
|
@@ -827,10 +824,13 @@ export const Adapters: Record<number, AdapterMappings> = {
|
|
|
827
824
|
index: 3,
|
|
828
825
|
},
|
|
829
826
|
],
|
|
830
|
-
|
|
827
|
+
},
|
|
828
|
+
[Network.BSC]: {
|
|
829
|
+
[SwapSide.SELL]: [
|
|
830
|
+
// use for beltfi (deprecated)
|
|
831
831
|
{
|
|
832
|
-
name: '
|
|
833
|
-
index:
|
|
832
|
+
name: 'BscAdapter01',
|
|
833
|
+
index: 2,
|
|
834
834
|
},
|
|
835
835
|
],
|
|
836
836
|
},
|
|
@@ -841,12 +841,6 @@ export const Adapters: Record<number, AdapterMappings> = {
|
|
|
841
841
|
index: 3,
|
|
842
842
|
},
|
|
843
843
|
],
|
|
844
|
-
[SwapSide.BUY]: [
|
|
845
|
-
{
|
|
846
|
-
name: 'PolygonBuyAdapter',
|
|
847
|
-
index: 10,
|
|
848
|
-
},
|
|
849
|
-
],
|
|
850
844
|
},
|
|
851
845
|
[Network.AVALANCHE]: {
|
|
852
846
|
[SwapSide.SELL]: [
|
|
@@ -855,12 +849,6 @@ export const Adapters: Record<number, AdapterMappings> = {
|
|
|
855
849
|
index: 5,
|
|
856
850
|
},
|
|
857
851
|
],
|
|
858
|
-
[SwapSide.BUY]: [
|
|
859
|
-
{
|
|
860
|
-
name: 'AvalancheBuyAdapter',
|
|
861
|
-
index: 9,
|
|
862
|
-
},
|
|
863
|
-
],
|
|
864
852
|
},
|
|
865
853
|
[Network.FANTOM]: {
|
|
866
854
|
[SwapSide.SELL]: [
|
|
@@ -869,12 +857,6 @@ export const Adapters: Record<number, AdapterMappings> = {
|
|
|
869
857
|
index: 3,
|
|
870
858
|
},
|
|
871
859
|
],
|
|
872
|
-
[SwapSide.BUY]: [
|
|
873
|
-
{
|
|
874
|
-
name: 'FantomBuyAdapter',
|
|
875
|
-
index: 6,
|
|
876
|
-
},
|
|
877
|
-
],
|
|
878
860
|
},
|
|
879
861
|
[Network.ARBITRUM]: {
|
|
880
862
|
[SwapSide.SELL]: [
|
|
@@ -883,12 +865,6 @@ export const Adapters: Record<number, AdapterMappings> = {
|
|
|
883
865
|
index: 6,
|
|
884
866
|
},
|
|
885
867
|
],
|
|
886
|
-
[SwapSide.BUY]: [
|
|
887
|
-
{
|
|
888
|
-
name: 'ArbitrumBuyAdapter',
|
|
889
|
-
index: 12,
|
|
890
|
-
},
|
|
891
|
-
],
|
|
892
868
|
},
|
|
893
869
|
[Network.OPTIMISM]: {
|
|
894
870
|
[SwapSide.SELL]: [
|
|
@@ -897,12 +873,6 @@ export const Adapters: Record<number, AdapterMappings> = {
|
|
|
897
873
|
index: 5,
|
|
898
874
|
},
|
|
899
875
|
],
|
|
900
|
-
[SwapSide.BUY]: [
|
|
901
|
-
{
|
|
902
|
-
name: 'OptimismBuyAdapter',
|
|
903
|
-
index: 8,
|
|
904
|
-
},
|
|
905
|
-
],
|
|
906
876
|
},
|
|
907
877
|
[Network.BASE]: {
|
|
908
878
|
[SwapSide.SELL]: [
|
|
@@ -911,12 +881,6 @@ export const Adapters: Record<number, AdapterMappings> = {
|
|
|
911
881
|
index: 3,
|
|
912
882
|
},
|
|
913
883
|
],
|
|
914
|
-
[SwapSide.BUY]: [
|
|
915
|
-
{
|
|
916
|
-
name: 'BaseBuyAdapter',
|
|
917
|
-
index: 9,
|
|
918
|
-
},
|
|
919
|
-
],
|
|
920
884
|
},
|
|
921
885
|
};
|
|
922
886
|
|
|
@@ -982,7 +946,6 @@ export const configAddressesNormalizer = (
|
|
|
982
946
|
address: e.address.toLowerCase(),
|
|
983
947
|
}))
|
|
984
948
|
: _config.factories,
|
|
985
|
-
router: _config.router,
|
|
986
949
|
stateUpdatePeriodMs: _config.stateUpdatePeriodMs,
|
|
987
950
|
factoryPoolImplementations,
|
|
988
951
|
customPools,
|
|
@@ -10,14 +10,13 @@ dotenv.config();
|
|
|
10
10
|
|
|
11
11
|
export function testForNetwork(
|
|
12
12
|
network: Network,
|
|
13
|
-
dexKey: string
|
|
13
|
+
dexKey: string,
|
|
14
14
|
tokenASymbol: string,
|
|
15
15
|
tokenBSymbol: string,
|
|
16
16
|
tokenAAmount: string,
|
|
17
17
|
tokenBAmount: string,
|
|
18
18
|
sideToContractMethods: Map<SwapSide, ContractMethod[]> = new Map([
|
|
19
19
|
[SwapSide.SELL, [ContractMethod.swapExactAmountIn]],
|
|
20
|
-
[SwapSide.BUY, [ContractMethod.swapExactAmountOut]],
|
|
21
20
|
]),
|
|
22
21
|
) {
|
|
23
22
|
const provider = new StaticJsonRpcProvider(
|
|
@@ -27,6 +26,8 @@ export function testForNetwork(
|
|
|
27
26
|
const tokens = Tokens[network];
|
|
28
27
|
const holders = Holders[network];
|
|
29
28
|
|
|
29
|
+
// const sideToContractMethods = ;
|
|
30
|
+
|
|
30
31
|
describe(`${network}`, () => {
|
|
31
32
|
sideToContractMethods.forEach((contractMethods, side) =>
|
|
32
33
|
describe(`${side}`, () => {
|
|
@@ -61,11 +62,6 @@ export function testForNetwork(
|
|
|
61
62
|
contractMethod,
|
|
62
63
|
network,
|
|
63
64
|
provider,
|
|
64
|
-
undefined,
|
|
65
|
-
undefined,
|
|
66
|
-
undefined,
|
|
67
|
-
undefined,
|
|
68
|
-
5000,
|
|
69
65
|
);
|
|
70
66
|
});
|
|
71
67
|
});
|
|
@@ -76,78 +72,25 @@ export function testForNetwork(
|
|
|
76
72
|
}
|
|
77
73
|
|
|
78
74
|
describe('CurveV1Factory E2E', () => {
|
|
79
|
-
const dexKey =
|
|
75
|
+
const dexKey = 'CurveV1Factory';
|
|
80
76
|
|
|
81
77
|
describe('Mainnet', () => {
|
|
82
78
|
const network = Network.MAINNET;
|
|
83
79
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
const tokenBSymbol: string = 'USDD';
|
|
87
|
-
|
|
88
|
-
const tokenAAmount: string = '100000000';
|
|
89
|
-
const tokenBAmount: string = '111000000000000000000';
|
|
90
|
-
|
|
91
|
-
testForNetwork(
|
|
92
|
-
network,
|
|
93
|
-
dexKey,
|
|
94
|
-
tokenASymbol,
|
|
95
|
-
tokenBSymbol,
|
|
96
|
-
tokenAAmount,
|
|
97
|
-
tokenBAmount,
|
|
98
|
-
);
|
|
99
|
-
});
|
|
100
|
-
|
|
101
|
-
describe('GHO -> USDC', () => {
|
|
102
|
-
const tokenASymbol: string = 'GHO';
|
|
103
|
-
const tokenBSymbol: string = 'USDC';
|
|
104
|
-
|
|
105
|
-
const tokenAAmount: string = '1000000000000000000';
|
|
106
|
-
const tokenBAmount: string = '100000000';
|
|
107
|
-
|
|
108
|
-
testForNetwork(
|
|
109
|
-
network,
|
|
110
|
-
dexKey,
|
|
111
|
-
tokenASymbol,
|
|
112
|
-
tokenBSymbol,
|
|
113
|
-
tokenAAmount,
|
|
114
|
-
tokenBAmount,
|
|
115
|
-
);
|
|
116
|
-
});
|
|
117
|
-
|
|
118
|
-
describe('GHO -> crvUSD', () => {
|
|
119
|
-
const tokenASymbol: string = 'GHO';
|
|
120
|
-
const tokenBSymbol: string = 'crvUSD';
|
|
121
|
-
|
|
122
|
-
const tokenAAmount: string = '1000000000000000000';
|
|
123
|
-
const tokenBAmount: string = '1000000000000000000';
|
|
124
|
-
|
|
125
|
-
testForNetwork(
|
|
126
|
-
network,
|
|
127
|
-
dexKey,
|
|
128
|
-
tokenASymbol,
|
|
129
|
-
tokenBSymbol,
|
|
130
|
-
tokenAAmount,
|
|
131
|
-
tokenBAmount,
|
|
132
|
-
);
|
|
133
|
-
});
|
|
134
|
-
|
|
135
|
-
describe('GHO -> USDT', () => {
|
|
136
|
-
const tokenASymbol: string = 'GHO';
|
|
137
|
-
const tokenBSymbol: string = 'USDT';
|
|
80
|
+
const tokenASymbol: string = 'USDT';
|
|
81
|
+
const tokenBSymbol: string = 'USDD';
|
|
138
82
|
|
|
139
|
-
|
|
140
|
-
|
|
83
|
+
const tokenAAmount: string = '100000000';
|
|
84
|
+
const tokenBAmount: string = '111000000000000000000';
|
|
141
85
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
});
|
|
86
|
+
testForNetwork(
|
|
87
|
+
network,
|
|
88
|
+
dexKey,
|
|
89
|
+
tokenASymbol,
|
|
90
|
+
tokenBSymbol,
|
|
91
|
+
tokenAAmount,
|
|
92
|
+
tokenBAmount,
|
|
93
|
+
);
|
|
151
94
|
});
|
|
152
95
|
describe('Mainnet Native', () => {
|
|
153
96
|
const network = Network.MAINNET;
|
|
@@ -379,7 +322,6 @@ describe('CurveV1Factory E2E', () => {
|
|
|
379
322
|
SwapSide.SELL,
|
|
380
323
|
[ContractMethod.swapExactAmountIn, ContractMethod.directCurveV1Swap],
|
|
381
324
|
],
|
|
382
|
-
[SwapSide.BUY, [ContractMethod.swapExactAmountOut]],
|
|
383
325
|
// [
|
|
384
326
|
// SwapSide.SELL,
|
|
385
327
|
// [
|
|
@@ -407,23 +349,5 @@ describe('CurveV1Factory E2E', () => {
|
|
|
407
349
|
sideToContractMethods,
|
|
408
350
|
);
|
|
409
351
|
});
|
|
410
|
-
|
|
411
|
-
describe('USDM -> crvUSD', () => {
|
|
412
|
-
const tokenASymbol: string = 'USDM';
|
|
413
|
-
const tokenBSymbol: string = 'crvUSD';
|
|
414
|
-
|
|
415
|
-
const tokenAAmount: string = '1000000000000000000';
|
|
416
|
-
const tokenBAmount: string = '1000000000000000000';
|
|
417
|
-
|
|
418
|
-
testForNetwork(
|
|
419
|
-
network,
|
|
420
|
-
dexKey,
|
|
421
|
-
tokenASymbol,
|
|
422
|
-
tokenBSymbol,
|
|
423
|
-
tokenAAmount,
|
|
424
|
-
tokenBAmount,
|
|
425
|
-
sideToContractMethods,
|
|
426
|
-
);
|
|
427
|
-
});
|
|
428
352
|
});
|
|
429
353
|
});
|