@paraswap/dex-lib 2.14.2 → 2.14.3-3pool-enable.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 (56) hide show
  1. package/build/abi/maverick/pool.json +913 -0
  2. package/build/abi/maverick/router.json +703 -0
  3. package/build/dex/curve-v1/config.js +19 -19
  4. package/build/dex/curve-v1/config.js.map +1 -1
  5. package/build/dex/curve-v1-factory/config.js +2 -5
  6. package/build/dex/curve-v1-factory/config.js.map +1 -1
  7. package/build/dex/maverick/config.d.ts +4 -0
  8. package/build/dex/maverick/config.js +20 -0
  9. package/build/dex/maverick/config.js.map +1 -0
  10. package/build/dex/maverick/maverick-math/maverick-pool-math.d.ts +67 -0
  11. package/build/dex/maverick/maverick-math/maverick-pool-math.js +406 -0
  12. package/build/dex/maverick/maverick-math/maverick-pool-math.js.map +1 -0
  13. package/build/dex/maverick/maverick-math/maverick-sol-math.d.ts +17 -0
  14. package/build/dex/maverick/maverick-math/maverick-sol-math.js +139 -0
  15. package/build/dex/maverick/maverick-math/maverick-sol-math.js.map +1 -0
  16. package/build/dex/maverick/maverick-pool.d.ts +41 -0
  17. package/build/dex/maverick/maverick-pool.js +130 -0
  18. package/build/dex/maverick/maverick-pool.js.map +1 -0
  19. package/build/dex/maverick/maverick.d.ts +42 -0
  20. package/build/dex/maverick/maverick.js +174 -0
  21. package/build/dex/maverick/maverick.js.map +1 -0
  22. package/build/dex/maverick/subgraph-queries.d.ts +4 -0
  23. package/build/dex/maverick/subgraph-queries.js +114 -0
  24. package/build/dex/maverick/subgraph-queries.js.map +1 -0
  25. package/build/dex/maverick/types.d.ts +46 -0
  26. package/build/dex/{test-aave-v3 → maverick}/types.js.map +1 -1
  27. package/package.json +1 -1
  28. package/src/dex/curve-v1/config.ts +19 -19
  29. package/src/dex/curve-v1/curve-v1-e2e.test.ts +89 -0
  30. package/src/dex/curve-v1-factory/config.ts +2 -5
  31. package/tests/constants-e2e.ts +10 -0
  32. package/.idea/codeStyles/codeStyleConfig.xml +0 -5
  33. package/.idea/misc.xml +0 -6
  34. package/.idea/modules.xml +0 -8
  35. package/.idea/vcs.xml +0 -6
  36. package/.vscode/launch.json +0 -21
  37. package/build/dex/aave-v3/tokens/arbitrum.json +0 -50
  38. package/build/dex/aave-v3/tokens/avalanche.json +0 -50
  39. package/build/dex/aave-v3/tokens/fantom.json +0 -62
  40. package/build/dex/aave-v3/tokens/mainnet.json +0 -44
  41. package/build/dex/aave-v3/tokens/optimism.json +0 -50
  42. package/build/dex/aave-v3/tokens/polygon.json +0 -98
  43. package/build/dex/balancer-v2/VirtualBoostedPool.d.ts +0 -79
  44. package/build/dex/balancer-v2/VirtualBoostedPool.js +0 -382
  45. package/build/dex/balancer-v2/VirtualBoostedPool.js.map +0 -1
  46. package/build/dex/test-aave-v3/config.d.ts +0 -4
  47. package/build/dex/test-aave-v3/config.js +0 -15
  48. package/build/dex/test-aave-v3/config.js.map +0 -1
  49. package/build/dex/test-aave-v3/test-aave-v3-pool.d.ts +0 -39
  50. package/build/dex/test-aave-v3/test-aave-v3-pool.js +0 -63
  51. package/build/dex/test-aave-v3/test-aave-v3-pool.js.map +0 -1
  52. package/build/dex/test-aave-v3/test-aave-v3.d.ts +0 -37
  53. package/build/dex/test-aave-v3/test-aave-v3.js +0 -126
  54. package/build/dex/test-aave-v3/test-aave-v3.js.map +0 -1
  55. package/build/dex/test-aave-v3/types.d.ts +0 -6
  56. /package/build/dex/{test-aave-v3 → maverick}/types.js +0 -0
@@ -132,6 +132,95 @@ describe('CurveV1 E2E', () => {
132
132
  });
133
133
  });
134
134
  });
135
+
136
+ describe('FANTOM', () => {
137
+ const network = Network.FANTOM;
138
+ const tokens = Tokens[network];
139
+ const holders = Holders[network];
140
+ const provider = new StaticJsonRpcProvider(
141
+ generateConfig(network).privateHttpProvider,
142
+ network,
143
+ );
144
+
145
+ const tokensToTest = [
146
+ [
147
+ {
148
+ symbol: 'DAI',
149
+ amount: (10 ** 18).toString(),
150
+ },
151
+ {
152
+ symbol: 'USDC',
153
+ amount: (10 ** 6).toString(),
154
+ },
155
+ ],
156
+ [
157
+ {
158
+ symbol: 'DAI',
159
+ amount: (10 ** 18).toString(),
160
+ },
161
+ {
162
+ symbol: 'FUSDT',
163
+ amount: (10 ** 6).toString(),
164
+ },
165
+ ],
166
+ [
167
+ {
168
+ symbol: 'GDAI',
169
+ amount: (10 ** 18).toString(),
170
+ },
171
+ {
172
+ symbol: 'GUSDC',
173
+ amount: (10 ** 6).toString(),
174
+ },
175
+ ],
176
+ ];
177
+
178
+ const sideToContractMethods = new Map([
179
+ [
180
+ SwapSide.SELL,
181
+ [
182
+ ContractMethod.simpleSwap,
183
+ ContractMethod.multiSwap,
184
+ ContractMethod.megaSwap,
185
+ ],
186
+ ],
187
+ ]);
188
+
189
+ sideToContractMethods.forEach((contractMethods, side) =>
190
+ contractMethods.forEach((contractMethod: ContractMethod) => {
191
+ tokensToTest.forEach(pair => {
192
+ describe(`${contractMethod}`, () => {
193
+ it(`${pair[0].symbol} -> ${pair[1].symbol}`, async () => {
194
+ await testE2E(
195
+ tokens[pair[0].symbol],
196
+ tokens[pair[1].symbol],
197
+ holders[pair[0].symbol],
198
+ side === SwapSide.SELL ? pair[0].amount : pair[1].amount,
199
+ side,
200
+ dexKey,
201
+ contractMethod,
202
+ network,
203
+ provider,
204
+ );
205
+ });
206
+ });
207
+ });
208
+ }),
209
+ );
210
+ it('simpleSwap DAI -> USDC', async () => {
211
+ await testE2E(
212
+ tokens['DAI'],
213
+ tokens['USDC'],
214
+ holders['DAI'],
215
+ '100000000000000000000',
216
+ SwapSide.SELL,
217
+ dexKey,
218
+ ContractMethod.simpleSwap,
219
+ network,
220
+ provider,
221
+ );
222
+ });
223
+ });
135
224
  });
136
225
 
137
226
  describe('Acryptos E2E', () => {
@@ -259,11 +259,8 @@ const CurveV1FactoryConfig: DexConfigMap<DexParams> = {
259
259
  [Network.FANTOM]: {
260
260
  factoryAddress: '0x686d67265703D1f124c45E33d47d794c566889Ba',
261
261
  stateUpdatePeriodMs: 2 * 1000,
262
- disabledPools: new Set(['0x0fa949783947Bf6c1b171DB13AEACBB488845B3f']),
263
- disabledImplementations: new Set([
264
- '0x210c806f6ae850279f7e298de749ec4b427d00dd',
265
- '0xf82162bb68ad5a168345bb7efb2faa0edcca5177',
266
- ]),
262
+ disabledPools: new Set([]),
263
+ disabledImplementations: new Set([]),
267
264
  factoryPoolImplementations: {
268
265
  '0x61E10659fe3aa93d036d099405224E4Ac24996d0': {
269
266
  name: ImplementationNames.FACTORY_PLAIN_2_BASIC,
@@ -476,6 +476,14 @@ export const Tokens: {
476
476
  address: '0x74b23882a30290451A17c44f4F05243b6b58C76d',
477
477
  decimals: 18,
478
478
  },
479
+ GDAI: {
480
+ address: '0x07E6332dD090D287d3489245038daF987955DCFB',
481
+ decimals: 18,
482
+ },
483
+ GUSDC: {
484
+ address: '0xe578C856933D8e1082740bf7661e379Aa2A30b26',
485
+ decimals: 6,
486
+ },
479
487
  },
480
488
  [Network.BSC]: {
481
489
  POPS: {
@@ -907,6 +915,8 @@ export const Holders: {
907
915
  TOR: '0x70de4b5ed310fd93da3c0bae824fb99cb4d44dd8',
908
916
  BOO: '0xf778f4d7a14a8cb73d5261f9c61970ef4e7d7842',
909
917
  ETH: '0xf48883940b4056801de30f12b934dcea90133ee6',
918
+ GUSDC: '0x894d774a293f8aa3d23d67815d4cadb5319c1094',
919
+ GDAI: '0x0e2ed73f9c1409e2b36fe6c46e60d4557b7c2ac0',
910
920
  },
911
921
  [Network.BSC]: {
912
922
  DAI: '0xf68a4b64162906eff0ff6ae34e2bb1cd42fef62d',
@@ -1,5 +0,0 @@
1
- <component name="ProjectCodeStyleConfiguration">
2
- <state>
3
- <option name="PREFERRED_PROJECT_CODE_STYLE" value="Default" />
4
- </state>
5
- </component>
package/.idea/misc.xml DELETED
@@ -1,6 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="ProjectRootManager">
4
- <output url="file://$PROJECT_DIR$/out" />
5
- </component>
6
- </project>
package/.idea/modules.xml DELETED
@@ -1,8 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="ProjectModuleManager">
4
- <modules>
5
- <module fileurl="file://$PROJECT_DIR$/paraswap-dex-lib.iml" filepath="$PROJECT_DIR$/paraswap-dex-lib.iml" />
6
- </modules>
7
- </component>
8
- </project>
package/.idea/vcs.xml DELETED
@@ -1,6 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="VcsDirectoryMappings">
4
- <mapping directory="" vcs="Git" />
5
- </component>
6
- </project>
@@ -1,21 +0,0 @@
1
- {
2
- // Use IntelliSense to learn about possible attributes.
3
- // Hover to view descriptions of existing attributes.
4
- // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5
- "version": "0.2.0",
6
- "configurations": [
7
- {
8
- "type": "node",
9
- "request": "launch",
10
- "name": "Launch Program",
11
- "skipFiles": [
12
- "<node_internals>/**"
13
- ],
14
- "program": "${workspaceFolder}/build/index.js",
15
- "preLaunchTask": "tsc: build - tsconfig.json",
16
- "outFiles": [
17
- "${workspaceFolder}/build/**/*.js"
18
- ]
19
- }
20
- ]
21
- }
@@ -1,50 +0,0 @@
1
- [
2
- {
3
- "aSymbol": "aArbDAI",
4
- "aAddress": "0x82E64f49Ed5EC1bC6e43DAD4FC8Af9bb3A2312EE",
5
- "address": "0xda10009cbd5d07dd0cecc66161fc93d7c9000da1",
6
- "decimals": 18
7
- },
8
- {
9
- "aSymbol": "aArbLINK",
10
- "aAddress": "0x191c10Aa4AF7C30e871E70C95dB0E4eb77237530",
11
- "address": "0xf97f4df75117a78c1a5a0dbb814af92458539fb4",
12
- "decimals": 18
13
- },
14
- {
15
- "aSymbol": "aArbUSDC",
16
- "aAddress": "0x625E7708f30cA75bfd92586e17077590C60eb4cD",
17
- "address": "0xff970a61a04b1ca14834a43f5de4533ebddb5cc8",
18
- "decimals": 6
19
- },
20
- {
21
- "aSymbol": "aArbWBTC",
22
- "aAddress": "0x078f358208685046a11C85e8ad32895DED33A249",
23
- "address": "0x2f2a2543b76a4166549f7aab2e75bef0aefc5b0f",
24
- "decimals": 8
25
- },
26
- {
27
- "aSymbol": "aArbWETH",
28
- "aAddress": "0xe50fA9b3c56FfB159cB0FCA61F5c9D750e8128c8",
29
- "address": "0x82af49447d8a07e3bd95bd0d56f35241523fbab1",
30
- "decimals": 18
31
- },
32
- {
33
- "aSymbol": "aArbUSDT",
34
- "aAddress": "0x6ab707aca953edaefbc4fd23ba73294241490620",
35
- "address": "0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9",
36
- "decimals": 6
37
- },
38
- {
39
- "aSymbol": "aArbAAVE",
40
- "aAddress": "0xf329e36C7bF6E5E86ce2150875a84Ce77f477375",
41
- "address": "0xba5ddd1f9d7f570dc94a51479a000e3bce967196",
42
- "decimals": 18
43
- },
44
- {
45
- "aSymbol": "aArbEURS",
46
- "aAddress": "0x6d80113e533a2C0fe82EaBD35f1875DcEA89Ea97",
47
- "address": "0xd22a58f79e9481d1a88e00c343885a588b34b68b",
48
- "decimals": 2
49
- }
50
- ]
@@ -1,50 +0,0 @@
1
- [
2
- {
3
- "aSymbol": "aWETH",
4
- "aAddress": "0xe50fa9b3c56ffb159cb0fca61f5c9d750e8128c8",
5
- "address": "0x49d5c2bdffac6ce2bfdb6640f4f80f226bc10bab",
6
- "decimals": 18
7
- },
8
- {
9
- "aSymbol": "aDAI",
10
- "aAddress": "0x82e64f49ed5ec1bc6e43dad4fc8af9bb3a2312ee",
11
- "address": "0xd586e7f844cea2f87f50152665bcbc2c279d8d70",
12
- "decimals": 18
13
- },
14
- {
15
- "aSymbol": "aLINK",
16
- "aAddress": "0x191c10aa4af7c30e871e70c95db0e4eb77237530",
17
- "address": "0x5947bb275c521040051d82396192181b413227a3",
18
- "decimals": 18
19
- },
20
- {
21
- "aSymbol": "aUSDT",
22
- "aAddress": "0x6ab707aca953edaefbc4fd23ba73294241490620",
23
- "address": "0x9702230a8ea53601f5cd2dc00fdbc13d4df4a8c7",
24
- "decimals": 6
25
- },
26
- {
27
- "aSymbol": "aUSDC",
28
- "aAddress": "0x625e7708f30ca75bfd92586e17077590c60eb4cd",
29
- "address": "0xb97ef9ef8734c71904d8002f8b6bc66dd9c48a6e",
30
- "decimals": 6
31
- },
32
- {
33
- "aSymbol": "aAAVE",
34
- "aAddress": "0xf329e36c7bf6e5e86ce2150875a84ce77f477375",
35
- "address": "0x63a72806098bd3d9520cc43356dd78afe5d386d9",
36
- "decimals": 18
37
- },
38
- {
39
- "aSymbol": "aWBTC",
40
- "aAddress": "0x078f358208685046a11c85e8ad32895ded33a249",
41
- "address": "0x50b7545627a5162f82a992c33b87adc75187b218",
42
- "decimals": 8
43
- },
44
- {
45
- "aSymbol": "aWAVAX",
46
- "aAddress": "0x6d80113e533a2c0fe82eabd35f1875dcea89ea97",
47
- "address": "0xb31f66aa3c1e785363f0875a1b74e27b85fd66c7",
48
- "decimals": 18
49
- }
50
- ]
@@ -1,62 +0,0 @@
1
- [
2
- {
3
- "aSymbol": "aUSDT",
4
- "aAddress": "0x6ab707aca953edaefbc4fd23ba73294241490620",
5
- "address": "0x049d68029688eabf473097a2fc38ef61633a3c7a",
6
- "decimals": 6
7
- },
8
- {
9
- "aSymbol": "aWBTC",
10
- "aAddress": "0x078f358208685046a11c85e8ad32895ded33a249",
11
- "address": "0x321162cd933e2be498cd2267a90534a804051b11",
12
- "decimals": 8
13
- },
14
- {
15
- "aSymbol": "aWETH",
16
- "aAddress": "0xe50fa9b3c56ffb159cb0fca61f5c9d750e8128c8",
17
- "address": "0x74b23882a30290451a17c44f4f05243b6b58c76d",
18
- "decimals": 18
19
- },
20
- {
21
- "aSymbol": "aAAVE",
22
- "aAddress": "0xf329e36c7bf6e5e86ce2150875a84ce77f477375",
23
- "address": "0x6a07a792ab2965c72a5b8088d3a069a7ac3a993b",
24
- "decimals": 18
25
- },
26
- {
27
- "aSymbol": "aWFTM",
28
- "aAddress": "0x6d80113e533a2c0fe82eabd35f1875dcea89ea97",
29
- "address": "0x21be370d5312f44cb42ce377bc9b8a0cef1a4c83",
30
- "decimals": 18
31
- },
32
- {
33
- "aSymbol": "aDAI",
34
- "aAddress": "0x82e64f49ed5ec1bc6e43dad4fc8af9bb3a2312ee",
35
- "address": "0x8d11ec38a3eb5e956b052f67da8bdc9bef8abf3e",
36
- "decimals": 18
37
- },
38
- {
39
- "aSymbol": "aLINK",
40
- "aAddress": "0x191c10aa4af7c30e871e70c95db0e4eb77237530",
41
- "address": "0xb3654dc3d10ea7645f8319668e8f54d2574fbdc8",
42
- "decimals": 18
43
- },
44
- {
45
- "aSymbol": "aUSDC",
46
- "aAddress": "0x625e7708f30ca75bfd92586e17077590c60eb4cd",
47
- "address": "0x04068da6c83afcfa0e13ba15a6696662335d5b75",
48
- "decimals": 6
49
- },
50
- {
51
- "aSymbol": "aCRV",
52
- "aAddress": "0x513c7e3a9c69ca3e22550ef58ac1c0088e918fff",
53
- "address": "0x1e4f97b9f9f913c46f1632781732927b9019c68b",
54
- "decimals": 18
55
- },
56
- {
57
- "aSymbol": "aSUSHI",
58
- "aAddress": "0xc45a479877e1e9dfe9fcd4056c699575a1045daa",
59
- "address": "0xae75a438b2e0cb8bb01ec1e1e376de11d44477cc",
60
- "decimals": 18
61
- }
62
- ]
@@ -1,44 +0,0 @@
1
- [
2
- {
3
- "aSymbol": "aDAI",
4
- "aAddress": "0x018008bfb33d285247A21d44E50697654f754e63",
5
- "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
6
- "decimals": 18
7
- },
8
- {
9
- "aSymbol": "aUSDC",
10
- "aAddress": "0x98C23E9d8f34FEFb1B7BD6a91B7FF122F4e16F5c",
11
- "address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
12
- "decimals": 6
13
- },
14
- {
15
- "aSymbol": "aAAVE",
16
- "aAddress": "0xA700b4eB416Be35b2911fd5Dee80678ff64fF6C9",
17
- "address": "0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9",
18
- "decimals": 18
19
- },
20
- {
21
- "aSymbol": "aLINK",
22
- "aAddress": "0x5E8C8A7243651DB1384C0dDfDbE39761E8e7E51a",
23
- "address": "0x514910771af9ca656af840dff83e8264ecf986ca",
24
- "decimals": 18
25
- },
26
- {
27
- "aSymbol": "aWBTC",
28
- "aAddress": "0x5Ee5bf7ae06D1Be5997A1A72006FE6C607eC6DE8",
29
- "address": "0x2260fac5e5542a773aa44fbcfedf7c193bc2c599",
30
- "decimals": 8
31
- },
32
- {
33
- "aSymbol": "aWETH",
34
- "aAddress": "0x4d5F47FA6A74757f35C14fD3a6Ef8E3C9BC514E8",
35
- "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
36
- "decimals": 18
37
- },
38
- {
39
- "aSymbol": "awstETH",
40
- "aAddress": "0x0B925eD163218f6662a35e0f0371Ac234f9E9371",
41
- "address": "0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0",
42
- "decimals": 18
43
- }
44
- ]
@@ -1,50 +0,0 @@
1
- [
2
- {
3
- "aSymbol": "aOptAAVE",
4
- "aAddress": "0xf329e36C7bF6E5E86ce2150875a84Ce77f477375",
5
- "address": "0x76fb31fb4af56892a25e32cfc43de717950c9278",
6
- "decimals": 18
7
- },
8
- {
9
- "aSymbol": "aOptDAI",
10
- "aAddress": "0x82E64f49Ed5EC1bC6e43DAD4FC8Af9bb3A2312EE",
11
- "address": "0xda10009cbd5d07dd0cecc66161fc93d7c9000da1",
12
- "decimals": 18
13
- },
14
- {
15
- "aSymbol": "aOptUSDT",
16
- "aAddress": "0x6ab707aca953edaefbc4fd23ba73294241490620",
17
- "address": "0x94b008aa00579c1307b0ef2c499ad98a8ce58e58",
18
- "decimals": 6
19
- },
20
- {
21
- "aSymbol": "aOptLINK",
22
- "aAddress": "0x191c10Aa4AF7C30e871E70C95dB0E4eb77237530",
23
- "address": "0x350a791Bfc2C21F9Ed5d10980Dad2e2638ffa7f6",
24
- "decimals": 18
25
- },
26
- {
27
- "aSymbol": "aOptSUSD",
28
- "aAddress": "0x6d80113e533a2C0fe82EaBD35f1875DcEA89Ea97",
29
- "address": "0x8c6f28f2f1a3c87f0f938b96d27520d9751ec8d9",
30
- "decimals": 18
31
- },
32
- {
33
- "aSymbol": "aOptUSDC",
34
- "aAddress": "0x625E7708f30cA75bfd92586e17077590C60eb4cD",
35
- "address": "0x7f5c764cbc14f9669b88837ca1490cca17c31607",
36
- "decimals": 6
37
- },
38
- {
39
- "aSymbol": "aOptWBTC",
40
- "aAddress": "0x078f358208685046a11C85e8ad32895DED33A249",
41
- "address": "0x68f180fcce6836688e9084f035309e29bf0a2095",
42
- "decimals": 8
43
- },
44
- {
45
- "aSymbol": "aOptWETH",
46
- "aAddress": "0xe50fA9b3c56FfB159cB0FCA61F5c9D750e8128c8",
47
- "address": "0x4200000000000000000000000000000000000006",
48
- "decimals": 18
49
- }
50
- ]
@@ -1,98 +0,0 @@
1
- [
2
- {
3
- "aSymbol": "aAAVE",
4
- "aAddress": "0xf329e36c7bf6e5e86ce2150875a84ce77f477375",
5
- "address": "0xd6df932a45c0f255f85145f286ea0b292b21c90b",
6
- "decimals": 18
7
- },
8
- {
9
- "aSymbol": "aDAI",
10
- "aAddress": "0x82e64f49ed5ec1bc6e43dad4fc8af9bb3a2312ee",
11
- "address": "0x8f3cf7ad23cd3cadbd9735aff958023239c6a063",
12
- "decimals": 18
13
- },
14
- {
15
- "aSymbol": "aUSDC",
16
- "aAddress": "0x625e7708f30ca75bfd92586e17077590c60eb4cd",
17
- "address": "0x2791bca1f2de4661ed88a30c99a7a9449aa84174",
18
- "decimals": 6
19
- },
20
- {
21
- "aSymbol": "aUSDT",
22
- "aAddress": "0x6ab707aca953edaefbc4fd23ba73294241490620",
23
- "address": "0xc2132d05d31c914a87c6611c10748aeb04b58e8f",
24
- "decimals": 6
25
- },
26
- {
27
- "aSymbol": "aWBTC",
28
- "aAddress": "0x078f358208685046a11c85e8ad32895ded33a249",
29
- "address": "0x1bfd67037b42cf73acf2047067bd4f2c47d9bfd6",
30
- "decimals": 8
31
- },
32
- {
33
- "aSymbol": "aWETH",
34
- "aAddress": "0xe50fa9b3c56ffb159cb0fca61f5c9d750e8128c8",
35
- "address": "0x7ceb23fd6bc0add59e62ac25578270cff1b9f619",
36
- "decimals": 18
37
- },
38
- {
39
- "aSymbol": "aWMATIC",
40
- "aAddress": "0x6d80113e533a2c0fe82eabd35f1875dcea89ea97",
41
- "address": "0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270",
42
- "decimals": 18
43
- },
44
- {
45
- "aSymbol": "aLINK",
46
- "aAddress": "0x191c10aa4af7c30e871e70c95db0e4eb77237530",
47
- "address": "0x53e0bca35ec356bd5dddfebbd1fc0fd03fabad39",
48
- "decimals": 18
49
- },
50
- {
51
- "aSymbol": "aEURS",
52
- "aAddress": "0x38d693ce1df5aadf7bc62595a37d667ad57922e5",
53
- "address": "0xe111178a87a3bff0c8d18decba5798827539ae99",
54
- "decimals": 2
55
- },
56
- {
57
- "aSymbol": "aGHST",
58
- "aAddress": "0x8eb270e296023e9d92081fdf967ddd7878724424",
59
- "address": "0x385eeac5cb85a38a9a07a70c73e0a3271cfb54a7",
60
- "decimals": 18
61
- },
62
- {
63
- "aSymbol": "aBAL",
64
- "aAddress": "0x8ffdf2de812095b1d19cb146e4c004587c0a0692",
65
- "address": "0x9a71012b13ca4d3d0cdc72a177df3ef03b0e76a3",
66
- "decimals": 18
67
- },
68
- {
69
- "aSymbol": "aCRV",
70
- "aAddress": "0x513c7e3a9c69ca3e22550ef58ac1c0088e918fff",
71
- "address": "0x172370d5cd63279efa6d502dab29171933a610af",
72
- "decimals": 18
73
- },
74
- {
75
- "aSymbol": "aDPI",
76
- "aAddress": "0x724dc807b04555b71ed48a6896b6f41593b8c637",
77
- "address": "0x85955046df4668e1dd369d2de9f3aeb98dd2a369",
78
- "decimals": 18
79
- },
80
- {
81
- "aSymbol": "aSUSHI",
82
- "aAddress": "0xc45a479877e1e9dfe9fcd4056c699575a1045daa",
83
- "address": "0x0b3f868e0be5597d5db7feb59e1cadbb0fdda50a",
84
- "decimals": 18
85
- },
86
- {
87
- "aSymbol": "aJEUR",
88
- "aAddress": "0x6533afac2e7bccb20dca161449a13a32d391fb00",
89
- "address": "0x4e3decbb3645551b8a19f0ea1678079fcb33fb4c",
90
- "decimals": 18
91
- },
92
- {
93
- "aSymbol": "aAGEUR",
94
- "aAddress": "0x8437d7c167dfb82ed4cb79cd44b7a32a1dd95c77",
95
- "address": "0xe0b52e49357fd4daf2c15e02058dce6bc0057db4",
96
- "decimals": 18
97
- }
98
- ]
@@ -1,79 +0,0 @@
1
- import { Interface } from '@ethersproject/abi';
2
- import { PoolState, SubgraphPoolBase, callData, BalancerSwap } from './types';
3
- import { SwapSide } from '../../constants';
4
- export declare type BoostedPools = {
5
- [id: string]: BoostedPool;
6
- };
7
- export declare type BoostedPool = {
8
- mainTokens: MainToken[];
9
- phantomStablePoolAddr: string;
10
- };
11
- export declare type MainToken = {
12
- address: string;
13
- decimals: number;
14
- linearPoolAddr: string;
15
- linearPoolId: string;
16
- };
17
- export declare type VirtualBoostedPools = {
18
- dictionary: BoostedPools;
19
- subgraph: SubgraphPoolBase[];
20
- };
21
- declare type BoostedPoolPairData = {
22
- tokenIn: string;
23
- tokenOut: string;
24
- phantomPoolId: any;
25
- poolStates: {
26
- [address: string]: PoolState;
27
- };
28
- boostedPools: BoostedPools;
29
- gasCost: number;
30
- };
31
- export declare type SwapData = {
32
- swaps: BalancerSwap[];
33
- assets: string[];
34
- };
35
- export declare class VirtualBoostedPool {
36
- /**
37
- * Creates VirtualBoostedPools from list of input pools. A VirtualBoostedPool is a combination of Linear pools nested in a PhantomStable pool. i.e. bb-a-USD.
38
- * @param pools Array of subgraph pools (should contain Phantom/Linear pools of interest)
39
- * @returns Array of VirtualBoosted subgraph pools. Dictionary object of virtualBoosted pool data.
40
- */
41
- static createPools(pools: SubgraphPoolBase[]): VirtualBoostedPools;
42
- static poolType: string;
43
- vaultAddress: string;
44
- vaultInterface: Interface;
45
- linearPoolInterface: Interface;
46
- phantomStablePoolInterface: Interface;
47
- constructor(vaultAddress: string, vaultInterface: Interface, linearPoolInterface: Interface, metaStablePoolInterface: Interface);
48
- getOnChainCalls(pool: SubgraphPoolBase, virtualBoostedPools: BoostedPools): callData[];
49
- decodeOnChainCalls(pool: SubgraphPoolBase, data: {
50
- success: boolean;
51
- returnData: any;
52
- }[], startIndex: number, boostedPools: BoostedPools): [{
53
- [address: string]: PoolState;
54
- }, number];
55
- static getTokenPool(phantomPoolAddr: string, phantomPoolId: string, tokenAddr: string, boostedPools: BoostedPools): {
56
- address: string;
57
- type: string;
58
- id: string;
59
- };
60
- parsePoolPairData(pool: SubgraphPoolBase, poolStates: {
61
- [address: string]: PoolState;
62
- }, tokenIn: string, tokenOut: string, boostedPools: BoostedPools): BoostedPoolPairData;
63
- checkBalance(amounts: bigint[], unitVolume: bigint, side: SwapSide, poolPairData: BoostedPoolPairData): boolean;
64
- onSell(amounts: bigint[], poolPairData: BoostedPoolPairData): bigint[];
65
- _calcOutGivenIn(tokenAmountsIn: bigint[], tokenIn: string, tokenOut: string, phantomPoolId: string, poolStates: {
66
- [address: string]: PoolState;
67
- }, boostedPools: BoostedPools): bigint[];
68
- /**
69
- * Creates Balancer multihop swaps and asset info required to swap a pair of underlying tokens through the Boosted pools.
70
- * @param tokenIn Underlying token in.
71
- * @param tokenOut Underlying token out.
72
- * @param boostedPoolId ID of the VirtualBoostedPool that tokenIn/Out belong to.
73
- * @param amount Amount being traded.
74
- * @param boostedPools Dictionary of boosted pools.
75
- * @returns Swaps and assets.
76
- */
77
- static getSwapData(tokenIn: string, tokenOut: string, boostedPoolId: string, amount: string, boostedPools: BoostedPools): SwapData;
78
- }
79
- export {};