@paraswap/dex-lib 2.16.1 → 2.16.2-balancer-v2-buy.2

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 (91) hide show
  1. package/build/abi/uniswap-v3/UniswapV3Pool.abi.json +363 -67
  2. package/build/abi/uniswap-v3/UniswapV3Quoter.abi.json +119 -23
  3. package/build/abi/uniswap-v3/pancakeswap-v3/PancakeswapV3QuoterV2.abi.json +285 -0
  4. package/build/abi/uniswap-v3/pancakeswap-v3/PancakeswapV3Router.abi.json +583 -0
  5. package/build/config.js +6 -6
  6. package/build/dex/balancer-v2/balancer-v2.d.ts +9 -14
  7. package/build/dex/balancer-v2/balancer-v2.js +19 -16
  8. package/build/dex/balancer-v2/balancer-v2.js.map +1 -1
  9. package/build/dex/balancer-v2/config.d.ts +2 -7
  10. package/build/dex/balancer-v2/config.js +20 -30
  11. package/build/dex/balancer-v2/config.js.map +1 -1
  12. package/build/dex/balancer-v2/pools/balancer-v2-pool.d.ts +24 -0
  13. package/build/dex/balancer-v2/pools/balancer-v2-pool.js +102 -0
  14. package/build/dex/balancer-v2/pools/balancer-v2-pool.js.map +1 -0
  15. package/build/dex/balancer-v2/pools/linear/LinearMath.d.ts +19 -0
  16. package/build/dex/balancer-v2/pools/linear/LinearMath.js +179 -0
  17. package/build/dex/balancer-v2/pools/linear/LinearMath.js.map +1 -0
  18. package/build/dex/balancer-v2/pools/linear/LinearPool.d.ts +50 -0
  19. package/build/dex/balancer-v2/pools/linear/LinearPool.js +458 -0
  20. package/build/dex/balancer-v2/pools/linear/LinearPool.js.map +1 -0
  21. package/build/dex/balancer-v2/pools/phantom-stable/PhantomStableMath.d.ts +10 -0
  22. package/build/dex/balancer-v2/pools/phantom-stable/PhantomStableMath.js +314 -0
  23. package/build/dex/balancer-v2/pools/phantom-stable/PhantomStableMath.js.map +1 -0
  24. package/build/dex/balancer-v2/pools/phantom-stable/PhantomStablePool.d.ts +50 -0
  25. package/build/dex/balancer-v2/pools/phantom-stable/PhantomStablePool.js +367 -0
  26. package/build/dex/balancer-v2/pools/phantom-stable/PhantomStablePool.js.map +1 -0
  27. package/build/dex/balancer-v2/pools/stable/StableMath.d.ts +7 -0
  28. package/build/dex/balancer-v2/pools/stable/StableMath.js +111 -0
  29. package/build/dex/balancer-v2/pools/stable/StableMath.js.map +1 -0
  30. package/build/dex/balancer-v2/pools/stable/StablePool.d.ts +30 -0
  31. package/build/dex/balancer-v2/pools/stable/StablePool.js +129 -0
  32. package/build/dex/balancer-v2/pools/stable/StablePool.js.map +1 -0
  33. package/build/dex/balancer-v2/pools/weighted/WeightedMath.d.ts +6 -0
  34. package/build/dex/balancer-v2/pools/weighted/WeightedMath.js +61 -0
  35. package/build/dex/balancer-v2/pools/weighted/WeightedMath.js.map +1 -0
  36. package/build/dex/balancer-v2/pools/weighted/WeightedPool.d.ts +30 -0
  37. package/build/dex/balancer-v2/pools/weighted/WeightedPool.js +112 -0
  38. package/build/dex/balancer-v2/pools/weighted/WeightedPool.js.map +1 -0
  39. package/build/dex/index.js +4 -0
  40. package/build/dex/index.js.map +1 -1
  41. package/build/dex/maverick-v1/config.js +1 -1
  42. package/build/dex/maverick-v1/config.js.map +1 -1
  43. package/build/dex/quickswap/config.js +8 -0
  44. package/build/dex/quickswap/config.js.map +1 -1
  45. package/build/dex/quickswap/spiritswap-v3.d.ts +6 -0
  46. package/build/dex/quickswap/spiritswap-v3.js +19 -0
  47. package/build/dex/quickswap/spiritswap-v3.js.map +1 -0
  48. package/build/dex/uniswap-v3/config.js +42 -0
  49. package/build/dex/uniswap-v3/config.js.map +1 -1
  50. package/build/dex/uniswap-v3/forks/pancakeswap-v3/pancakeswap-v3.d.ts +12 -0
  51. package/build/dex/uniswap-v3/forks/pancakeswap-v3/pancakeswap-v3.js +23 -0
  52. package/build/dex/uniswap-v3/forks/pancakeswap-v3/pancakeswap-v3.js.map +1 -0
  53. package/build/dex/uniswap-v3/types.d.ts +3 -0
  54. package/build/dex/uniswap-v3/types.js.map +1 -1
  55. package/build/dex/uniswap-v3/uniswap-v3-pool.d.ts +2 -1
  56. package/build/dex/uniswap-v3/uniswap-v3-pool.js +3 -2
  57. package/build/dex/uniswap-v3/uniswap-v3-pool.js.map +1 -1
  58. package/build/dex/uniswap-v3/uniswap-v3.js +6 -3
  59. package/build/dex/uniswap-v3/uniswap-v3.js.map +1 -1
  60. package/package.json +1 -1
  61. package/src/abi/uniswap-v3/UniswapV3Pool.abi.json +363 -67
  62. package/src/abi/uniswap-v3/UniswapV3Quoter.abi.json +119 -23
  63. package/src/abi/uniswap-v3/pancakeswap-v3/PancakeswapV3QuoterV2.abi.json +285 -0
  64. package/src/abi/uniswap-v3/pancakeswap-v3/PancakeswapV3Router.abi.json +583 -0
  65. package/src/config.ts +6 -6
  66. package/src/dex/balancer-v2/balancer-v2-e2e.test.ts +99 -160
  67. package/src/dex/balancer-v2/balancer-v2.ts +41 -29
  68. package/src/dex/balancer-v2/config.ts +23 -35
  69. package/src/dex/balancer-v2/pools/balancer-v2-pool.ts +273 -0
  70. package/src/dex/balancer-v2/{LinearMath.ts → pools/linear/LinearMath.ts} +1 -1
  71. package/src/dex/balancer-v2/{LinearPool.ts → pools/linear/LinearPool.ts} +210 -5
  72. package/src/dex/balancer-v2/{StableMath.ts → pools/phantom-stable/PhantomStableMath.ts} +101 -21
  73. package/src/dex/balancer-v2/{PhantomStablePool.ts → pools/phantom-stable/PhantomStablePool.ts} +165 -11
  74. package/src/dex/balancer-v2/pools/stable/StableMath.ts +204 -0
  75. package/src/dex/balancer-v2/pools/stable/StablePool.ts +221 -0
  76. package/src/dex/balancer-v2/pools/weighted/WeightedMath.ts +84 -0
  77. package/src/dex/balancer-v2/pools/weighted/WeightedPool.ts +189 -0
  78. package/src/dex/index.ts +4 -0
  79. package/src/dex/maverick-v1/config.ts +1 -1
  80. package/src/dex/quickswap/config.ts +9 -0
  81. package/src/dex/quickswap/quickswap-e2e.test.ts +94 -0
  82. package/src/dex/quickswap/spiritswap-v3.ts +19 -0
  83. package/src/dex/uniswap-v3/config.ts +50 -0
  84. package/src/dex/uniswap-v3/forks/pancakeswap-v3/pancakeswap-v3.ts +28 -0
  85. package/src/dex/uniswap-v3/types.ts +3 -0
  86. package/src/dex/uniswap-v3/uniswap-v3-e2e.test.ts +156 -0
  87. package/src/dex/uniswap-v3/uniswap-v3-pool.ts +3 -2
  88. package/src/dex/uniswap-v3/uniswap-v3.ts +7 -3
  89. package/tests/constants-e2e.ts +11 -6
  90. package/.idea/runConfigurations.xml +0 -10
  91. package/src/dex/balancer-v2/balancer-v2-pool.ts +0 -744
@@ -0,0 +1,583 @@
1
+ [
2
+ {
3
+ "inputs": [
4
+ {
5
+ "internalType": "address",
6
+ "name": "_deployer",
7
+ "type": "address"
8
+ },
9
+ {
10
+ "internalType": "address",
11
+ "name": "_factory",
12
+ "type": "address"
13
+ },
14
+ {
15
+ "internalType": "address",
16
+ "name": "_WETH9",
17
+ "type": "address"
18
+ }
19
+ ],
20
+ "stateMutability": "nonpayable",
21
+ "type": "constructor"
22
+ },
23
+ {
24
+ "inputs": [],
25
+ "name": "WETH9",
26
+ "outputs": [
27
+ {
28
+ "internalType": "address",
29
+ "name": "",
30
+ "type": "address"
31
+ }
32
+ ],
33
+ "stateMutability": "view",
34
+ "type": "function"
35
+ },
36
+ {
37
+ "inputs": [],
38
+ "name": "deployer",
39
+ "outputs": [
40
+ {
41
+ "internalType": "address",
42
+ "name": "",
43
+ "type": "address"
44
+ }
45
+ ],
46
+ "stateMutability": "view",
47
+ "type": "function"
48
+ },
49
+ {
50
+ "inputs": [
51
+ {
52
+ "components": [
53
+ {
54
+ "internalType": "bytes",
55
+ "name": "path",
56
+ "type": "bytes"
57
+ },
58
+ {
59
+ "internalType": "address",
60
+ "name": "recipient",
61
+ "type": "address"
62
+ },
63
+ {
64
+ "internalType": "uint256",
65
+ "name": "deadline",
66
+ "type": "uint256"
67
+ },
68
+ {
69
+ "internalType": "uint256",
70
+ "name": "amountIn",
71
+ "type": "uint256"
72
+ },
73
+ {
74
+ "internalType": "uint256",
75
+ "name": "amountOutMinimum",
76
+ "type": "uint256"
77
+ }
78
+ ],
79
+ "internalType": "struct ISwapRouter.ExactInputParams",
80
+ "name": "params",
81
+ "type": "tuple"
82
+ }
83
+ ],
84
+ "name": "exactInput",
85
+ "outputs": [
86
+ {
87
+ "internalType": "uint256",
88
+ "name": "amountOut",
89
+ "type": "uint256"
90
+ }
91
+ ],
92
+ "stateMutability": "payable",
93
+ "type": "function"
94
+ },
95
+ {
96
+ "inputs": [
97
+ {
98
+ "components": [
99
+ {
100
+ "internalType": "address",
101
+ "name": "tokenIn",
102
+ "type": "address"
103
+ },
104
+ {
105
+ "internalType": "address",
106
+ "name": "tokenOut",
107
+ "type": "address"
108
+ },
109
+ {
110
+ "internalType": "uint24",
111
+ "name": "fee",
112
+ "type": "uint24"
113
+ },
114
+ {
115
+ "internalType": "address",
116
+ "name": "recipient",
117
+ "type": "address"
118
+ },
119
+ {
120
+ "internalType": "uint256",
121
+ "name": "deadline",
122
+ "type": "uint256"
123
+ },
124
+ {
125
+ "internalType": "uint256",
126
+ "name": "amountIn",
127
+ "type": "uint256"
128
+ },
129
+ {
130
+ "internalType": "uint256",
131
+ "name": "amountOutMinimum",
132
+ "type": "uint256"
133
+ },
134
+ {
135
+ "internalType": "uint160",
136
+ "name": "sqrtPriceLimitX96",
137
+ "type": "uint160"
138
+ }
139
+ ],
140
+ "internalType": "struct ISwapRouter.ExactInputSingleParams",
141
+ "name": "params",
142
+ "type": "tuple"
143
+ }
144
+ ],
145
+ "name": "exactInputSingle",
146
+ "outputs": [
147
+ {
148
+ "internalType": "uint256",
149
+ "name": "amountOut",
150
+ "type": "uint256"
151
+ }
152
+ ],
153
+ "stateMutability": "payable",
154
+ "type": "function"
155
+ },
156
+ {
157
+ "inputs": [
158
+ {
159
+ "components": [
160
+ {
161
+ "internalType": "bytes",
162
+ "name": "path",
163
+ "type": "bytes"
164
+ },
165
+ {
166
+ "internalType": "address",
167
+ "name": "recipient",
168
+ "type": "address"
169
+ },
170
+ {
171
+ "internalType": "uint256",
172
+ "name": "deadline",
173
+ "type": "uint256"
174
+ },
175
+ {
176
+ "internalType": "uint256",
177
+ "name": "amountOut",
178
+ "type": "uint256"
179
+ },
180
+ {
181
+ "internalType": "uint256",
182
+ "name": "amountInMaximum",
183
+ "type": "uint256"
184
+ }
185
+ ],
186
+ "internalType": "struct ISwapRouter.ExactOutputParams",
187
+ "name": "params",
188
+ "type": "tuple"
189
+ }
190
+ ],
191
+ "name": "exactOutput",
192
+ "outputs": [
193
+ {
194
+ "internalType": "uint256",
195
+ "name": "amountIn",
196
+ "type": "uint256"
197
+ }
198
+ ],
199
+ "stateMutability": "payable",
200
+ "type": "function"
201
+ },
202
+ {
203
+ "inputs": [
204
+ {
205
+ "components": [
206
+ {
207
+ "internalType": "address",
208
+ "name": "tokenIn",
209
+ "type": "address"
210
+ },
211
+ {
212
+ "internalType": "address",
213
+ "name": "tokenOut",
214
+ "type": "address"
215
+ },
216
+ {
217
+ "internalType": "uint24",
218
+ "name": "fee",
219
+ "type": "uint24"
220
+ },
221
+ {
222
+ "internalType": "address",
223
+ "name": "recipient",
224
+ "type": "address"
225
+ },
226
+ {
227
+ "internalType": "uint256",
228
+ "name": "deadline",
229
+ "type": "uint256"
230
+ },
231
+ {
232
+ "internalType": "uint256",
233
+ "name": "amountOut",
234
+ "type": "uint256"
235
+ },
236
+ {
237
+ "internalType": "uint256",
238
+ "name": "amountInMaximum",
239
+ "type": "uint256"
240
+ },
241
+ {
242
+ "internalType": "uint160",
243
+ "name": "sqrtPriceLimitX96",
244
+ "type": "uint160"
245
+ }
246
+ ],
247
+ "internalType": "struct ISwapRouter.ExactOutputSingleParams",
248
+ "name": "params",
249
+ "type": "tuple"
250
+ }
251
+ ],
252
+ "name": "exactOutputSingle",
253
+ "outputs": [
254
+ {
255
+ "internalType": "uint256",
256
+ "name": "amountIn",
257
+ "type": "uint256"
258
+ }
259
+ ],
260
+ "stateMutability": "payable",
261
+ "type": "function"
262
+ },
263
+ {
264
+ "inputs": [],
265
+ "name": "factory",
266
+ "outputs": [
267
+ {
268
+ "internalType": "address",
269
+ "name": "",
270
+ "type": "address"
271
+ }
272
+ ],
273
+ "stateMutability": "view",
274
+ "type": "function"
275
+ },
276
+ {
277
+ "inputs": [
278
+ {
279
+ "internalType": "bytes[]",
280
+ "name": "data",
281
+ "type": "bytes[]"
282
+ }
283
+ ],
284
+ "name": "multicall",
285
+ "outputs": [
286
+ {
287
+ "internalType": "bytes[]",
288
+ "name": "results",
289
+ "type": "bytes[]"
290
+ }
291
+ ],
292
+ "stateMutability": "payable",
293
+ "type": "function"
294
+ },
295
+ {
296
+ "inputs": [
297
+ {
298
+ "internalType": "int256",
299
+ "name": "amount0Delta",
300
+ "type": "int256"
301
+ },
302
+ {
303
+ "internalType": "int256",
304
+ "name": "amount1Delta",
305
+ "type": "int256"
306
+ },
307
+ {
308
+ "internalType": "bytes",
309
+ "name": "_data",
310
+ "type": "bytes"
311
+ }
312
+ ],
313
+ "name": "pancakeV3SwapCallback",
314
+ "outputs": [],
315
+ "stateMutability": "nonpayable",
316
+ "type": "function"
317
+ },
318
+ {
319
+ "inputs": [],
320
+ "name": "refundETH",
321
+ "outputs": [],
322
+ "stateMutability": "payable",
323
+ "type": "function"
324
+ },
325
+ {
326
+ "inputs": [
327
+ {
328
+ "internalType": "address",
329
+ "name": "token",
330
+ "type": "address"
331
+ },
332
+ {
333
+ "internalType": "uint256",
334
+ "name": "value",
335
+ "type": "uint256"
336
+ },
337
+ {
338
+ "internalType": "uint256",
339
+ "name": "deadline",
340
+ "type": "uint256"
341
+ },
342
+ {
343
+ "internalType": "uint8",
344
+ "name": "v",
345
+ "type": "uint8"
346
+ },
347
+ {
348
+ "internalType": "bytes32",
349
+ "name": "r",
350
+ "type": "bytes32"
351
+ },
352
+ {
353
+ "internalType": "bytes32",
354
+ "name": "s",
355
+ "type": "bytes32"
356
+ }
357
+ ],
358
+ "name": "selfPermit",
359
+ "outputs": [],
360
+ "stateMutability": "payable",
361
+ "type": "function"
362
+ },
363
+ {
364
+ "inputs": [
365
+ {
366
+ "internalType": "address",
367
+ "name": "token",
368
+ "type": "address"
369
+ },
370
+ {
371
+ "internalType": "uint256",
372
+ "name": "nonce",
373
+ "type": "uint256"
374
+ },
375
+ {
376
+ "internalType": "uint256",
377
+ "name": "expiry",
378
+ "type": "uint256"
379
+ },
380
+ {
381
+ "internalType": "uint8",
382
+ "name": "v",
383
+ "type": "uint8"
384
+ },
385
+ {
386
+ "internalType": "bytes32",
387
+ "name": "r",
388
+ "type": "bytes32"
389
+ },
390
+ {
391
+ "internalType": "bytes32",
392
+ "name": "s",
393
+ "type": "bytes32"
394
+ }
395
+ ],
396
+ "name": "selfPermitAllowed",
397
+ "outputs": [],
398
+ "stateMutability": "payable",
399
+ "type": "function"
400
+ },
401
+ {
402
+ "inputs": [
403
+ {
404
+ "internalType": "address",
405
+ "name": "token",
406
+ "type": "address"
407
+ },
408
+ {
409
+ "internalType": "uint256",
410
+ "name": "nonce",
411
+ "type": "uint256"
412
+ },
413
+ {
414
+ "internalType": "uint256",
415
+ "name": "expiry",
416
+ "type": "uint256"
417
+ },
418
+ {
419
+ "internalType": "uint8",
420
+ "name": "v",
421
+ "type": "uint8"
422
+ },
423
+ {
424
+ "internalType": "bytes32",
425
+ "name": "r",
426
+ "type": "bytes32"
427
+ },
428
+ {
429
+ "internalType": "bytes32",
430
+ "name": "s",
431
+ "type": "bytes32"
432
+ }
433
+ ],
434
+ "name": "selfPermitAllowedIfNecessary",
435
+ "outputs": [],
436
+ "stateMutability": "payable",
437
+ "type": "function"
438
+ },
439
+ {
440
+ "inputs": [
441
+ {
442
+ "internalType": "address",
443
+ "name": "token",
444
+ "type": "address"
445
+ },
446
+ {
447
+ "internalType": "uint256",
448
+ "name": "value",
449
+ "type": "uint256"
450
+ },
451
+ {
452
+ "internalType": "uint256",
453
+ "name": "deadline",
454
+ "type": "uint256"
455
+ },
456
+ {
457
+ "internalType": "uint8",
458
+ "name": "v",
459
+ "type": "uint8"
460
+ },
461
+ {
462
+ "internalType": "bytes32",
463
+ "name": "r",
464
+ "type": "bytes32"
465
+ },
466
+ {
467
+ "internalType": "bytes32",
468
+ "name": "s",
469
+ "type": "bytes32"
470
+ }
471
+ ],
472
+ "name": "selfPermitIfNecessary",
473
+ "outputs": [],
474
+ "stateMutability": "payable",
475
+ "type": "function"
476
+ },
477
+ {
478
+ "inputs": [
479
+ {
480
+ "internalType": "address",
481
+ "name": "token",
482
+ "type": "address"
483
+ },
484
+ {
485
+ "internalType": "uint256",
486
+ "name": "amountMinimum",
487
+ "type": "uint256"
488
+ },
489
+ {
490
+ "internalType": "address",
491
+ "name": "recipient",
492
+ "type": "address"
493
+ }
494
+ ],
495
+ "name": "sweepToken",
496
+ "outputs": [],
497
+ "stateMutability": "payable",
498
+ "type": "function"
499
+ },
500
+ {
501
+ "inputs": [
502
+ {
503
+ "internalType": "address",
504
+ "name": "token",
505
+ "type": "address"
506
+ },
507
+ {
508
+ "internalType": "uint256",
509
+ "name": "amountMinimum",
510
+ "type": "uint256"
511
+ },
512
+ {
513
+ "internalType": "address",
514
+ "name": "recipient",
515
+ "type": "address"
516
+ },
517
+ {
518
+ "internalType": "uint256",
519
+ "name": "feeBips",
520
+ "type": "uint256"
521
+ },
522
+ {
523
+ "internalType": "address",
524
+ "name": "feeRecipient",
525
+ "type": "address"
526
+ }
527
+ ],
528
+ "name": "sweepTokenWithFee",
529
+ "outputs": [],
530
+ "stateMutability": "payable",
531
+ "type": "function"
532
+ },
533
+ {
534
+ "inputs": [
535
+ {
536
+ "internalType": "uint256",
537
+ "name": "amountMinimum",
538
+ "type": "uint256"
539
+ },
540
+ {
541
+ "internalType": "address",
542
+ "name": "recipient",
543
+ "type": "address"
544
+ }
545
+ ],
546
+ "name": "unwrapWETH9",
547
+ "outputs": [],
548
+ "stateMutability": "payable",
549
+ "type": "function"
550
+ },
551
+ {
552
+ "inputs": [
553
+ {
554
+ "internalType": "uint256",
555
+ "name": "amountMinimum",
556
+ "type": "uint256"
557
+ },
558
+ {
559
+ "internalType": "address",
560
+ "name": "recipient",
561
+ "type": "address"
562
+ },
563
+ {
564
+ "internalType": "uint256",
565
+ "name": "feeBips",
566
+ "type": "uint256"
567
+ },
568
+ {
569
+ "internalType": "address",
570
+ "name": "feeRecipient",
571
+ "type": "address"
572
+ }
573
+ ],
574
+ "name": "unwrapWETH9WithFee",
575
+ "outputs": [],
576
+ "stateMutability": "payable",
577
+ "type": "function"
578
+ },
579
+ {
580
+ "stateMutability": "payable",
581
+ "type": "receive"
582
+ }
583
+ ]
package/build/config.js CHANGED
@@ -22,7 +22,7 @@ const baseConfigs = {
22
22
  Adapter02: '0xFC2Ba6E830a04C25e207B8214b26d8C713F6881F',
23
23
  Adapter03: '0x7c7f62e5ba00783f57b39df0530e32c195696a57',
24
24
  Adapter04: '0x21ab8aeb35bfc0b3fd84ca810b0aa85938357be2',
25
- BuyAdapter: '0x760870be538e7b4E2110e2890473CC17ADB1fdC1',
25
+ BuyAdapter: '0xb2634b3cbc1e401ab3c2743db44d459c5c9aa662',
26
26
  },
27
27
  uniswapV2ExchangeRouterAddress: '0xF9234CB08edb93c0d4a4d4c70cC3FfD070e78e07',
28
28
  rpcPollingMaxAllowedStateDelayInBlocks: 0,
@@ -150,7 +150,7 @@ const baseConfigs = {
150
150
  adapterAddresses: {
151
151
  PolygonAdapter01: '0xE44769f42E1e9592f86B82f206407a8f7C84b4ed',
152
152
  PolygonAdapter02: '0xfb2a3de6c7B8c77b520E3da16021f3D8A4E93168',
153
- PolygonBuyAdapter: '0xbE36ddfCDB6D60c1B20FfD73594540E5cc2c7E97',
153
+ PolygonBuyAdapter: '0xb2634B3CBc1E401AB3C2743DB44d459C5c9aA662',
154
154
  },
155
155
  uniswapV2ExchangeRouterAddress: '0xf3938337F7294fEf84e9B2c6D548A93F956Cc281',
156
156
  uniswapV3EventLoggingSampleRate: 0,
@@ -199,8 +199,8 @@ const baseConfigs = {
199
199
  hashFlowAuthToken: process.env.API_KEY_HASHFLOW_AUTH_TOKEN || '',
200
200
  hashFlowDisabledMMs: process.env[`HASHFLOW_DISABLED_MMS_250`]?.split(',') || [],
201
201
  adapterAddresses: {
202
- FantomAdapter01: '0x66152A2a538644Ae125570De522ADEaC9E41D865',
203
- FantomBuyAdapter: '0x27eb327B7255a2bF666EBB4D60AB4752dA4611b9',
202
+ FantomAdapter01: '0x434C1Cca4842629230067674Dd54E21a14D9FD5D',
203
+ FantomBuyAdapter: '0xb2634B3CBc1E401AB3C2743DB44d459C5c9aA662',
204
204
  },
205
205
  uniswapV2ExchangeRouterAddress: '0xAB86e2bC9ec5485a9b60E684BA6d49bf4686ACC2',
206
206
  rfqConfigs: {},
@@ -225,7 +225,7 @@ const baseConfigs = {
225
225
  adapterAddresses: {
226
226
  ArbitrumAdapter01: '0x745Ec73855CeC7249E5fF4c9DD81cc65b4D297a9',
227
227
  ArbitrumAdapter02: '0xCBaeB06C2dF373c07A2Dc205266EC3bCd525DfB6',
228
- ArbitrumBuyAdapter: '0xfa072107a2CCfE5664794282EF36400735ABB70F',
228
+ ArbitrumBuyAdapter: '0xeBF40A40CA3D4310Bf53048F48e860656e1D7C81',
229
229
  },
230
230
  uniswapV2ExchangeRouterAddress: '0xB41dD984730dAf82f5C41489E21ac79D5e3B61bC',
231
231
  uniswapV3EventLoggingSampleRate: 0,
@@ -250,7 +250,7 @@ const baseConfigs = {
250
250
  hashFlowDisabledMMs: process.env[`HASHFLOW_DISABLED_MMS_10`]?.split(',') || [],
251
251
  adapterAddresses: {
252
252
  OptimismAdapter01: '0x4669D27A649f5451e0D44C20a2b246431F1B0572',
253
- OptimismBuyAdapter: '0x4Ae8ad57912e207f5bFaFbF2e90486e5feab1634',
253
+ OptimismBuyAdapter: '0xb2634B3CBc1E401AB3C2743DB44d459C5c9aA662',
254
254
  },
255
255
  uniswapV2ExchangeRouterAddress: '0xB41dD984730dAf82f5C41489E21ac79D5e3B61bC',
256
256
  uniswapV3EventLoggingSampleRate: 0,
@@ -1,15 +1,16 @@
1
1
  /// <reference types="node" />
2
2
  import { Interface } from '@ethersproject/abi';
3
3
  import { DeepReadonly } from 'ts-essentials';
4
- import { Token, Address, ExchangePrices, PoolPrices, Log, AdapterExchangeParam, SimpleExchangeParam, PoolLiquidity, Logger } from '../../types';
5
- import { SwapSide, Network } from '../../constants';
6
- import { StablePool, WeightedPool } from './balancer-v2-pool';
7
- import { PhantomStablePool } from './PhantomStablePool';
8
- import { LinearPool } from './LinearPool';
4
+ import { AdapterExchangeParam, Address, ExchangePrices, Log, Logger, PoolLiquidity, PoolPrices, SimpleExchangeParam, Token } from '../../types';
5
+ import { Network, SwapSide } from '../../constants';
6
+ import { StablePool } from './pools/stable/StablePool';
7
+ import { WeightedPool } from './pools/weighted/WeightedPool';
8
+ import { PhantomStablePool } from './pools/phantom-stable/PhantomStablePool';
9
+ import { LinearPool } from './pools/linear/LinearPool';
9
10
  import { StatefulEventSubscriber } from '../../stateful-event-subscriber';
10
11
  import { IDex } from '../../dex/idex';
11
12
  import { IDexHelper } from '../../dex-helper';
12
- import { PoolState, SubgraphPoolBase, BalancerV2Data, BalancerParam, OptimizedBalancerV2Data, PoolStateMap, PoolStateCache, BalancerPoolTypes } from './types';
13
+ import { BalancerParam, BalancerPoolTypes, BalancerV2Data, OptimizedBalancerV2Data, PoolState, PoolStateCache, PoolStateMap, SubgraphPoolBase } from './types';
13
14
  import { SimpleExchange } from '../simple-exchange';
14
15
  export declare class BalancerV2EventPool extends StatefulEventSubscriber<PoolStateMap> {
15
16
  protected network: number;
@@ -45,10 +46,7 @@ export declare class BalancerV2 extends SimpleExchange implements IDex<BalancerV
45
46
  protected dexHelper: IDexHelper;
46
47
  protected vaultAddress: Address;
47
48
  protected subgraphURL: string;
48
- protected adapters: {
49
- name: string;
50
- index: number;
51
- }[];
49
+ protected adapters: import("../../types").AdapterMappings;
52
50
  protected eventPools: BalancerV2EventPool;
53
51
  readonly hasConstantPriceLargeAmounts = false;
54
52
  readonly isFeeOnTransferSupported = false;
@@ -60,10 +58,7 @@ export declare class BalancerV2 extends SimpleExchange implements IDex<BalancerV
60
58
  nonEventPoolStateCache: PoolStateCache;
61
59
  eventDisabledPoolsTimer?: NodeJS.Timer;
62
60
  eventDisabledPools: Address[];
63
- constructor(network: Network, dexKey: string, dexHelper: IDexHelper, vaultAddress?: Address, subgraphURL?: string, adapters?: {
64
- name: string;
65
- index: number;
66
- }[]);
61
+ constructor(network: Network, dexKey: string, dexHelper: IDexHelper, vaultAddress?: Address, subgraphURL?: string, adapters?: import("../../types").AdapterMappings);
67
62
  setupEventPools(blockNumber: number): Promise<void>;
68
63
  fetchEventDisabledPools(): Promise<void>;
69
64
  initializePricing(blockNumber: number): Promise<void>;