@nradko/metric-omm-sdk-v1 0.3.0 → 0.4.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 (110) hide show
  1. package/README.md +98 -111
  2. package/dist/abis/MetricOmmPool.d.ts +14 -0
  3. package/dist/abis/MetricOmmPool.d.ts.map +1 -1
  4. package/dist/abis/MetricOmmPool.js +18 -0
  5. package/dist/abis/MetricOmmPool.js.map +1 -1
  6. package/dist/abis/MetricOmmPoolDataProvider.d.ts +0 -136
  7. package/dist/abis/MetricOmmPoolDataProvider.d.ts.map +1 -1
  8. package/dist/abis/MetricOmmPoolDataProvider.js +0 -177
  9. package/dist/abis/MetricOmmPoolDataProvider.js.map +1 -1
  10. package/dist/abis/MetricOmmPoolStateView.d.ts +238 -0
  11. package/dist/abis/MetricOmmPoolStateView.d.ts.map +1 -0
  12. package/dist/abis/MetricOmmPoolStateView.js +315 -0
  13. package/dist/abis/MetricOmmPoolStateView.js.map +1 -0
  14. package/dist/abis/MetricOmmSimpleRouter.d.ts +619 -0
  15. package/dist/abis/{MetricOmmPoolSwapper.d.ts.map → MetricOmmSimpleRouter.d.ts.map} +1 -1
  16. package/dist/abis/MetricOmmSimpleRouter.js +805 -0
  17. package/dist/abis/MetricOmmSimpleRouter.js.map +1 -0
  18. package/dist/abis/MetricOmmSwapQuoter.d.ts +576 -0
  19. package/dist/abis/{PriceProviderUi.d.ts.map → MetricOmmSwapQuoter.d.ts.map} +1 -1
  20. package/dist/abis/MetricOmmSwapQuoter.js +748 -0
  21. package/dist/abis/MetricOmmSwapQuoter.js.map +1 -0
  22. package/dist/abis/OracleProvider.d.ts +106 -0
  23. package/dist/abis/OracleProvider.d.ts.map +1 -0
  24. package/dist/abis/OracleProvider.js +62 -0
  25. package/dist/abis/OracleProvider.js.map +1 -0
  26. package/dist/abis/PriceProvider.d.ts +8 -2
  27. package/dist/abis/PriceProvider.d.ts.map +1 -1
  28. package/dist/abis/PriceProvider.js +9 -1
  29. package/dist/abis/PriceProvider.js.map +1 -1
  30. package/dist/abis/index.d.ts +4 -2
  31. package/dist/abis/index.d.ts.map +1 -1
  32. package/dist/abis/index.js +4 -2
  33. package/dist/abis/index.js.map +1 -1
  34. package/dist/addresses.d.ts +3 -3
  35. package/dist/addresses.d.ts.map +1 -1
  36. package/dist/addresses.js +10 -10
  37. package/dist/addresses.js.map +1 -1
  38. package/dist/constants.d.ts +4 -1
  39. package/dist/constants.d.ts.map +1 -1
  40. package/dist/constants.js +7 -2
  41. package/dist/constants.js.map +1 -1
  42. package/dist/index.d.ts +5 -3
  43. package/dist/index.d.ts.map +1 -1
  44. package/dist/index.js +8 -4
  45. package/dist/index.js.map +1 -1
  46. package/dist/oracle/index.d.ts +5 -0
  47. package/dist/oracle/index.d.ts.map +1 -0
  48. package/dist/oracle/index.js +5 -0
  49. package/dist/oracle/index.js.map +1 -0
  50. package/dist/oracle/registry.d.ts +53 -0
  51. package/dist/oracle/registry.d.ts.map +1 -0
  52. package/dist/oracle/registry.js +70 -0
  53. package/dist/oracle/registry.js.map +1 -0
  54. package/dist/quoter/index.d.ts +6 -0
  55. package/dist/quoter/index.d.ts.map +1 -0
  56. package/dist/quoter/index.js +6 -0
  57. package/dist/quoter/index.js.map +1 -0
  58. package/dist/quoter/quote.d.ts +58 -0
  59. package/dist/quoter/quote.d.ts.map +1 -0
  60. package/dist/quoter/quote.js +74 -0
  61. package/dist/quoter/quote.js.map +1 -0
  62. package/dist/quoter/quotePath.d.ts +65 -0
  63. package/dist/quoter/quotePath.d.ts.map +1 -0
  64. package/dist/quoter/quotePath.js +108 -0
  65. package/dist/quoter/quotePath.js.map +1 -0
  66. package/dist/router/index.d.ts +2 -1
  67. package/dist/router/index.d.ts.map +1 -1
  68. package/dist/router/index.js +2 -1
  69. package/dist/router/index.js.map +1 -1
  70. package/dist/router/swap.d.ts +37 -92
  71. package/dist/router/swap.d.ts.map +1 -1
  72. package/dist/router/swap.js +96 -298
  73. package/dist/router/swap.js.map +1 -1
  74. package/dist/router/swapPath.d.ts +56 -0
  75. package/dist/router/swapPath.d.ts.map +1 -0
  76. package/dist/router/swapPath.js +98 -0
  77. package/dist/router/swapPath.js.map +1 -0
  78. package/dist/swap/path.d.ts +13 -0
  79. package/dist/swap/path.d.ts.map +1 -0
  80. package/dist/swap/path.js +74 -0
  81. package/dist/swap/path.js.map +1 -0
  82. package/package.json +4 -5
  83. package/src/abis/MetricOmmPool.ts +18 -0
  84. package/src/abis/MetricOmmPoolDataProvider.ts +0 -177
  85. package/src/abis/MetricOmmPoolStateView.ts +314 -0
  86. package/src/abis/MetricOmmSimpleRouter.ts +804 -0
  87. package/src/abis/MetricOmmSwapQuoter.ts +747 -0
  88. package/src/abis/OracleProvider.ts +61 -0
  89. package/src/abis/PriceProvider.ts +9 -1
  90. package/src/abis/index.ts +4 -2
  91. package/src/addresses.ts +13 -13
  92. package/src/constants.ts +7 -2
  93. package/src/index.ts +62 -23
  94. package/src/oracle/index.ts +14 -0
  95. package/src/oracle/registry.ts +146 -0
  96. package/src/quoter/index.ts +28 -0
  97. package/src/quoter/quote.ts +193 -0
  98. package/src/quoter/quotePath.ts +240 -0
  99. package/src/router/index.ts +24 -25
  100. package/src/router/swap.ts +142 -480
  101. package/src/router/swapPath.ts +181 -0
  102. package/src/swap/path.ts +107 -0
  103. package/dist/abis/MetricOmmPoolSwapper.d.ts +0 -917
  104. package/dist/abis/MetricOmmPoolSwapper.js +0 -1185
  105. package/dist/abis/MetricOmmPoolSwapper.js.map +0 -1
  106. package/dist/abis/PriceProviderUi.d.ts +0 -433
  107. package/dist/abis/PriceProviderUi.js +0 -318
  108. package/dist/abis/PriceProviderUi.js.map +0 -1
  109. package/src/abis/MetricOmmPoolSwapper.ts +0 -1184
  110. package/src/abis/PriceProviderUi.ts +0 -317
@@ -1,1185 +0,0 @@
1
- export const MetricOmmPoolSwapperAbi = [
2
- {
3
- inputs: [
4
- {
5
- internalType: "address",
6
- name: "weth",
7
- type: "address",
8
- },
9
- ],
10
- stateMutability: "nonpayable",
11
- type: "constructor",
12
- },
13
- {
14
- inputs: [
15
- {
16
- internalType: "int128",
17
- name: "expectedAmountSpecified",
18
- type: "int128",
19
- },
20
- {
21
- internalType: "int128",
22
- name: "actualDelta",
23
- type: "int128",
24
- },
25
- ],
26
- name: "AmountSpecifiedMismatch",
27
- type: "error",
28
- },
29
- {
30
- inputs: [
31
- {
32
- internalType: "uint128",
33
- name: "amount",
34
- type: "uint128",
35
- },
36
- ],
37
- name: "AmountTooLarge",
38
- type: "error",
39
- },
40
- {
41
- inputs: [
42
- {
43
- internalType: "uint256",
44
- name: "amountIn",
45
- type: "uint256",
46
- },
47
- {
48
- internalType: "uint256",
49
- name: "maxAmountIn",
50
- type: "uint256",
51
- },
52
- ],
53
- name: "InputTooHigh",
54
- type: "error",
55
- },
56
- {
57
- inputs: [
58
- {
59
- internalType: "uint256",
60
- name: "required",
61
- type: "uint256",
62
- },
63
- {
64
- internalType: "uint256",
65
- name: "available",
66
- type: "uint256",
67
- },
68
- ],
69
- name: "InsufficientNativeValue",
70
- type: "error",
71
- },
72
- {
73
- inputs: [
74
- {
75
- internalType: "uint256",
76
- name: "amountOut",
77
- type: "uint256",
78
- },
79
- {
80
- internalType: "uint256",
81
- name: "minAmountOut",
82
- type: "uint256",
83
- },
84
- ],
85
- name: "InsufficientOutput",
86
- type: "error",
87
- },
88
- {
89
- inputs: [],
90
- name: "InvalidCallbackCaller",
91
- type: "error",
92
- },
93
- {
94
- inputs: [
95
- {
96
- internalType: "bool",
97
- name: "zeroForOne",
98
- type: "bool",
99
- },
100
- {
101
- internalType: "uint128",
102
- name: "priceLimitX64",
103
- type: "uint128",
104
- },
105
- ],
106
- name: "InvalidPriceLimitForDirection",
107
- type: "error",
108
- },
109
- {
110
- inputs: [],
111
- name: "InvalidSwapDeltas",
112
- type: "error",
113
- },
114
- {
115
- inputs: [],
116
- name: "InvalidWETH",
117
- type: "error",
118
- },
119
- {
120
- inputs: [
121
- {
122
- internalType: "address",
123
- name: "token",
124
- type: "address",
125
- },
126
- ],
127
- name: "NativeInputNotSupported",
128
- type: "error",
129
- },
130
- {
131
- inputs: [
132
- {
133
- internalType: "address",
134
- name: "token",
135
- type: "address",
136
- },
137
- ],
138
- name: "NativeOutputNotSupported",
139
- type: "error",
140
- },
141
- {
142
- inputs: [],
143
- name: "NativeTransferFailed",
144
- type: "error",
145
- },
146
- {
147
- inputs: [],
148
- name: "NativeValueNotExpected",
149
- type: "error",
150
- },
151
- {
152
- inputs: [
153
- {
154
- internalType: "address",
155
- name: "token",
156
- type: "address",
157
- },
158
- ],
159
- name: "SafeERC20FailedOperation",
160
- type: "error",
161
- },
162
- {
163
- inputs: [],
164
- name: "SwapInProgress",
165
- type: "error",
166
- },
167
- {
168
- inputs: [
169
- {
170
- internalType: "uint256",
171
- name: "deadline",
172
- type: "uint256",
173
- },
174
- {
175
- internalType: "uint256",
176
- name: "timestamp",
177
- type: "uint256",
178
- },
179
- ],
180
- name: "TransactionExpired",
181
- type: "error",
182
- },
183
- {
184
- inputs: [
185
- {
186
- internalType: "address",
187
- name: "target",
188
- type: "address",
189
- },
190
- {
191
- internalType: "bytes4",
192
- name: "selector",
193
- type: "bytes4",
194
- },
195
- {
196
- internalType: "bytes",
197
- name: "reason",
198
- type: "bytes",
199
- },
200
- {
201
- internalType: "bytes",
202
- name: "additionalInfo",
203
- type: "bytes",
204
- },
205
- ],
206
- name: "WrappedError",
207
- type: "error",
208
- },
209
- {
210
- inputs: [
211
- {
212
- internalType: "int256",
213
- name: "amount0Delta",
214
- type: "int256",
215
- },
216
- {
217
- internalType: "int256",
218
- name: "amount1Delta",
219
- type: "int256",
220
- },
221
- {
222
- internalType: "bytes",
223
- name: "",
224
- type: "bytes",
225
- },
226
- ],
227
- name: "metricOmmSwapCallback",
228
- outputs: [],
229
- stateMutability: "nonpayable",
230
- type: "function",
231
- },
232
- {
233
- inputs: [
234
- {
235
- internalType: "address",
236
- name: "pool",
237
- type: "address",
238
- },
239
- {
240
- internalType: "bool",
241
- name: "zeroForOne",
242
- type: "bool",
243
- },
244
- {
245
- internalType: "int128",
246
- name: "amountSpecified",
247
- type: "int128",
248
- },
249
- {
250
- internalType: "uint128",
251
- name: "priceLimitX64",
252
- type: "uint128",
253
- },
254
- {
255
- internalType: "uint128",
256
- name: "bidPriceX64",
257
- type: "uint128",
258
- },
259
- {
260
- internalType: "uint128",
261
- name: "askPriceX64",
262
- type: "uint128",
263
- },
264
- ],
265
- name: "quoteSwap",
266
- outputs: [
267
- {
268
- internalType: "int128",
269
- name: "amount0Delta",
270
- type: "int128",
271
- },
272
- {
273
- internalType: "int128",
274
- name: "amount1Delta",
275
- type: "int128",
276
- },
277
- ],
278
- stateMutability: "nonpayable",
279
- type: "function",
280
- },
281
- {
282
- inputs: [
283
- {
284
- internalType: "address",
285
- name: "pool",
286
- type: "address",
287
- },
288
- {
289
- internalType: "address",
290
- name: "recipient",
291
- type: "address",
292
- },
293
- {
294
- internalType: "bool",
295
- name: "zeroForOne",
296
- type: "bool",
297
- },
298
- {
299
- internalType: "int128",
300
- name: "amountSpecified",
301
- type: "int128",
302
- },
303
- {
304
- internalType: "uint128",
305
- name: "priceLimitX64",
306
- type: "uint128",
307
- },
308
- {
309
- internalType: "uint128",
310
- name: "bidPriceX64",
311
- type: "uint128",
312
- },
313
- {
314
- internalType: "uint128",
315
- name: "askPriceX64",
316
- type: "uint128",
317
- },
318
- {
319
- internalType: "bytes",
320
- name: "extensionData",
321
- type: "bytes",
322
- },
323
- ],
324
- name: "quoteSwap",
325
- outputs: [
326
- {
327
- internalType: "int128",
328
- name: "amount0Delta",
329
- type: "int128",
330
- },
331
- {
332
- internalType: "int128",
333
- name: "amount1Delta",
334
- type: "int128",
335
- },
336
- ],
337
- stateMutability: "nonpayable",
338
- type: "function",
339
- },
340
- {
341
- inputs: [
342
- {
343
- internalType: "address",
344
- name: "pool",
345
- type: "address",
346
- },
347
- {
348
- internalType: "address",
349
- name: "recipient",
350
- type: "address",
351
- },
352
- {
353
- internalType: "bool",
354
- name: "zeroForOne",
355
- type: "bool",
356
- },
357
- {
358
- internalType: "int128",
359
- name: "amountSpecified",
360
- type: "int128",
361
- },
362
- {
363
- internalType: "uint128",
364
- name: "priceLimitX64",
365
- type: "uint128",
366
- },
367
- {
368
- internalType: "uint256",
369
- name: "deadline",
370
- type: "uint256",
371
- },
372
- {
373
- internalType: "bytes",
374
- name: "data",
375
- type: "bytes",
376
- },
377
- {
378
- internalType: "bytes",
379
- name: "extensionData",
380
- type: "bytes",
381
- },
382
- ],
383
- name: "swap",
384
- outputs: [
385
- {
386
- internalType: "int128",
387
- name: "amount0Delta",
388
- type: "int128",
389
- },
390
- {
391
- internalType: "int128",
392
- name: "amount1Delta",
393
- type: "int128",
394
- },
395
- ],
396
- stateMutability: "payable",
397
- type: "function",
398
- },
399
- {
400
- inputs: [
401
- {
402
- internalType: "address",
403
- name: "pool",
404
- type: "address",
405
- },
406
- {
407
- internalType: "address",
408
- name: "recipient",
409
- type: "address",
410
- },
411
- {
412
- internalType: "bool",
413
- name: "zeroForOne",
414
- type: "bool",
415
- },
416
- {
417
- internalType: "int128",
418
- name: "amountSpecified",
419
- type: "int128",
420
- },
421
- {
422
- internalType: "uint128",
423
- name: "priceLimitX64",
424
- type: "uint128",
425
- },
426
- {
427
- internalType: "uint256",
428
- name: "deadline",
429
- type: "uint256",
430
- },
431
- {
432
- internalType: "bytes",
433
- name: "data",
434
- type: "bytes",
435
- },
436
- ],
437
- name: "swap",
438
- outputs: [
439
- {
440
- internalType: "int128",
441
- name: "amount0Delta",
442
- type: "int128",
443
- },
444
- {
445
- internalType: "int128",
446
- name: "amount1Delta",
447
- type: "int128",
448
- },
449
- ],
450
- stateMutability: "payable",
451
- type: "function",
452
- },
453
- {
454
- inputs: [
455
- {
456
- internalType: "address",
457
- name: "pool",
458
- type: "address",
459
- },
460
- {
461
- internalType: "address",
462
- name: "recipient",
463
- type: "address",
464
- },
465
- {
466
- internalType: "bool",
467
- name: "zeroForOne",
468
- type: "bool",
469
- },
470
- {
471
- internalType: "int128",
472
- name: "amountSpecified",
473
- type: "int128",
474
- },
475
- {
476
- internalType: "uint128",
477
- name: "priceLimitX64",
478
- type: "uint128",
479
- },
480
- {
481
- internalType: "uint256",
482
- name: "deadline",
483
- type: "uint256",
484
- },
485
- ],
486
- name: "swap",
487
- outputs: [
488
- {
489
- internalType: "int128",
490
- name: "amount0Delta",
491
- type: "int128",
492
- },
493
- {
494
- internalType: "int128",
495
- name: "amount1Delta",
496
- type: "int128",
497
- },
498
- ],
499
- stateMutability: "payable",
500
- type: "function",
501
- },
502
- {
503
- inputs: [
504
- {
505
- internalType: "address",
506
- name: "pool",
507
- type: "address",
508
- },
509
- {
510
- internalType: "address",
511
- name: "recipient",
512
- type: "address",
513
- },
514
- {
515
- internalType: "bool",
516
- name: "zeroForOne",
517
- type: "bool",
518
- },
519
- {
520
- internalType: "uint128",
521
- name: "amountIn",
522
- type: "uint128",
523
- },
524
- {
525
- internalType: "uint128",
526
- name: "priceLimitX64",
527
- type: "uint128",
528
- },
529
- {
530
- internalType: "uint256",
531
- name: "minAmountOut",
532
- type: "uint256",
533
- },
534
- {
535
- internalType: "uint256",
536
- name: "deadline",
537
- type: "uint256",
538
- },
539
- {
540
- internalType: "bytes",
541
- name: "extensionData",
542
- type: "bytes",
543
- },
544
- ],
545
- name: "swapExactInput",
546
- outputs: [
547
- {
548
- internalType: "uint256",
549
- name: "amountOut",
550
- type: "uint256",
551
- },
552
- {
553
- internalType: "uint256",
554
- name: "amountInUsed",
555
- type: "uint256",
556
- },
557
- ],
558
- stateMutability: "payable",
559
- type: "function",
560
- },
561
- {
562
- inputs: [
563
- {
564
- internalType: "address",
565
- name: "pool",
566
- type: "address",
567
- },
568
- {
569
- internalType: "address",
570
- name: "recipient",
571
- type: "address",
572
- },
573
- {
574
- internalType: "bool",
575
- name: "zeroForOne",
576
- type: "bool",
577
- },
578
- {
579
- internalType: "uint128",
580
- name: "amountIn",
581
- type: "uint128",
582
- },
583
- {
584
- internalType: "uint128",
585
- name: "priceLimitX64",
586
- type: "uint128",
587
- },
588
- {
589
- internalType: "uint256",
590
- name: "minAmountOut",
591
- type: "uint256",
592
- },
593
- {
594
- internalType: "uint256",
595
- name: "deadline",
596
- type: "uint256",
597
- },
598
- ],
599
- name: "swapExactInput",
600
- outputs: [
601
- {
602
- internalType: "uint256",
603
- name: "amountOut",
604
- type: "uint256",
605
- },
606
- {
607
- internalType: "uint256",
608
- name: "amountInUsed",
609
- type: "uint256",
610
- },
611
- ],
612
- stateMutability: "payable",
613
- type: "function",
614
- },
615
- {
616
- inputs: [
617
- {
618
- internalType: "address",
619
- name: "pool",
620
- type: "address",
621
- },
622
- {
623
- internalType: "address",
624
- name: "recipient",
625
- type: "address",
626
- },
627
- {
628
- internalType: "bool",
629
- name: "zeroForOne",
630
- type: "bool",
631
- },
632
- {
633
- internalType: "uint128",
634
- name: "amountIn",
635
- type: "uint128",
636
- },
637
- {
638
- internalType: "uint128",
639
- name: "priceLimitX64",
640
- type: "uint128",
641
- },
642
- {
643
- internalType: "uint256",
644
- name: "minAmountOut",
645
- type: "uint256",
646
- },
647
- {
648
- internalType: "uint256",
649
- name: "deadline",
650
- type: "uint256",
651
- },
652
- ],
653
- name: "swapExactInputNativeForTokens",
654
- outputs: [
655
- {
656
- internalType: "uint256",
657
- name: "amountOut",
658
- type: "uint256",
659
- },
660
- {
661
- internalType: "uint256",
662
- name: "amountInUsed",
663
- type: "uint256",
664
- },
665
- ],
666
- stateMutability: "payable",
667
- type: "function",
668
- },
669
- {
670
- inputs: [
671
- {
672
- internalType: "address",
673
- name: "pool",
674
- type: "address",
675
- },
676
- {
677
- internalType: "address",
678
- name: "recipient",
679
- type: "address",
680
- },
681
- {
682
- internalType: "bool",
683
- name: "zeroForOne",
684
- type: "bool",
685
- },
686
- {
687
- internalType: "uint128",
688
- name: "amountIn",
689
- type: "uint128",
690
- },
691
- {
692
- internalType: "uint128",
693
- name: "priceLimitX64",
694
- type: "uint128",
695
- },
696
- {
697
- internalType: "uint256",
698
- name: "minAmountOut",
699
- type: "uint256",
700
- },
701
- {
702
- internalType: "uint256",
703
- name: "deadline",
704
- type: "uint256",
705
- },
706
- {
707
- internalType: "bytes",
708
- name: "extensionData",
709
- type: "bytes",
710
- },
711
- ],
712
- name: "swapExactInputNativeForTokens",
713
- outputs: [
714
- {
715
- internalType: "uint256",
716
- name: "amountOut",
717
- type: "uint256",
718
- },
719
- {
720
- internalType: "uint256",
721
- name: "amountInUsed",
722
- type: "uint256",
723
- },
724
- ],
725
- stateMutability: "payable",
726
- type: "function",
727
- },
728
- {
729
- inputs: [
730
- {
731
- internalType: "address",
732
- name: "pool",
733
- type: "address",
734
- },
735
- {
736
- internalType: "address",
737
- name: "recipient",
738
- type: "address",
739
- },
740
- {
741
- internalType: "bool",
742
- name: "zeroForOne",
743
- type: "bool",
744
- },
745
- {
746
- internalType: "uint128",
747
- name: "amountIn",
748
- type: "uint128",
749
- },
750
- {
751
- internalType: "uint128",
752
- name: "priceLimitX64",
753
- type: "uint128",
754
- },
755
- {
756
- internalType: "uint256",
757
- name: "minAmountOut",
758
- type: "uint256",
759
- },
760
- {
761
- internalType: "uint256",
762
- name: "deadline",
763
- type: "uint256",
764
- },
765
- ],
766
- name: "swapExactInputTokensForNative",
767
- outputs: [
768
- {
769
- internalType: "uint256",
770
- name: "amountOut",
771
- type: "uint256",
772
- },
773
- {
774
- internalType: "uint256",
775
- name: "amountInUsed",
776
- type: "uint256",
777
- },
778
- ],
779
- stateMutability: "nonpayable",
780
- type: "function",
781
- },
782
- {
783
- inputs: [
784
- {
785
- internalType: "address",
786
- name: "pool",
787
- type: "address",
788
- },
789
- {
790
- internalType: "address",
791
- name: "recipient",
792
- type: "address",
793
- },
794
- {
795
- internalType: "bool",
796
- name: "zeroForOne",
797
- type: "bool",
798
- },
799
- {
800
- internalType: "uint128",
801
- name: "amountIn",
802
- type: "uint128",
803
- },
804
- {
805
- internalType: "uint128",
806
- name: "priceLimitX64",
807
- type: "uint128",
808
- },
809
- {
810
- internalType: "uint256",
811
- name: "minAmountOut",
812
- type: "uint256",
813
- },
814
- {
815
- internalType: "uint256",
816
- name: "deadline",
817
- type: "uint256",
818
- },
819
- {
820
- internalType: "bytes",
821
- name: "extensionData",
822
- type: "bytes",
823
- },
824
- ],
825
- name: "swapExactInputTokensForNative",
826
- outputs: [
827
- {
828
- internalType: "uint256",
829
- name: "amountOut",
830
- type: "uint256",
831
- },
832
- {
833
- internalType: "uint256",
834
- name: "amountInUsed",
835
- type: "uint256",
836
- },
837
- ],
838
- stateMutability: "nonpayable",
839
- type: "function",
840
- },
841
- {
842
- inputs: [
843
- {
844
- internalType: "address",
845
- name: "pool",
846
- type: "address",
847
- },
848
- {
849
- internalType: "address",
850
- name: "recipient",
851
- type: "address",
852
- },
853
- {
854
- internalType: "bool",
855
- name: "zeroForOne",
856
- type: "bool",
857
- },
858
- {
859
- internalType: "uint128",
860
- name: "amountOutDesired",
861
- type: "uint128",
862
- },
863
- {
864
- internalType: "uint128",
865
- name: "priceLimitX64",
866
- type: "uint128",
867
- },
868
- {
869
- internalType: "uint256",
870
- name: "maxAmountIn",
871
- type: "uint256",
872
- },
873
- {
874
- internalType: "uint256",
875
- name: "deadline",
876
- type: "uint256",
877
- },
878
- ],
879
- name: "swapExactOutput",
880
- outputs: [
881
- {
882
- internalType: "uint256",
883
- name: "amountOut",
884
- type: "uint256",
885
- },
886
- {
887
- internalType: "uint256",
888
- name: "amountInUsed",
889
- type: "uint256",
890
- },
891
- ],
892
- stateMutability: "payable",
893
- type: "function",
894
- },
895
- {
896
- inputs: [
897
- {
898
- internalType: "address",
899
- name: "pool",
900
- type: "address",
901
- },
902
- {
903
- internalType: "address",
904
- name: "recipient",
905
- type: "address",
906
- },
907
- {
908
- internalType: "bool",
909
- name: "zeroForOne",
910
- type: "bool",
911
- },
912
- {
913
- internalType: "uint128",
914
- name: "amountOutDesired",
915
- type: "uint128",
916
- },
917
- {
918
- internalType: "uint128",
919
- name: "priceLimitX64",
920
- type: "uint128",
921
- },
922
- {
923
- internalType: "uint256",
924
- name: "maxAmountIn",
925
- type: "uint256",
926
- },
927
- {
928
- internalType: "uint256",
929
- name: "deadline",
930
- type: "uint256",
931
- },
932
- {
933
- internalType: "bytes",
934
- name: "extensionData",
935
- type: "bytes",
936
- },
937
- ],
938
- name: "swapExactOutput",
939
- outputs: [
940
- {
941
- internalType: "uint256",
942
- name: "amountOut",
943
- type: "uint256",
944
- },
945
- {
946
- internalType: "uint256",
947
- name: "amountInUsed",
948
- type: "uint256",
949
- },
950
- ],
951
- stateMutability: "payable",
952
- type: "function",
953
- },
954
- {
955
- inputs: [
956
- {
957
- internalType: "address",
958
- name: "pool",
959
- type: "address",
960
- },
961
- {
962
- internalType: "address",
963
- name: "recipient",
964
- type: "address",
965
- },
966
- {
967
- internalType: "bool",
968
- name: "zeroForOne",
969
- type: "bool",
970
- },
971
- {
972
- internalType: "uint128",
973
- name: "amountOutDesired",
974
- type: "uint128",
975
- },
976
- {
977
- internalType: "uint128",
978
- name: "priceLimitX64",
979
- type: "uint128",
980
- },
981
- {
982
- internalType: "uint256",
983
- name: "maxAmountIn",
984
- type: "uint256",
985
- },
986
- {
987
- internalType: "uint256",
988
- name: "deadline",
989
- type: "uint256",
990
- },
991
- {
992
- internalType: "bytes",
993
- name: "extensionData",
994
- type: "bytes",
995
- },
996
- ],
997
- name: "swapExactOutputNativeForTokens",
998
- outputs: [
999
- {
1000
- internalType: "uint256",
1001
- name: "amountOut",
1002
- type: "uint256",
1003
- },
1004
- {
1005
- internalType: "uint256",
1006
- name: "amountInUsed",
1007
- type: "uint256",
1008
- },
1009
- ],
1010
- stateMutability: "payable",
1011
- type: "function",
1012
- },
1013
- {
1014
- inputs: [
1015
- {
1016
- internalType: "address",
1017
- name: "pool",
1018
- type: "address",
1019
- },
1020
- {
1021
- internalType: "address",
1022
- name: "recipient",
1023
- type: "address",
1024
- },
1025
- {
1026
- internalType: "bool",
1027
- name: "zeroForOne",
1028
- type: "bool",
1029
- },
1030
- {
1031
- internalType: "uint128",
1032
- name: "amountOutDesired",
1033
- type: "uint128",
1034
- },
1035
- {
1036
- internalType: "uint128",
1037
- name: "priceLimitX64",
1038
- type: "uint128",
1039
- },
1040
- {
1041
- internalType: "uint256",
1042
- name: "maxAmountIn",
1043
- type: "uint256",
1044
- },
1045
- {
1046
- internalType: "uint256",
1047
- name: "deadline",
1048
- type: "uint256",
1049
- },
1050
- ],
1051
- name: "swapExactOutputNativeForTokens",
1052
- outputs: [
1053
- {
1054
- internalType: "uint256",
1055
- name: "amountOut",
1056
- type: "uint256",
1057
- },
1058
- {
1059
- internalType: "uint256",
1060
- name: "amountInUsed",
1061
- type: "uint256",
1062
- },
1063
- ],
1064
- stateMutability: "payable",
1065
- type: "function",
1066
- },
1067
- {
1068
- inputs: [
1069
- {
1070
- internalType: "address",
1071
- name: "pool",
1072
- type: "address",
1073
- },
1074
- {
1075
- internalType: "address",
1076
- name: "recipient",
1077
- type: "address",
1078
- },
1079
- {
1080
- internalType: "bool",
1081
- name: "zeroForOne",
1082
- type: "bool",
1083
- },
1084
- {
1085
- internalType: "uint128",
1086
- name: "amountOutDesired",
1087
- type: "uint128",
1088
- },
1089
- {
1090
- internalType: "uint128",
1091
- name: "priceLimitX64",
1092
- type: "uint128",
1093
- },
1094
- {
1095
- internalType: "uint256",
1096
- name: "maxAmountIn",
1097
- type: "uint256",
1098
- },
1099
- {
1100
- internalType: "uint256",
1101
- name: "deadline",
1102
- type: "uint256",
1103
- },
1104
- ],
1105
- name: "swapExactOutputTokensForNative",
1106
- outputs: [
1107
- {
1108
- internalType: "uint256",
1109
- name: "amountOut",
1110
- type: "uint256",
1111
- },
1112
- {
1113
- internalType: "uint256",
1114
- name: "amountInUsed",
1115
- type: "uint256",
1116
- },
1117
- ],
1118
- stateMutability: "nonpayable",
1119
- type: "function",
1120
- },
1121
- {
1122
- inputs: [
1123
- {
1124
- internalType: "address",
1125
- name: "pool",
1126
- type: "address",
1127
- },
1128
- {
1129
- internalType: "address",
1130
- name: "recipient",
1131
- type: "address",
1132
- },
1133
- {
1134
- internalType: "bool",
1135
- name: "zeroForOne",
1136
- type: "bool",
1137
- },
1138
- {
1139
- internalType: "uint128",
1140
- name: "amountOutDesired",
1141
- type: "uint128",
1142
- },
1143
- {
1144
- internalType: "uint128",
1145
- name: "priceLimitX64",
1146
- type: "uint128",
1147
- },
1148
- {
1149
- internalType: "uint256",
1150
- name: "maxAmountIn",
1151
- type: "uint256",
1152
- },
1153
- {
1154
- internalType: "uint256",
1155
- name: "deadline",
1156
- type: "uint256",
1157
- },
1158
- {
1159
- internalType: "bytes",
1160
- name: "extensionData",
1161
- type: "bytes",
1162
- },
1163
- ],
1164
- name: "swapExactOutputTokensForNative",
1165
- outputs: [
1166
- {
1167
- internalType: "uint256",
1168
- name: "amountOut",
1169
- type: "uint256",
1170
- },
1171
- {
1172
- internalType: "uint256",
1173
- name: "amountInUsed",
1174
- type: "uint256",
1175
- },
1176
- ],
1177
- stateMutability: "nonpayable",
1178
- type: "function",
1179
- },
1180
- {
1181
- stateMutability: "payable",
1182
- type: "receive",
1183
- },
1184
- ];
1185
- //# sourceMappingURL=MetricOmmPoolSwapper.js.map