@paraswap/dex-lib 2.13.1 → 2.14.0

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.
Files changed (117) hide show
  1. package/build/config.js +5 -23
  2. package/build/config.js.map +1 -1
  3. package/build/dex/curve-v1/config.js +0 -2
  4. package/build/dex/curve-v1/config.js.map +1 -1
  5. package/build/dex/curve-v1/curve-v1.js +0 -2
  6. package/build/dex/curve-v1/curve-v1.js.map +1 -1
  7. package/build/dex/curve-v1/types.d.ts +0 -1
  8. package/build/dex/curve-v1/types.js.map +1 -1
  9. package/build/dex/generic-rfq/rate-fetcher.js +0 -2
  10. package/build/dex/generic-rfq/rate-fetcher.js.map +1 -1
  11. package/build/dex/generic-rfq/validators.d.ts +1 -1
  12. package/build/dex/generic-rfq/validators.js +26 -36
  13. package/build/dex/generic-rfq/validators.js.map +1 -1
  14. package/build/dex/index.js +2 -2
  15. package/build/dex/index.js.map +1 -1
  16. package/build/dex/simple-exchange.d.ts +0 -1
  17. package/build/dex/simple-exchange.js +0 -2
  18. package/build/dex/simple-exchange.js.map +1 -1
  19. package/build/lib/decoders.d.ts +1 -2
  20. package/build/lib/decoders.js +1 -8
  21. package/build/lib/decoders.js.map +1 -1
  22. package/build/lib/fetcher/fetcher.js +0 -3
  23. package/build/lib/fetcher/fetcher.js.map +1 -1
  24. package/build/lib/multi-wrapper.d.ts +1 -2
  25. package/build/lib/multi-wrapper.js.map +1 -1
  26. package/build/lib/tokens/balancer-fetcher.js +5 -4
  27. package/build/lib/tokens/balancer-fetcher.js.map +1 -1
  28. package/build/lib/tokens/utils.d.ts +2 -2
  29. package/build/lib/tokens/utils.js +1 -1
  30. package/build/lib/tokens/utils.js.map +1 -1
  31. package/build/types.d.ts +0 -3
  32. package/dex-template/__DexName__-e2e.test.ts.template +0 -1
  33. package/dex-template/__DexName__-events.test.ts.template +0 -1
  34. package/dex-template/__DexName__-integration.test.ts.template +0 -1
  35. package/dex-template/__DexName__-pool.ts.template +5 -8
  36. package/package.json +1 -1
  37. package/scripts/generate-bytecode.ts +0 -2
  38. package/src/abi/woo-fi/WooFeeManager.abi.json +318 -0
  39. package/src/abi/{woo-fi-v2/WooPPV2.abi.json → woo-fi/WooPP.abi.json} +169 -201
  40. package/src/abi/{woo-fi-v2/WooOracleV2.abi.json → woo-fi/Wooracle.abi.json} +50 -148
  41. package/src/config.ts +5 -27
  42. package/src/dex/balancer-v2/balancer-v2-e2e.test.ts +1 -0
  43. package/src/dex/curve-v1/config.ts +0 -2
  44. package/src/dex/curve-v1/curve-v1-e2e.test.ts +37 -18
  45. package/src/dex/curve-v1/curve-v1.ts +0 -2
  46. package/src/dex/curve-v1/types.ts +0 -1
  47. package/src/dex/generic-rfq/generic-rfq-e2e.test.ts +258 -63
  48. package/src/dex/generic-rfq/rate-fetcher.ts +0 -2
  49. package/src/dex/generic-rfq/validators.test.ts +32 -6
  50. package/src/dex/generic-rfq/validators.ts +32 -57
  51. package/src/dex/index.ts +2 -2
  52. package/src/dex/simple-exchange.ts +0 -3
  53. package/src/dex/woo-fi/config.ts +141 -0
  54. package/src/dex/woo-fi/constants.ts +21 -0
  55. package/src/dex/woo-fi/types.ts +55 -0
  56. package/src/dex/woo-fi/woo-fi-decimal-math.ts +45 -0
  57. package/src/dex/woo-fi/woo-fi-e2e.test.ts +183 -0
  58. package/src/dex/woo-fi/woo-fi-integration.test.ts +416 -0
  59. package/src/dex/woo-fi/woo-fi-math.ts +527 -0
  60. package/src/dex/woo-fi/woo-fi.ts +693 -0
  61. package/src/lib/decoders.ts +1 -12
  62. package/src/lib/fetcher/fetcher.ts +0 -6
  63. package/src/lib/multi-wrapper.ts +1 -2
  64. package/src/lib/tokens/balancer-fetcher.ts +6 -5
  65. package/src/lib/tokens/utils.ts +3 -5
  66. package/src/types.ts +0 -4
  67. package/tests/constants-e2e.ts +9 -11
  68. package/tests/tenderly-simulation.ts +1 -1
  69. package/tests/utils-e2e.ts +48 -61
  70. package/tests/utils.ts +0 -2
  71. package/.idea/codeStyles/codeStyleConfig.xml +0 -5
  72. package/.idea/misc.xml +0 -6
  73. package/.idea/modules.xml +0 -8
  74. package/.idea/vcs.xml +0 -6
  75. package/.vscode/launch.json +0 -21
  76. package/build/dex/aave-v3/tokens/arbitrum.json +0 -50
  77. package/build/dex/aave-v3/tokens/avalanche.json +0 -50
  78. package/build/dex/aave-v3/tokens/fantom.json +0 -62
  79. package/build/dex/aave-v3/tokens/mainnet.json +0 -44
  80. package/build/dex/aave-v3/tokens/optimism.json +0 -50
  81. package/build/dex/aave-v3/tokens/polygon.json +0 -98
  82. package/build/dex/balancer-v2/VirtualBoostedPool.d.ts +0 -79
  83. package/build/dex/balancer-v2/VirtualBoostedPool.js +0 -382
  84. package/build/dex/balancer-v2/VirtualBoostedPool.js.map +0 -1
  85. package/build/dex/generic-rfq/e2e-test-config.d.ts +0 -9
  86. package/build/dex/generic-rfq/e2e-test-config.js +0 -33
  87. package/build/dex/generic-rfq/e2e-test-config.js.map +0 -1
  88. package/build/dex/test-aave-v3/config.d.ts +0 -4
  89. package/build/dex/test-aave-v3/config.js +0 -15
  90. package/build/dex/test-aave-v3/config.js.map +0 -1
  91. package/build/dex/test-aave-v3/test-aave-v3-pool.d.ts +0 -39
  92. package/build/dex/test-aave-v3/test-aave-v3-pool.js +0 -63
  93. package/build/dex/test-aave-v3/test-aave-v3-pool.js.map +0 -1
  94. package/build/dex/test-aave-v3/test-aave-v3.d.ts +0 -37
  95. package/build/dex/test-aave-v3/test-aave-v3.js +0 -126
  96. package/build/dex/test-aave-v3/test-aave-v3.js.map +0 -1
  97. package/build/dex/test-aave-v3/types.d.ts +0 -6
  98. package/build/dex/test-aave-v3/types.js +0 -3
  99. package/build/dex/test-aave-v3/types.js.map +0 -1
  100. package/src/abi/woo-fi-v2/IntegrationHelper.abi.json +0 -116
  101. package/src/dex/generic-rfq/e2e-test-config.ts +0 -37
  102. package/src/dex/generic-rfq/generic-rfq-local-e2e.test.ts +0 -121
  103. package/src/dex/woo-fi-v2/config.ts +0 -87
  104. package/src/dex/woo-fi-v2/constants.ts +0 -22
  105. package/src/dex/woo-fi-v2/decoders.ts +0 -45
  106. package/src/dex/woo-fi-v2/types.ts +0 -63
  107. package/src/dex/woo-fi-v2/utils.ts +0 -19
  108. package/src/dex/woo-fi-v2/woo-fi-v2-e2e.test.ts +0 -216
  109. package/src/dex/woo-fi-v2/woo-fi-v2-integration.test.ts +0 -495
  110. package/src/dex/woo-fi-v2/woo-fi-v2-math.ts +0 -195
  111. package/src/dex/woo-fi-v2/woo-fi-v2-pool.ts +0 -112
  112. package/src/dex/woo-fi-v2/woo-fi-v2.ts +0 -487
  113. package/src/lib/log-messages-suppressor.ts +0 -173
  114. package/src/lib/stateful-rpc-poller/state-polling-manager.ts +0 -320
  115. package/src/lib/stateful-rpc-poller/stateful-rpc-poller.ts +0 -604
  116. package/src/lib/stateful-rpc-poller/types.ts +0 -66
  117. package/src/lib/stateful-rpc-poller/utils.ts +0 -23
@@ -1,87 +0,0 @@
1
- import { DexParams } from './types';
2
- import { DexConfigMap, AdapterMappings } from '../../types';
3
- import { Network, SwapSide } from '../../constants';
4
-
5
- export const WooFiV2Config: DexConfigMap<DexParams> = {
6
- WooFiV2: {
7
- [Network.OPTIMISM]: {
8
- wooPPV2Address: '0xd1778F9DF3eee5473A9640f13682e3846f61fEbC',
9
- wooOracleV2Address: '0x464959aD46e64046B891F562cFF202a465D522F3',
10
- integrationHelperAddress: '0x96329d66074EB8386Ae8bFD6698B2E3FDA87e15E',
11
- // USDC
12
- quoteToken: {
13
- address: '0x7F5c764cBc14f9669B88837ca1490cCa17c31607',
14
- decimals: 6,
15
- },
16
- },
17
- [Network.BSC]: {
18
- wooPPV2Address: '0xEc054126922a9a1918435c9072c32f1B60cB2B90',
19
- wooOracleV2Address: '0x747f99D619D5612399010Ec5706F13e3345c4a9E',
20
- integrationHelperAddress: '0xe12dC1F01ccB71ef00ADd1D8A5116b905261D879',
21
- // BUSD
22
- quoteToken: {
23
- address: '0xe9e7CEA3DedcA5984780Bafc599bD69ADd087D56',
24
- decimals: 18,
25
- },
26
- },
27
- [Network.POLYGON]: {
28
- wooPPV2Address: '0x7081A38158BD050Ae4a86e38E0225Bc281887d7E',
29
- wooOracleV2Address: '0xeFF23B4bE1091b53205E35f3AfCD9C7182bf3062',
30
- integrationHelperAddress: '0x7Ba560eB735AbDCf9a3a5692272652A0cc81850d',
31
- // USDC
32
- quoteToken: {
33
- address: '0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174',
34
- decimals: 6,
35
- },
36
- },
37
- [Network.FANTOM]: {
38
- wooPPV2Address: '0x286ab107c5E9083dBed35A2B5fb0242538F4f9bf',
39
- wooOracleV2Address: '0x8840e26e0ebf7D100A0644DD8576DC62B03cbf04',
40
- integrationHelperAddress: '0x6641959FE5EED7166F2254cF04b0d20c96776D9A',
41
- // USDC
42
- quoteToken: {
43
- address: '0x04068DA6C83AFCFA0e13ba15A6696662335D5B75',
44
- decimals: 6,
45
- },
46
- },
47
- [Network.ARBITRUM]: {
48
- wooPPV2Address: '0xeFF23B4bE1091b53205E35f3AfCD9C7182bf3062',
49
- wooOracleV2Address: '0x37a9dE70b6734dFCA54395D8061d9411D9910739',
50
- integrationHelperAddress: '0x28D2B949024FE50627f1EbC5f0Ca3Ca721148E40',
51
- // USDC
52
- quoteToken: {
53
- address: '0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8',
54
- decimals: 6,
55
- },
56
- },
57
- [Network.AVALANCHE]: {
58
- wooPPV2Address: '0x3b3E4b4741e91aF52d0e9ad8660573E951c88524',
59
- wooOracleV2Address: '0x9ACA557590F5020BDA4Ba63065Fc3A1253Bf8000',
60
- integrationHelperAddress: '0x020630613E296c3E9b06186f630D1bF97A2B6Ad1',
61
- // USDC
62
- quoteToken: {
63
- address: '0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E',
64
- decimals: 6,
65
- },
66
- },
67
- },
68
- };
69
-
70
- export const Adapters: Record<number, AdapterMappings> = {
71
- [Network.OPTIMISM]: {
72
- [SwapSide.SELL]: [{ name: 'OptimismAdapter01', index: 11 }],
73
- },
74
- [Network.BSC]: { [SwapSide.SELL]: [{ name: 'BscAdapter01', index: 13 }] },
75
- [Network.POLYGON]: {
76
- [SwapSide.SELL]: [{ name: 'PolygonAdapter02', index: 4 }],
77
- },
78
- [Network.FANTOM]: {
79
- [SwapSide.SELL]: [{ name: 'FantomAdapter01', index: 8 }],
80
- },
81
- [Network.ARBITRUM]: {
82
- [SwapSide.SELL]: [{ name: 'ArbitrumAdapter02', index: 3 }],
83
- },
84
- [Network.AVALANCHE]: {
85
- [SwapSide.SELL]: [{ name: 'AvalancheAdapter01', index: 12 }],
86
- },
87
- };
@@ -1,22 +0,0 @@
1
- import { PoolState } from './types';
2
-
3
- export const WOO_FI_V2_GAS_COST = {
4
- // https://dashboard.tenderly.co/paraswap/paraswap/fork/f5a6da2f-fec7-4d00-ac2c-b9c50f5c9554/simulation/25f3b378-632f-4beb-ba37-e21dd3722b5c/gas-usage
5
- sellQuote: 145_000,
6
- // https://dashboard.tenderly.co/paraswap/paraswap/fork/92f13a98-465d-409e-867d-e255e9f86cf1/simulation/09d5d06a-dd90-40fe-8ae6-a65097e804d4/gas-usage
7
- sellBase: 159_000,
8
- // https://dashboard.tenderly.co/paraswap/paraswap/fork/d5964ad1-f64f-42b7-8fac-976ad216f05f/simulation/49df18de-8046-463e-a904-5c9f621406d4/gas-usage
9
- baseToBase: 204_000,
10
- };
11
-
12
- export const USD_PRECISION = 2;
13
-
14
- export const MIN_CONVERSION_RATE = 1;
15
-
16
- export const NULL_STATE: PoolState = {
17
- tokenInfos: {},
18
- tokenStates: {},
19
- decimals: {},
20
- oracleTimestamp: 0n,
21
- isPaused: false,
22
- };
@@ -1,45 +0,0 @@
1
- import { BytesLike } from 'ethers';
2
- import { defaultAbiCoder } from 'ethers/lib/utils';
3
- import { extractSuccessAndValue, generalDecoder } from '../../lib/decoders';
4
- import { MultiResult } from '../../lib/multi-wrapper';
5
- import { DecimalInfo, TokenInfo, TokenState } from './types';
6
-
7
- export function tokenInfoDecoder(
8
- result: MultiResult<BytesLike> | BytesLike,
9
- ): TokenInfo {
10
- return generalDecoder(result, ['uint192', 'uint16'], undefined, value => ({
11
- reserve: value[0].toBigInt(),
12
- feeRate: BigInt(value[1].toString()),
13
- }));
14
- }
15
-
16
- export function decimalInfoDecoder(
17
- result: MultiResult<BytesLike> | BytesLike,
18
- ): DecimalInfo {
19
- return generalDecoder(
20
- result,
21
- ['tuple(uint64 priceDec, uint64 quoteDec, uint64 baseDec)'],
22
- undefined,
23
- value => ({
24
- priceDec: value[0].priceDec.toBigInt(),
25
- quoteDec: value[0].quoteDec.toBigInt(),
26
- baseDec: value[0].baseDec.toBigInt(),
27
- }),
28
- );
29
- }
30
-
31
- // This is state from WooOracleV2 contract
32
- export function stateDecoder(
33
- result: MultiResult<BytesLike> | BytesLike,
34
- ): TokenState {
35
- return generalDecoder(
36
- result,
37
- ['tuple(uint128 price, uint64 spread, uint64 coeff, bool woFeasible)'],
38
- undefined,
39
- value => ({
40
- price: value[0].price.toBigInt(),
41
- spread: value[0].spread.toBigInt(),
42
- coeff: value[0].coeff.toBigInt(),
43
- }),
44
- );
45
- }
@@ -1,63 +0,0 @@
1
- import { Interface } from 'ethers/lib/utils';
2
- import { Address, Token } from '../../types';
3
-
4
- export type PoolState = {
5
- // fetched from WooPPV2.tokenInfos(address baseToken) :
6
- // https://arbiscan.io/address/0x8693F9701D6DB361Fe9CC15Bc455Ef4366E39AE0
7
- tokenInfos: Record<Address, TokenInfo>;
8
-
9
- // fetched from WooracleV2.state(address baseToken)
10
- // https://arbiscan.io/address/0x962d37fb9d75fe1af9aab323727183e4eae1322d
11
- tokenStates: Record<Address, TokenState>;
12
-
13
- // fetched from WooPPV2.decimalInfo(address baseToken)
14
- // https://arbiscan.io/address/0x8693F9701D6DB361Fe9CC15Bc455Ef4366E39AE0
15
- decimals: Record<Address, DecimalInfo>;
16
- oracleTimestamp: bigint;
17
- isPaused: boolean;
18
- };
19
-
20
- export type WooFiV2Data = {};
21
-
22
- export type DexParams = {
23
- wooPPV2Address: Address;
24
- wooOracleV2Address: Address;
25
- integrationHelperAddress: Address;
26
- quoteToken: Token;
27
- };
28
-
29
- export type TokenInfo = {
30
- reserve: bigint;
31
- feeRate: bigint;
32
- };
33
-
34
- export type TokenState = {
35
- price: bigint;
36
- spread: bigint;
37
- coeff: bigint;
38
- };
39
-
40
- export type DecimalInfo = {
41
- priceDec: bigint;
42
- quoteDec: bigint;
43
- baseDec: bigint;
44
- };
45
-
46
- export type LatestRoundData = {
47
- answer: bigint;
48
- };
49
-
50
- export type MulticallResultOutputs =
51
- | boolean
52
- | bigint
53
- | TokenInfo
54
- | DecimalInfo
55
- | TokenState;
56
-
57
- export type WooFiV2Interfaces = {
58
- PPV2: Interface;
59
- oracleV2: Interface;
60
- integrationHelper: Interface;
61
- chainlink: Interface;
62
- erc20BalanceOf: Interface;
63
- };
@@ -1,19 +0,0 @@
1
- import { Interface } from 'ethers/lib/utils';
2
- import wooPPV2ABI from '../../abi/woo-fi-v2/WooPPV2.abi.json';
3
- import wooOracleV2ABI from '../../abi/woo-fi-v2/WooOracleV2.abi.json';
4
- import wooIntegrationHelper from '../../abi/woo-fi-v2/IntegrationHelper.abi.json';
5
- import { WooFiV2Interfaces } from './types';
6
-
7
- export const ifaces: WooFiV2Interfaces = {
8
- PPV2: new Interface(wooPPV2ABI),
9
- oracleV2: new Interface(wooOracleV2ABI),
10
- integrationHelper: new Interface(wooIntegrationHelper),
11
- chainlink: new Interface([
12
- 'function latestRoundData() view returns (tuple(uint80 roundId, ' +
13
- 'int256 answer, uint256 startedAt, uint256 updatedAt, ' +
14
- 'uint80 answeredInRound))',
15
- ]),
16
- erc20BalanceOf: new Interface([
17
- 'function balanceOf(address) view returns (uint256)',
18
- ]),
19
- };
@@ -1,216 +0,0 @@
1
- import dotenv from 'dotenv';
2
- dotenv.config();
3
-
4
- import { testE2E } from '../../../tests/utils-e2e';
5
- import { Tokens, Holders } from '../../../tests/constants-e2e';
6
- import { Network, ContractMethod, SwapSide } from '../../constants';
7
- import { StaticJsonRpcProvider } from '@ethersproject/providers';
8
- import { generateConfig } from '../../config';
9
-
10
- function testForNetwork(
11
- network: Network,
12
- dexKey: string,
13
- tokenBaseA: string,
14
- tokenBaseB: string,
15
- tokenQuote: string,
16
- tokenBaseAAmount: string,
17
- tokenQuoteAmount: string,
18
- ) {
19
- const provider = new StaticJsonRpcProvider(
20
- generateConfig(network).privateHttpProvider,
21
- network,
22
- );
23
- const tokens = Tokens[network];
24
- const holders = Holders[network];
25
-
26
- const sideToContractMethods = new Map([
27
- [
28
- SwapSide.SELL,
29
- [
30
- ContractMethod.simpleSwap,
31
- ContractMethod.multiSwap,
32
- ContractMethod.megaSwap,
33
- ],
34
- ],
35
- ]);
36
-
37
- describe(`${network}`, () => {
38
- sideToContractMethods.forEach((contractMethods, side) =>
39
- describe(`${side}`, () => {
40
- contractMethods.forEach((contractMethod: ContractMethod) => {
41
- describe(`${contractMethod}`, () => {
42
- it(`${tokenBaseA} -> ${tokenQuote}`, async () => {
43
- await testE2E(
44
- tokens[tokenBaseA],
45
- tokens[tokenQuote],
46
- holders[tokenBaseA],
47
- tokenBaseAAmount,
48
- side,
49
- dexKey,
50
- contractMethod,
51
- network,
52
- provider,
53
- );
54
- });
55
- it(`${tokenQuote} -> ${tokenBaseA}`, async () => {
56
- await testE2E(
57
- tokens[tokenQuote],
58
- tokens[tokenBaseA],
59
- holders[tokenQuote],
60
- tokenQuoteAmount,
61
- side,
62
- dexKey,
63
- contractMethod,
64
- network,
65
- provider,
66
- );
67
- });
68
- it(`${tokenBaseA} -> ${tokenBaseB}`, async () => {
69
- await testE2E(
70
- tokens[tokenBaseA],
71
- tokens[tokenBaseB],
72
- holders[tokenBaseA],
73
- tokenBaseAAmount,
74
- side,
75
- dexKey,
76
- contractMethod,
77
- network,
78
- provider,
79
- );
80
- });
81
- });
82
- });
83
- }),
84
- );
85
- });
86
- }
87
-
88
- describe('WooFiV2 E2E', () => {
89
- const dexKey = 'WooFiV2';
90
-
91
- describe('Optimism', () => {
92
- const network = Network.OPTIMISM;
93
-
94
- const baseATokenSymbol = 'WETH';
95
- const baseBTokenSymbol = 'WBTC';
96
- const quoteTokenSymbol = 'USDC';
97
-
98
- const tokenBaseAAmount = '1000000000000000000';
99
- const tokenQuoteAmount = '1000000';
100
-
101
- testForNetwork(
102
- network,
103
- dexKey,
104
- baseATokenSymbol,
105
- baseBTokenSymbol,
106
- quoteTokenSymbol,
107
- tokenBaseAAmount,
108
- tokenQuoteAmount,
109
- );
110
- });
111
-
112
- describe('BSC', () => {
113
- const network = Network.BSC;
114
-
115
- const baseATokenSymbol = 'WBNB';
116
- const baseBTokenSymbol = 'bBTC';
117
- const quoteTokenSymbol = 'BUSD';
118
-
119
- const tokenBaseAAmount = '1000000000000000000';
120
- const tokenQuoteAmount = '1000000000000000000';
121
-
122
- testForNetwork(
123
- network,
124
- dexKey,
125
- baseATokenSymbol,
126
- baseBTokenSymbol,
127
- quoteTokenSymbol,
128
- tokenBaseAAmount,
129
- tokenQuoteAmount,
130
- );
131
- });
132
-
133
- describe('Polygon', () => {
134
- const network = Network.POLYGON;
135
-
136
- const baseATokenSymbol = 'WMATIC';
137
- const baseBTokenSymbol = 'WETH';
138
- const quoteTokenSymbol = 'USDC';
139
-
140
- const tokenBaseAAmount = '1000000000000000000';
141
- const tokenQuoteAmount = '1000000';
142
-
143
- testForNetwork(
144
- network,
145
- dexKey,
146
- baseATokenSymbol,
147
- baseBTokenSymbol,
148
- quoteTokenSymbol,
149
- tokenBaseAAmount,
150
- tokenQuoteAmount,
151
- );
152
- });
153
-
154
- describe('Fantom', () => {
155
- const network = Network.FANTOM;
156
-
157
- const baseATokenSymbol = 'WFTM';
158
- const quoteTokenSymbol = 'USDC';
159
- const baseBTokenSymbol = 'ETH';
160
-
161
- const tokenBaseAAmount = '1000000000000000000';
162
- const tokenQuoteAmount = '1000000';
163
-
164
- testForNetwork(
165
- network,
166
- dexKey,
167
- baseATokenSymbol,
168
- baseBTokenSymbol,
169
- quoteTokenSymbol,
170
- tokenBaseAAmount,
171
- tokenQuoteAmount,
172
- );
173
- });
174
-
175
- describe('Arbitrum', () => {
176
- const network = Network.ARBITRUM;
177
-
178
- const baseATokenSymbol = 'WETH';
179
- const baseBTokenSymbol = 'WBTC';
180
- const quoteTokenSymbol = 'USDC';
181
-
182
- const tokenBaseAAmount = '1000000000000000000';
183
- const tokenQuoteAmount = '1000000';
184
-
185
- testForNetwork(
186
- network,
187
- dexKey,
188
- baseATokenSymbol,
189
- baseBTokenSymbol,
190
- quoteTokenSymbol,
191
- tokenBaseAAmount,
192
- tokenQuoteAmount,
193
- );
194
- });
195
-
196
- describe('Avalanche', () => {
197
- const network = Network.AVALANCHE;
198
-
199
- const baseATokenSymbol = 'WAVAX';
200
- const baseBTokenSymbol = 'BTCb';
201
- const quoteTokenSymbol = 'USDC';
202
-
203
- const tokenBaseAAmount = '1000000000000000000';
204
- const tokenQuoteAmount = '1000000';
205
-
206
- testForNetwork(
207
- network,
208
- dexKey,
209
- baseATokenSymbol,
210
- baseBTokenSymbol,
211
- quoteTokenSymbol,
212
- tokenBaseAAmount,
213
- tokenQuoteAmount,
214
- );
215
- });
216
- });