quantumswap 0.0.1

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 (77) hide show
  1. package/.github/workflows/publish-npmjs.yaml +22 -0
  2. package/LICENSE +21 -0
  3. package/README.md +287 -0
  4. package/examples/_test-wallet.js +17 -0
  5. package/examples/deploy-IERC20.js +23 -0
  6. package/examples/deploy-QuantumSwapV2ERC20.js +23 -0
  7. package/examples/deploy-QuantumSwapV2Factory.js +23 -0
  8. package/examples/deploy-QuantumSwapV2Pair.js +23 -0
  9. package/examples/deploy-QuantumSwapV2Router02.js +23 -0
  10. package/examples/deploy-WQ.js +23 -0
  11. package/examples/events-IERC20.js +20 -0
  12. package/examples/events-QuantumSwapV2ERC20.js +20 -0
  13. package/examples/events-QuantumSwapV2Factory.js +20 -0
  14. package/examples/events-QuantumSwapV2Pair.js +20 -0
  15. package/examples/events-QuantumSwapV2Router02.js +20 -0
  16. package/examples/events-WQ.js +20 -0
  17. package/examples/offline-signing-IERC20.js +29 -0
  18. package/examples/offline-signing-QuantumSwapV2ERC20.js +29 -0
  19. package/examples/offline-signing-QuantumSwapV2Factory.js +29 -0
  20. package/examples/offline-signing-QuantumSwapV2Pair.js +29 -0
  21. package/examples/offline-signing-QuantumSwapV2Router02.js +29 -0
  22. package/examples/offline-signing-WQ.js +29 -0
  23. package/examples/read-operations-IERC20.js +19 -0
  24. package/examples/read-operations-QuantumSwapV2ERC20.js +19 -0
  25. package/examples/read-operations-QuantumSwapV2Factory.js +19 -0
  26. package/examples/read-operations-QuantumSwapV2Pair.js +19 -0
  27. package/examples/read-operations-QuantumSwapV2Router02.js +19 -0
  28. package/examples/read-operations-WQ.js +19 -0
  29. package/examples/walkthrough-dex-full-flow.js +226 -0
  30. package/examples/walkthrough-dex-full-flow.ts +231 -0
  31. package/examples/write-operations-IERC20.js +22 -0
  32. package/examples/write-operations-QuantumSwapV2ERC20.js +22 -0
  33. package/examples/write-operations-QuantumSwapV2Factory.js +22 -0
  34. package/examples/write-operations-QuantumSwapV2Pair.js +22 -0
  35. package/examples/write-operations-QuantumSwapV2Router02.js +22 -0
  36. package/examples/write-operations-WQ.js +22 -0
  37. package/index.d.ts +1 -0
  38. package/index.js +45 -0
  39. package/package.json +35 -0
  40. package/src/IERC20.d.ts +24 -0
  41. package/src/IERC20.js +348 -0
  42. package/src/IERC20__factory.d.ts +10 -0
  43. package/src/IERC20__factory.js +29 -0
  44. package/src/QuantumSwapV2ERC20.d.ts +24 -0
  45. package/src/QuantumSwapV2ERC20.js +353 -0
  46. package/src/QuantumSwapV2ERC20__factory.d.ts +10 -0
  47. package/src/QuantumSwapV2ERC20__factory.js +29 -0
  48. package/src/QuantumSwapV2Factory.d.ts +24 -0
  49. package/src/QuantumSwapV2Factory.js +310 -0
  50. package/src/QuantumSwapV2Factory__factory.d.ts +10 -0
  51. package/src/QuantumSwapV2Factory__factory.js +29 -0
  52. package/src/QuantumSwapV2Pair.d.ts +44 -0
  53. package/src/QuantumSwapV2Pair.js +847 -0
  54. package/src/QuantumSwapV2Pair__factory.d.ts +10 -0
  55. package/src/QuantumSwapV2Pair__factory.js +29 -0
  56. package/src/QuantumSwapV2Router02.d.ts +47 -0
  57. package/src/QuantumSwapV2Router02.js +1109 -0
  58. package/src/QuantumSwapV2Router02__factory.d.ts +10 -0
  59. package/src/QuantumSwapV2Router02__factory.js +29 -0
  60. package/src/WQ.d.ts +28 -0
  61. package/src/WQ.js +435 -0
  62. package/src/WQ__factory.d.ts +10 -0
  63. package/src/WQ__factory.js +29 -0
  64. package/src/index.d.ts +14 -0
  65. package/src/index.js +15 -0
  66. package/src/quantumcoin-shims.d.ts +25 -0
  67. package/src/types.d.ts +3 -0
  68. package/src/types.js +3 -0
  69. package/test/e2e/IERC20.e2e.test.js +79 -0
  70. package/test/e2e/QuantumSwapV2ERC20.e2e.test.js +79 -0
  71. package/test/e2e/QuantumSwapV2Factory.e2e.test.js +79 -0
  72. package/test/e2e/QuantumSwapV2Pair.e2e.test.js +79 -0
  73. package/test/e2e/QuantumSwapV2Router02.e2e.test.js +79 -0
  74. package/test/e2e/WQ.e2e.test.js +79 -0
  75. package/test/e2e/all-contracts.e2e.test.js +103 -0
  76. package/test/e2e/dex-full-flow.e2e.test.js +353 -0
  77. package/tsconfig.json +14 -0
@@ -0,0 +1,1109 @@
1
+ // Auto-generated by sdkgen
2
+ const { Contract } = require("quantumcoin");
3
+
4
+ /**
5
+ * QuantumSwapV2Router02 - A typed contract interface for QuantumSwapV2Router02
6
+ */
7
+ class QuantumSwapV2Router02 extends Contract {
8
+ static abi = [
9
+ {
10
+ "inputs": [
11
+ {
12
+ "internalType": "address",
13
+ "name": "_factory",
14
+ "type": "address"
15
+ },
16
+ {
17
+ "internalType": "address",
18
+ "name": "_WETH",
19
+ "type": "address"
20
+ }
21
+ ],
22
+ "stateMutability": "nonpayable",
23
+ "type": "constructor"
24
+ },
25
+ {
26
+ "inputs": [],
27
+ "name": "WETH",
28
+ "outputs": [
29
+ {
30
+ "internalType": "address",
31
+ "name": "",
32
+ "type": "address"
33
+ }
34
+ ],
35
+ "stateMutability": "view",
36
+ "type": "function"
37
+ },
38
+ {
39
+ "inputs": [
40
+ {
41
+ "internalType": "address",
42
+ "name": "tokenA",
43
+ "type": "address"
44
+ },
45
+ {
46
+ "internalType": "address",
47
+ "name": "tokenB",
48
+ "type": "address"
49
+ },
50
+ {
51
+ "internalType": "uint256",
52
+ "name": "amountADesired",
53
+ "type": "uint256"
54
+ },
55
+ {
56
+ "internalType": "uint256",
57
+ "name": "amountBDesired",
58
+ "type": "uint256"
59
+ },
60
+ {
61
+ "internalType": "uint256",
62
+ "name": "amountAMin",
63
+ "type": "uint256"
64
+ },
65
+ {
66
+ "internalType": "uint256",
67
+ "name": "amountBMin",
68
+ "type": "uint256"
69
+ },
70
+ {
71
+ "internalType": "address",
72
+ "name": "to",
73
+ "type": "address"
74
+ },
75
+ {
76
+ "internalType": "uint256",
77
+ "name": "deadline",
78
+ "type": "uint256"
79
+ }
80
+ ],
81
+ "name": "addLiquidity",
82
+ "outputs": [
83
+ {
84
+ "internalType": "uint256",
85
+ "name": "amountA",
86
+ "type": "uint256"
87
+ },
88
+ {
89
+ "internalType": "uint256",
90
+ "name": "amountB",
91
+ "type": "uint256"
92
+ },
93
+ {
94
+ "internalType": "uint256",
95
+ "name": "liquidity",
96
+ "type": "uint256"
97
+ }
98
+ ],
99
+ "stateMutability": "nonpayable",
100
+ "type": "function"
101
+ },
102
+ {
103
+ "inputs": [
104
+ {
105
+ "internalType": "address",
106
+ "name": "token",
107
+ "type": "address"
108
+ },
109
+ {
110
+ "internalType": "uint256",
111
+ "name": "amountTokenDesired",
112
+ "type": "uint256"
113
+ },
114
+ {
115
+ "internalType": "uint256",
116
+ "name": "amountTokenMin",
117
+ "type": "uint256"
118
+ },
119
+ {
120
+ "internalType": "uint256",
121
+ "name": "amountETHMin",
122
+ "type": "uint256"
123
+ },
124
+ {
125
+ "internalType": "address",
126
+ "name": "to",
127
+ "type": "address"
128
+ },
129
+ {
130
+ "internalType": "uint256",
131
+ "name": "deadline",
132
+ "type": "uint256"
133
+ }
134
+ ],
135
+ "name": "addLiquidityETH",
136
+ "outputs": [
137
+ {
138
+ "internalType": "uint256",
139
+ "name": "amountToken",
140
+ "type": "uint256"
141
+ },
142
+ {
143
+ "internalType": "uint256",
144
+ "name": "amountETH",
145
+ "type": "uint256"
146
+ },
147
+ {
148
+ "internalType": "uint256",
149
+ "name": "liquidity",
150
+ "type": "uint256"
151
+ }
152
+ ],
153
+ "stateMutability": "payable",
154
+ "type": "function"
155
+ },
156
+ {
157
+ "inputs": [],
158
+ "name": "factory",
159
+ "outputs": [
160
+ {
161
+ "internalType": "address",
162
+ "name": "",
163
+ "type": "address"
164
+ }
165
+ ],
166
+ "stateMutability": "view",
167
+ "type": "function"
168
+ },
169
+ {
170
+ "inputs": [
171
+ {
172
+ "internalType": "uint256",
173
+ "name": "amountOut",
174
+ "type": "uint256"
175
+ },
176
+ {
177
+ "internalType": "uint256",
178
+ "name": "reserveIn",
179
+ "type": "uint256"
180
+ },
181
+ {
182
+ "internalType": "uint256",
183
+ "name": "reserveOut",
184
+ "type": "uint256"
185
+ }
186
+ ],
187
+ "name": "getAmountIn",
188
+ "outputs": [
189
+ {
190
+ "internalType": "uint256",
191
+ "name": "amountIn",
192
+ "type": "uint256"
193
+ }
194
+ ],
195
+ "stateMutability": "pure",
196
+ "type": "function"
197
+ },
198
+ {
199
+ "inputs": [
200
+ {
201
+ "internalType": "uint256",
202
+ "name": "amountIn",
203
+ "type": "uint256"
204
+ },
205
+ {
206
+ "internalType": "uint256",
207
+ "name": "reserveIn",
208
+ "type": "uint256"
209
+ },
210
+ {
211
+ "internalType": "uint256",
212
+ "name": "reserveOut",
213
+ "type": "uint256"
214
+ }
215
+ ],
216
+ "name": "getAmountOut",
217
+ "outputs": [
218
+ {
219
+ "internalType": "uint256",
220
+ "name": "amountOut",
221
+ "type": "uint256"
222
+ }
223
+ ],
224
+ "stateMutability": "pure",
225
+ "type": "function"
226
+ },
227
+ {
228
+ "inputs": [
229
+ {
230
+ "internalType": "uint256",
231
+ "name": "amountOut",
232
+ "type": "uint256"
233
+ },
234
+ {
235
+ "internalType": "address[]",
236
+ "name": "path",
237
+ "type": "address[]"
238
+ }
239
+ ],
240
+ "name": "getAmountsIn",
241
+ "outputs": [
242
+ {
243
+ "internalType": "uint256[]",
244
+ "name": "amounts",
245
+ "type": "uint256[]"
246
+ }
247
+ ],
248
+ "stateMutability": "view",
249
+ "type": "function"
250
+ },
251
+ {
252
+ "inputs": [
253
+ {
254
+ "internalType": "uint256",
255
+ "name": "amountIn",
256
+ "type": "uint256"
257
+ },
258
+ {
259
+ "internalType": "address[]",
260
+ "name": "path",
261
+ "type": "address[]"
262
+ }
263
+ ],
264
+ "name": "getAmountsOut",
265
+ "outputs": [
266
+ {
267
+ "internalType": "uint256[]",
268
+ "name": "amounts",
269
+ "type": "uint256[]"
270
+ }
271
+ ],
272
+ "stateMutability": "view",
273
+ "type": "function"
274
+ },
275
+ {
276
+ "inputs": [
277
+ {
278
+ "internalType": "uint256",
279
+ "name": "amountA",
280
+ "type": "uint256"
281
+ },
282
+ {
283
+ "internalType": "uint256",
284
+ "name": "reserveA",
285
+ "type": "uint256"
286
+ },
287
+ {
288
+ "internalType": "uint256",
289
+ "name": "reserveB",
290
+ "type": "uint256"
291
+ }
292
+ ],
293
+ "name": "quote",
294
+ "outputs": [
295
+ {
296
+ "internalType": "uint256",
297
+ "name": "amountB",
298
+ "type": "uint256"
299
+ }
300
+ ],
301
+ "stateMutability": "pure",
302
+ "type": "function"
303
+ },
304
+ {
305
+ "inputs": [
306
+ {
307
+ "internalType": "address",
308
+ "name": "tokenA",
309
+ "type": "address"
310
+ },
311
+ {
312
+ "internalType": "address",
313
+ "name": "tokenB",
314
+ "type": "address"
315
+ },
316
+ {
317
+ "internalType": "uint256",
318
+ "name": "liquidity",
319
+ "type": "uint256"
320
+ },
321
+ {
322
+ "internalType": "uint256",
323
+ "name": "amountAMin",
324
+ "type": "uint256"
325
+ },
326
+ {
327
+ "internalType": "uint256",
328
+ "name": "amountBMin",
329
+ "type": "uint256"
330
+ },
331
+ {
332
+ "internalType": "address",
333
+ "name": "to",
334
+ "type": "address"
335
+ },
336
+ {
337
+ "internalType": "uint256",
338
+ "name": "deadline",
339
+ "type": "uint256"
340
+ }
341
+ ],
342
+ "name": "removeLiquidity",
343
+ "outputs": [
344
+ {
345
+ "internalType": "uint256",
346
+ "name": "amountA",
347
+ "type": "uint256"
348
+ },
349
+ {
350
+ "internalType": "uint256",
351
+ "name": "amountB",
352
+ "type": "uint256"
353
+ }
354
+ ],
355
+ "stateMutability": "nonpayable",
356
+ "type": "function"
357
+ },
358
+ {
359
+ "inputs": [
360
+ {
361
+ "internalType": "address",
362
+ "name": "token",
363
+ "type": "address"
364
+ },
365
+ {
366
+ "internalType": "uint256",
367
+ "name": "liquidity",
368
+ "type": "uint256"
369
+ },
370
+ {
371
+ "internalType": "uint256",
372
+ "name": "amountTokenMin",
373
+ "type": "uint256"
374
+ },
375
+ {
376
+ "internalType": "uint256",
377
+ "name": "amountETHMin",
378
+ "type": "uint256"
379
+ },
380
+ {
381
+ "internalType": "address",
382
+ "name": "to",
383
+ "type": "address"
384
+ },
385
+ {
386
+ "internalType": "uint256",
387
+ "name": "deadline",
388
+ "type": "uint256"
389
+ }
390
+ ],
391
+ "name": "removeLiquidityETH",
392
+ "outputs": [
393
+ {
394
+ "internalType": "uint256",
395
+ "name": "amountToken",
396
+ "type": "uint256"
397
+ },
398
+ {
399
+ "internalType": "uint256",
400
+ "name": "amountETH",
401
+ "type": "uint256"
402
+ }
403
+ ],
404
+ "stateMutability": "nonpayable",
405
+ "type": "function"
406
+ },
407
+ {
408
+ "inputs": [
409
+ {
410
+ "internalType": "address",
411
+ "name": "token",
412
+ "type": "address"
413
+ },
414
+ {
415
+ "internalType": "uint256",
416
+ "name": "liquidity",
417
+ "type": "uint256"
418
+ },
419
+ {
420
+ "internalType": "uint256",
421
+ "name": "amountTokenMin",
422
+ "type": "uint256"
423
+ },
424
+ {
425
+ "internalType": "uint256",
426
+ "name": "amountETHMin",
427
+ "type": "uint256"
428
+ },
429
+ {
430
+ "internalType": "address",
431
+ "name": "to",
432
+ "type": "address"
433
+ },
434
+ {
435
+ "internalType": "uint256",
436
+ "name": "deadline",
437
+ "type": "uint256"
438
+ }
439
+ ],
440
+ "name": "removeLiquidityETHSupportingFeeOnTransferTokens",
441
+ "outputs": [
442
+ {
443
+ "internalType": "uint256",
444
+ "name": "amountETH",
445
+ "type": "uint256"
446
+ }
447
+ ],
448
+ "stateMutability": "nonpayable",
449
+ "type": "function"
450
+ },
451
+ {
452
+ "inputs": [
453
+ {
454
+ "internalType": "uint256",
455
+ "name": "amountOut",
456
+ "type": "uint256"
457
+ },
458
+ {
459
+ "internalType": "address[]",
460
+ "name": "path",
461
+ "type": "address[]"
462
+ },
463
+ {
464
+ "internalType": "address",
465
+ "name": "to",
466
+ "type": "address"
467
+ },
468
+ {
469
+ "internalType": "uint256",
470
+ "name": "deadline",
471
+ "type": "uint256"
472
+ }
473
+ ],
474
+ "name": "swapETHForExactTokens",
475
+ "outputs": [
476
+ {
477
+ "internalType": "uint256[]",
478
+ "name": "amounts",
479
+ "type": "uint256[]"
480
+ }
481
+ ],
482
+ "stateMutability": "payable",
483
+ "type": "function"
484
+ },
485
+ {
486
+ "inputs": [
487
+ {
488
+ "internalType": "uint256",
489
+ "name": "amountOutMin",
490
+ "type": "uint256"
491
+ },
492
+ {
493
+ "internalType": "address[]",
494
+ "name": "path",
495
+ "type": "address[]"
496
+ },
497
+ {
498
+ "internalType": "address",
499
+ "name": "to",
500
+ "type": "address"
501
+ },
502
+ {
503
+ "internalType": "uint256",
504
+ "name": "deadline",
505
+ "type": "uint256"
506
+ }
507
+ ],
508
+ "name": "swapExactETHForTokens",
509
+ "outputs": [
510
+ {
511
+ "internalType": "uint256[]",
512
+ "name": "amounts",
513
+ "type": "uint256[]"
514
+ }
515
+ ],
516
+ "stateMutability": "payable",
517
+ "type": "function"
518
+ },
519
+ {
520
+ "inputs": [
521
+ {
522
+ "internalType": "uint256",
523
+ "name": "amountOutMin",
524
+ "type": "uint256"
525
+ },
526
+ {
527
+ "internalType": "address[]",
528
+ "name": "path",
529
+ "type": "address[]"
530
+ },
531
+ {
532
+ "internalType": "address",
533
+ "name": "to",
534
+ "type": "address"
535
+ },
536
+ {
537
+ "internalType": "uint256",
538
+ "name": "deadline",
539
+ "type": "uint256"
540
+ }
541
+ ],
542
+ "name": "swapExactETHForTokensSupportingFeeOnTransferTokens",
543
+ "outputs": [],
544
+ "stateMutability": "payable",
545
+ "type": "function"
546
+ },
547
+ {
548
+ "inputs": [
549
+ {
550
+ "internalType": "uint256",
551
+ "name": "amountIn",
552
+ "type": "uint256"
553
+ },
554
+ {
555
+ "internalType": "uint256",
556
+ "name": "amountOutMin",
557
+ "type": "uint256"
558
+ },
559
+ {
560
+ "internalType": "address[]",
561
+ "name": "path",
562
+ "type": "address[]"
563
+ },
564
+ {
565
+ "internalType": "address",
566
+ "name": "to",
567
+ "type": "address"
568
+ },
569
+ {
570
+ "internalType": "uint256",
571
+ "name": "deadline",
572
+ "type": "uint256"
573
+ }
574
+ ],
575
+ "name": "swapExactTokensForETH",
576
+ "outputs": [
577
+ {
578
+ "internalType": "uint256[]",
579
+ "name": "amounts",
580
+ "type": "uint256[]"
581
+ }
582
+ ],
583
+ "stateMutability": "nonpayable",
584
+ "type": "function"
585
+ },
586
+ {
587
+ "inputs": [
588
+ {
589
+ "internalType": "uint256",
590
+ "name": "amountIn",
591
+ "type": "uint256"
592
+ },
593
+ {
594
+ "internalType": "uint256",
595
+ "name": "amountOutMin",
596
+ "type": "uint256"
597
+ },
598
+ {
599
+ "internalType": "address[]",
600
+ "name": "path",
601
+ "type": "address[]"
602
+ },
603
+ {
604
+ "internalType": "address",
605
+ "name": "to",
606
+ "type": "address"
607
+ },
608
+ {
609
+ "internalType": "uint256",
610
+ "name": "deadline",
611
+ "type": "uint256"
612
+ }
613
+ ],
614
+ "name": "swapExactTokensForETHSupportingFeeOnTransferTokens",
615
+ "outputs": [],
616
+ "stateMutability": "nonpayable",
617
+ "type": "function"
618
+ },
619
+ {
620
+ "inputs": [
621
+ {
622
+ "internalType": "uint256",
623
+ "name": "amountIn",
624
+ "type": "uint256"
625
+ },
626
+ {
627
+ "internalType": "uint256",
628
+ "name": "amountOutMin",
629
+ "type": "uint256"
630
+ },
631
+ {
632
+ "internalType": "address[]",
633
+ "name": "path",
634
+ "type": "address[]"
635
+ },
636
+ {
637
+ "internalType": "address",
638
+ "name": "to",
639
+ "type": "address"
640
+ },
641
+ {
642
+ "internalType": "uint256",
643
+ "name": "deadline",
644
+ "type": "uint256"
645
+ }
646
+ ],
647
+ "name": "swapExactTokensForTokens",
648
+ "outputs": [
649
+ {
650
+ "internalType": "uint256[]",
651
+ "name": "amounts",
652
+ "type": "uint256[]"
653
+ }
654
+ ],
655
+ "stateMutability": "nonpayable",
656
+ "type": "function"
657
+ },
658
+ {
659
+ "inputs": [
660
+ {
661
+ "internalType": "uint256",
662
+ "name": "amountIn",
663
+ "type": "uint256"
664
+ },
665
+ {
666
+ "internalType": "uint256",
667
+ "name": "amountOutMin",
668
+ "type": "uint256"
669
+ },
670
+ {
671
+ "internalType": "address[]",
672
+ "name": "path",
673
+ "type": "address[]"
674
+ },
675
+ {
676
+ "internalType": "address",
677
+ "name": "to",
678
+ "type": "address"
679
+ },
680
+ {
681
+ "internalType": "uint256",
682
+ "name": "deadline",
683
+ "type": "uint256"
684
+ }
685
+ ],
686
+ "name": "swapExactTokensForTokensSupportingFeeOnTransferTokens",
687
+ "outputs": [],
688
+ "stateMutability": "nonpayable",
689
+ "type": "function"
690
+ },
691
+ {
692
+ "inputs": [
693
+ {
694
+ "internalType": "uint256",
695
+ "name": "amountOut",
696
+ "type": "uint256"
697
+ },
698
+ {
699
+ "internalType": "uint256",
700
+ "name": "amountInMax",
701
+ "type": "uint256"
702
+ },
703
+ {
704
+ "internalType": "address[]",
705
+ "name": "path",
706
+ "type": "address[]"
707
+ },
708
+ {
709
+ "internalType": "address",
710
+ "name": "to",
711
+ "type": "address"
712
+ },
713
+ {
714
+ "internalType": "uint256",
715
+ "name": "deadline",
716
+ "type": "uint256"
717
+ }
718
+ ],
719
+ "name": "swapTokensForExactETH",
720
+ "outputs": [
721
+ {
722
+ "internalType": "uint256[]",
723
+ "name": "amounts",
724
+ "type": "uint256[]"
725
+ }
726
+ ],
727
+ "stateMutability": "nonpayable",
728
+ "type": "function"
729
+ },
730
+ {
731
+ "inputs": [
732
+ {
733
+ "internalType": "uint256",
734
+ "name": "amountOut",
735
+ "type": "uint256"
736
+ },
737
+ {
738
+ "internalType": "uint256",
739
+ "name": "amountInMax",
740
+ "type": "uint256"
741
+ },
742
+ {
743
+ "internalType": "address[]",
744
+ "name": "path",
745
+ "type": "address[]"
746
+ },
747
+ {
748
+ "internalType": "address",
749
+ "name": "to",
750
+ "type": "address"
751
+ },
752
+ {
753
+ "internalType": "uint256",
754
+ "name": "deadline",
755
+ "type": "uint256"
756
+ }
757
+ ],
758
+ "name": "swapTokensForExactTokens",
759
+ "outputs": [
760
+ {
761
+ "internalType": "uint256[]",
762
+ "name": "amounts",
763
+ "type": "uint256[]"
764
+ }
765
+ ],
766
+ "stateMutability": "nonpayable",
767
+ "type": "function"
768
+ },
769
+ {
770
+ "stateMutability": "payable",
771
+ "type": "receive"
772
+ }
773
+ ];
774
+ static bytecode = "0x60c060405234801561001057600080fd5b50604051620053ea380380620053ea8339818101604052604081101561003557600080fd5b81019080805190602001909291908051906020019092919050505081608081815250508060a08181525050505060805160a0516152606200018a6000398061013552806110425280611080528061119a52806113f4528061178b52806119e25280611dd65280611f3f5280612030528061213252806122b8528061233752806126db52806127925280612843528061294452806129f15280612a5c5280613212528061326b528061329f528061330a52806134c6528061364952806136c852508061124a528061134052806114b1528061155d5280611653528061183b528061192e5280611b2c5280611e9e52806121dd52806123605280612529528061261c5280612a855280612db05280612fd65280612fff52806130c65280613249528061357152806136f1528061414a528061418e52806144c152806146785280614b8d5280614c315280614cd952506152606000f3fe60806040526004361061012e5760003560e01c80638803dbee116100ab578063baa2abde1161006f578063baa2abde14610bcf578063c45a015514610c61578063d06ca61f14610c8c578063e8e3370014610db0578063f305d71914610e54578063fb3bdb4114610ed65761015e565b80638803dbee14610926578063ad5c464814610a29578063ad615dec14610a54578063af2979eb14610ab7578063b6f9de9514610b385761015e565b80634a25d94a116100f25780634a25d94a146105785780635c11d7951461067b578063791ac947146107295780637ff36ab5146107d757806385f8c259146108c35761015e565b806302751cec14610163578063054d50d4146101eb57806318cbafe51461024e5780631f00ca741461035157806338ed1739146104755761015e565b3661015e577f0000000000000000000000000000000000000000000000000000000000000000331461015c57fe5b005b600080fd5b34801561016f57600080fd5b506101ce600480360360c081101561018657600080fd5b81019080803590602001909291908035906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190505050610fc2565b604051808381526020018281526020019250505060405180910390f35b3480156101f757600080fd5b506102386004803603606081101561020e57600080fd5b81019080803590602001909291908035906020019092919080359060200190929190505050611109565b6040518082815260200191505060405180910390f35b34801561025a57600080fd5b506102fa600480360360a081101561027157600080fd5b810190808035906020019092919080359060200190929190803590602001906401000000008111156102a257600080fd5b8201836020820111156102b457600080fd5b803590602001918460208302840111640100000000831117156102d657600080fd5b9091929391929390803590602001909291908035906020019092919050505061111f565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b8381101561033d578082015181840152602081019050610322565b505050509050019250505060405180910390f35b34801561035d57600080fd5b5061041e6004803603604081101561037457600080fd5b81019080803590602001909291908035906020019064010000000081111561039b57600080fd5b8201836020820111156103ad57600080fd5b803590602001918460208302840111640100000000831117156103cf57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505091929192905050506114aa565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b83811015610461578082015181840152602081019050610446565b505050509050019250505060405180910390f35b34801561048157600080fd5b50610521600480360360a081101561049857600080fd5b810190808035906020019092919080359060200190929190803590602001906401000000008111156104c957600080fd5b8201836020820111156104db57600080fd5b803590602001918460208302840111640100000000831117156104fd57600080fd5b909192939192939080359060200190929190803590602001909291905050506114df565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b83811015610564578082015181840152602081019050610549565b505050509050019250505060405180910390f35b34801561058457600080fd5b50610624600480360360a081101561059b57600080fd5b810190808035906020019092919080359060200190929190803590602001906401000000008111156105cc57600080fd5b8201836020820111156105de57600080fd5b8035906020019184602083028401116401000000008311171561060057600080fd5b90919293919293908035906020019092919080359060200190929190505050611710565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b8381101561066757808201518184015260208101905061064c565b505050509050019250505060405180910390f35b34801561068757600080fd5b50610727600480360360a081101561069e57600080fd5b810190808035906020019092919080359060200190929190803590602001906401000000008111156106cf57600080fd5b8201836020820111156106e157600080fd5b8035906020019184602083028401116401000000008311171561070357600080fd5b90919293919293908035906020019092919080359060200190929190505050611a98565b005b34801561073557600080fd5b506107d5600480360360a081101561074c57600080fd5b8101908080359060200190929190803590602001909291908035906020019064010000000081111561077d57600080fd5b82018360208201111561078f57600080fd5b803590602001918460208302840111640100000000831117156107b157600080fd5b90919293919293908035906020019092919080359060200190929190505050611d5d565b005b61086c600480360360808110156107ed57600080fd5b81019080803590602001909291908035906020019064010000000081111561081457600080fd5b82018360208201111561082657600080fd5b8035906020019184602083028401116401000000008311171561084857600080fd5b909192939192939080359060200190929190803590602001909291905050506120b7565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b838110156108af578082015181840152602081019050610894565b505050509050019250505060405180910390f35b3480156108cf57600080fd5b50610910600480360360608110156108e657600080fd5b81019080803590602001909291908035906020019092919080359060200190929190505050612495565b6040518082815260200191505060405180910390f35b34801561093257600080fd5b506109d2600480360360a081101561094957600080fd5b8101908080359060200190929190803590602001909291908035906020019064010000000081111561097a57600080fd5b82018360208201111561098c57600080fd5b803590602001918460208302840111640100000000831117156109ae57600080fd5b909192939192939080359060200190929190803590602001909291905050506124ab565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b83811015610a155780820151818401526020810190506109fa565b505050509050019250505060405180910390f35b348015610a3557600080fd5b50610a3e6126d9565b6040518082815260200191505060405180910390f35b348015610a6057600080fd5b50610aa160048036036060811015610a7757600080fd5b810190808035906020019092919080359060200190929190803590602001909291905050506126fd565b6040518082815260200191505060405180910390f35b348015610ac357600080fd5b50610b22600480360360c0811015610ada57600080fd5b81019080803590602001909291908035906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190505050612713565b6040518082815260200191505060405180910390f35b610bcd60048036036080811015610b4e57600080fd5b810190808035906020019092919080359060200190640100000000811115610b7557600080fd5b820183602082011115610b8757600080fd5b80359060200191846020830284011164010000000083111715610ba957600080fd5b909192939192939080359060200190929190803590602001909291905050506128cb565b005b348015610bdb57600080fd5b50610c44600480360360e0811015610bf257600080fd5b8101908080359060200190929190803590602001909291908035906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190505050612d2f565b604051808381526020018281526020019250505060405180910390f35b348015610c6d57600080fd5b50610c76612fd4565b6040518082815260200191505060405180910390f35b348015610c9857600080fd5b50610d5960048036036040811015610caf57600080fd5b810190808035906020019092919080359060200190640100000000811115610cd657600080fd5b820183602082011115610ce857600080fd5b80359060200191846020830284011164010000000083111715610d0a57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290505050612ff8565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b83811015610d9c578082015181840152602081019050610d81565b505050509050019250505060405180910390f35b348015610dbc57600080fd5b50610e306004803603610100811015610dd457600080fd5b81019080803590602001909291908035906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803590602001909291908035906020019092919050505061302d565b60405180848152602001838152602001828152602001935050505060405180910390f35b610eb2600480360360c0811015610e6a57600080fd5b81019080803590602001909291908035906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190505050613190565b60405180848152602001838152602001828152602001935050505060405180910390f35b610f6b60048036036080811015610eec57600080fd5b810190808035906020019092919080359060200190640100000000811115610f1357600080fd5b820183602082011115610f2557600080fd5b80359060200191846020830284011164010000000083111715610f4757600080fd5b9091929391929390803590602001909291908035906020019092919050505061344b565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b83811015610fae578082015181840152602081019050610f93565b505050509050019250505060405180910390f35b600080824281101561103c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f556e69737761705632526f757465723a2045585049524544000000000000000081525060200191505060405180910390fd5b61106b897f00000000000000000000000000000000000000000000000000000000000000008a8a8a308a612d2f565b809350819450505061107e898685613863565b7f0000000000000000000000000000000000000000000000000000000000000000632e1a7d4d836040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156110db57600080fd5b505af11580156110ef573d6000803e3d6000fd5b505050506110fd85836139fc565b50965096945050505050565b6000611116848484613b45565b90509392505050565b60608142811015611198576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f556e69737761705632526f757465723a2045585049524544000000000000000081525060200191505060405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000008686600189899050038181106111cb57fe5b9050602002013514611245576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f556e69737761705632526f757465723a20494e56414c49445f5041544800000081525060200191505060405180910390fd5b6112b17f000000000000000000000000000000000000000000000000000000000000000089888880806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050613c75565b915086826001845103815181106112c457fe5b60200260200101511015611323576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b8152602001806151a8602b913960400191505060405180910390fd5b6113a68686600081811061133357fe5b905060200201353361138c7f00000000000000000000000000000000000000000000000000000000000000008a8a600081811061136c57fe5b905060200201358b8b600181811061138057fe5b90506020020135613ded565b8560008151811061139957fe5b6020026020010151613f0b565b6113f282878780806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050306140ad565b7f0000000000000000000000000000000000000000000000000000000000000000632e1a7d4d8360018551038151811061142857fe5b60200260200101516040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561146657600080fd5b505af115801561147a573d6000803e3d6000fd5b5050505061149f848360018551038151811061149257fe5b60200260200101516139fc565b509695505050505050565b60606114d77f000000000000000000000000000000000000000000000000000000000000000084846142ea565b905092915050565b60608142811015611558576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f556e69737761705632526f757465723a2045585049524544000000000000000081525060200191505060405180910390fd5b6115c47f000000000000000000000000000000000000000000000000000000000000000089888880806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050613c75565b915086826001845103815181106115d757fe5b60200260200101511015611636576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b8152602001806151a8602b913960400191505060405180910390fd5b6116b98686600081811061164657fe5b905060200201353361169f7f00000000000000000000000000000000000000000000000000000000000000008a8a600081811061167f57fe5b905060200201358b8b600181811061169357fe5b90506020020135613ded565b856000815181106116ac57fe5b6020026020010151613f0b565b61170582878780806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050866140ad565b509695505050505050565b60608142811015611789576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f556e69737761705632526f757465723a2045585049524544000000000000000081525060200191505060405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000008686600189899050038181106117bc57fe5b9050602002013514611836576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f556e69737761705632526f757465723a20494e56414c49445f5041544800000081525060200191505060405180910390fd5b6118a27f000000000000000000000000000000000000000000000000000000000000000089888880806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050506142ea565b915086826000815181106118b257fe5b60200260200101511115611911576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602781526020018061515b6027913960400191505060405180910390fd5b6119948686600081811061192157fe5b905060200201353361197a7f00000000000000000000000000000000000000000000000000000000000000008a8a600081811061195a57fe5b905060200201358b8b600181811061196e57fe5b90506020020135613ded565b8560008151811061198757fe5b6020026020010151613f0b565b6119e082878780806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050306140ad565b7f0000000000000000000000000000000000000000000000000000000000000000632e1a7d4d83600185510381518110611a1657fe5b60200260200101516040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b158015611a5457600080fd5b505af1158015611a68573d6000803e3d6000fd5b50505050611a8d8483600185510381518110611a8057fe5b60200260200101516139fc565b509695505050505050565b8042811015611b0f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f556e69737761705632526f757465723a2045585049524544000000000000000081525060200191505060405180910390fd5b611b7e85856000818110611b1f57fe5b9050602002013533611b787f000000000000000000000000000000000000000000000000000000000000000089896000818110611b5857fe5b905060200201358a8a6001818110611b6c57fe5b90506020020135613ded565b8a613f0b565b6000858560018888905003818110611b9257fe5b905060200201356370a08231856040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015611bd357600080fd5b505afa158015611be7573d6000803e3d6000fd5b505050506040513d6020811015611bfd57600080fd5b81019080805190602001909291905050509050611c5b868680806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508561446a565b86611cfc82888860018b8b905003818110611c7257fe5b905060200201356370a08231886040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015611cb357600080fd5b505afa158015611cc7573d6000803e3d6000fd5b505050506040513d6020811015611cdd57600080fd5b81019080805190602001909291905050506147ef90919063ffffffff16565b1015611d53576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b8152602001806151a8602b913960400191505060405180910390fd5b5050505050505050565b8042811015611dd4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f556e69737761705632526f757465723a2045585049524544000000000000000081525060200191505060405180910390fd5b7f0000000000000000000000000000000000000000000000000000000000000000858560018888905003818110611e0757fe5b9050602002013514611e81576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f556e69737761705632526f757465723a20494e56414c49445f5041544800000081525060200191505060405180910390fd5b611ef085856000818110611e9157fe5b9050602002013533611eea7f000000000000000000000000000000000000000000000000000000000000000089896000818110611eca57fe5b905060200201358a8a6001818110611ede57fe5b90506020020135613ded565b8a613f0b565b611f3b858580806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050503061446a565b60007f00000000000000000000000000000000000000000000000000000000000000006370a08231306040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015611f9857600080fd5b505afa158015611fac573d6000803e3d6000fd5b505050506040513d6020811015611fc257600080fd5b810190808051906020019092919050505090508681101561202e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b8152602001806151a8602b913960400191505060405180910390fd5b7f0000000000000000000000000000000000000000000000000000000000000000632e1a7d4d826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561208b57600080fd5b505af115801561209f573d6000803e3d6000fd5b505050506120ad84826139fc565b5050505050505050565b60608142811015612130576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f556e69737761705632526f757465723a2045585049524544000000000000000081525060200191505060405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000008686600081811061215e57fe5b90506020020135146121d8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f556e69737761705632526f757465723a20494e56414c49445f5041544800000081525060200191505060405180910390fd5b6122447f000000000000000000000000000000000000000000000000000000000000000034888880806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050613c75565b9150868260018451038151811061225757fe5b602002602001015110156122b6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b8152602001806151a8602b913960400191505060405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000063d0e30db0836000815181106122e957fe5b60200260200101516040518263ffffffff1660e01b81526004016000604051808303818588803b15801561231c57600080fd5b505af1158015612330573d6000803e3d6000fd5b50505050507f000000000000000000000000000000000000000000000000000000000000000063a9059cbb6123ac7f00000000000000000000000000000000000000000000000000000000000000008989600081811061238c57fe5b905060200201358a8a60018181106123a057fe5b90506020020135613ded565b846000815181106123b957fe5b60200260200101516040518363ffffffff1660e01b81526004018083815260200182815260200192505050602060405180830381600087803b1580156123fe57600080fd5b505af1158015612412573d6000803e3d6000fd5b505050506040513d602081101561242857600080fd5b810190808051906020019092919050505061243f57fe5b61248b82878780806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050866140ad565b5095945050505050565b60006124a2848484614872565b90509392505050565b60608142811015612524576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f556e69737761705632526f757465723a2045585049524544000000000000000081525060200191505060405180910390fd5b6125907f000000000000000000000000000000000000000000000000000000000000000089888880806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050506142ea565b915086826000815181106125a057fe5b602002602001015111156125ff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602781526020018061515b6027913960400191505060405180910390fd5b6126828686600081811061260f57fe5b90506020020135336126687f00000000000000000000000000000000000000000000000000000000000000008a8a600081811061264857fe5b905060200201358b8b600181811061265c57fe5b90506020020135613ded565b8560008151811061267557fe5b6020026020010151613f0b565b6126ce82878780806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050866140ad565b509695505050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b600061270a8484846149af565b90509392505050565b6000814281101561278c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f556e69737761705632526f757465723a2045585049524544000000000000000081525060200191505060405180910390fd5b6127bb887f00000000000000000000000000000000000000000000000000000000000000008989893089612d2f565b90508092505061284188858a6370a08231306040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561280157600080fd5b505afa158015612815573d6000803e3d6000fd5b505050506040513d602081101561282b57600080fd5b8101908080519060200190929190505050613863565b7f0000000000000000000000000000000000000000000000000000000000000000632e1a7d4d836040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561289e57600080fd5b505af11580156128b2573d6000803e3d6000fd5b505050506128c084836139fc565b509695505050505050565b8042811015612942576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f556e69737761705632526f757465723a2045585049524544000000000000000081525060200191505060405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000008585600081811061297057fe5b90506020020135146129ea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f556e69737761705632526f757465723a20494e56414c49445f5041544800000081525060200191505060405180910390fd5b60003490507f000000000000000000000000000000000000000000000000000000000000000063d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b158015612a4157600080fd5b505af1158015612a55573d6000803e3d6000fd5b50505050507f000000000000000000000000000000000000000000000000000000000000000063a9059cbb612ad17f000000000000000000000000000000000000000000000000000000000000000089896000818110612ab157fe5b905060200201358a8a6001818110612ac557fe5b90506020020135613ded565b836040518363ffffffff1660e01b81526004018083815260200182815260200192505050602060405180830381600087803b158015612b0f57600080fd5b505af1158015612b23573d6000803e3d6000fd5b505050506040513d6020811015612b3957600080fd5b8101908080519060200190929190505050612b5057fe5b6000868660018989905003818110612b6457fe5b905060200201356370a08231866040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015612ba557600080fd5b505afa158015612bb9573d6000803e3d6000fd5b505050506040513d6020811015612bcf57600080fd5b81019080805190602001909291905050509050612c2d878780806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508661446a565b87612cce82898960018c8c905003818110612c4457fe5b905060200201356370a08231896040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015612c8557600080fd5b505afa158015612c99573d6000803e3d6000fd5b505050506040513d6020811015612caf57600080fd5b81019080805190602001909291905050506147ef90919063ffffffff16565b1015612d25576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b8152602001806151a8602b913960400191505060405180910390fd5b5050505050505050565b6000808242811015612da9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f556e69737761705632526f757465723a2045585049524544000000000000000081525060200191505060405180910390fd5b6000612dd67f00000000000000000000000000000000000000000000000000000000000000008c8c613ded565b9050806323b872dd33838c6040518463ffffffff1660e01b8152600401808481526020018381526020018281526020019350505050602060405180830381600087803b158015612e2557600080fd5b505af1158015612e39573d6000803e3d6000fd5b505050506040513d6020811015612e4f57600080fd5b810190808051906020019092919050505050600080826389afcb44896040518263ffffffff1660e01b8152600401808281526020019150506040805180830381600087803b158015612ea057600080fd5b505af1158015612eb4573d6000803e3d6000fd5b505050506040513d6040811015612eca57600080fd5b810190808051906020019092919080519060200190929190505050915091506000612ef58e8e614a93565b509050808e14612f06578183612f09565b82825b80975081985050508a871015612f6a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806151826026913960400191505060405180910390fd5b89861015612fc3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806150e86026913960400191505060405180910390fd5b505050505097509795505050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60606130257f00000000000000000000000000000000000000000000000000000000000000008484613c75565b905092915050565b600080600083428110156130a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f556e69737761705632526f757465723a2045585049524544000000000000000081525060200191505060405180910390fd5b6130b78c8c8c8c8c8c614b86565b809450819550505060006130ec7f00000000000000000000000000000000000000000000000000000000000000008e8e613ded565b90506130fa8d338388613f0b565b6131068c338387613f0b565b80636a627842886040518263ffffffff1660e01b815260040180828152602001915050602060405180830381600087803b15801561314357600080fd5b505af1158015613157573d6000803e3d6000fd5b505050506040513d602081101561316d57600080fd5b810190808051906020019092919050505092505050985098509895505050505050565b6000806000834281101561320c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f556e69737761705632526f757465723a2045585049524544000000000000000081525060200191505060405180910390fd5b61323a8a7f00000000000000000000000000000000000000000000000000000000000000008b348c8c614b86565b8094508195505050600061328f7f00000000000000000000000000000000000000000000000000000000000000008c7f0000000000000000000000000000000000000000000000000000000000000000613ded565b905061329d8b338388613f0b565b7f000000000000000000000000000000000000000000000000000000000000000063d0e30db0856040518263ffffffff1660e01b81526004016000604051808303818588803b1580156132ef57600080fd5b505af1158015613303573d6000803e3d6000fd5b50505050507f000000000000000000000000000000000000000000000000000000000000000063a9059cbb82866040518363ffffffff1660e01b81526004018083815260200182815260200192505050602060405180830381600087803b15801561336d57600080fd5b505af1158015613381573d6000803e3d6000fd5b505050506040513d602081101561339757600080fd5b81019080805190602001909291905050506133ae57fe5b80636a627842886040518263ffffffff1660e01b815260040180828152602001915050602060405180830381600087803b1580156133eb57600080fd5b505af11580156133ff573d6000803e3d6000fd5b505050506040513d602081101561341557600080fd5b810190808051906020019092919050505092508334111561343d5761343c338534036139fc565b5b505096509650969350505050565b606081428110156134c4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f556e69737761705632526f757465723a2045585049524544000000000000000081525060200191505060405180910390fd5b7f0000000000000000000000000000000000000000000000000000000000000000868660008181106134f257fe5b905060200201351461356c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f556e69737761705632526f757465723a20494e56414c49445f5041544800000081525060200191505060405180910390fd5b6135d87f000000000000000000000000000000000000000000000000000000000000000088888880806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050506142ea565b915034826000815181106135e857fe5b60200260200101511115613647576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602781526020018061515b6027913960400191505060405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000063d0e30db08360008151811061367a57fe5b60200260200101516040518263ffffffff1660e01b81526004016000604051808303818588803b1580156136ad57600080fd5b505af11580156136c1573d6000803e3d6000fd5b50505050507f000000000000000000000000000000000000000000000000000000000000000063a9059cbb61373d7f00000000000000000000000000000000000000000000000000000000000000008989600081811061371d57fe5b905060200201358a8a600181811061373157fe5b90506020020135613ded565b8460008151811061374a57fe5b60200260200101516040518363ffffffff1660e01b81526004018083815260200182815260200192505050602060405180830381600087803b15801561378f57600080fd5b505af11580156137a3573d6000803e3d6000fd5b505050506040513d60208110156137b957600080fd5b81019080805190602001909291905050506137d057fe5b61381c82878780806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050866140ad565b8160008151811061382957fe5b602002602001015134111561385957613858338360008151811061384957fe5b602002602001015134036139fc565b5b5095945050505050565b6000808463a9059cbb858560405160240180838152602001828152602001925050506040516020818303038152906040529060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040518082805190602001908083835b602083106138f957805182526020820191506020810190506020830392506138d6565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461395b576040519150601f19603f3d011682016040523d82523d6000602084013e613960565b606091505b50915091508180156139a0575060008151148061399f575080806020019051602081101561398d57600080fd5b81019080805190602001909291905050505b5b6139f5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602d8152602001806151d3602d913960400191505060405180910390fd5b5050505050565b60008282600067ffffffffffffffff81118015613a1857600080fd5b506040519080825280601f01601f191660200182016040528015613a4b5781602001600182028036833780820191505090505b506040518082805190602001908083835b60208310613a7f5780518252602082019150602081019050602083039250613a5c565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114613ae1576040519150601f19603f3d011682016040523d82523d6000602084013e613ae6565b606091505b5050905080613b40576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603481526020018061508f6034913960400191505060405180910390fd5b505050565b6000808411613b9f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b815260200180615200602b913960400191505060405180910390fd5b600083118015613baf5750600082115b613c04576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602881526020018061510e6028913960400191505060405180910390fd5b6000613c1b6103e586614e3290919063ffffffff16565b90506000613c328483614e3290919063ffffffff16565b90506000613c5d83613c4f6103e889614e3290919063ffffffff16565b614ec790919063ffffffff16565b9050808281613c6857fe5b0493505050509392505050565b6060600282511015613cef576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f556e697377617056324c6962726172793a20494e56414c49445f50415448000081525060200191505060405180910390fd5b815167ffffffffffffffff81118015613d0757600080fd5b50604051908082528060200260200182016040528015613d365781602001602082028036833780820191505090505b5090508281600081518110613d4757fe5b60200260200101818152505060005b6001835103811015613de557600080613d9987868581518110613d7557fe5b6020026020010151876001870181518110613d8c57fe5b6020026020010151614f4a565b91509150613dbb848481518110613dac57fe5b60200260200101518383613b45565b846001850181518110613dca57fe5b60200260200101818152505050508080600101915050613d56565b509392505050565b6000806000613dfc8585614a93565b9150915060008690508683836040516020018083815260200182815260200192505050604051602081830303815290604052805190602001208263257671f56040518163ffffffff1660e01b815260040160206040518083038186803b158015613e6557600080fd5b505afa158015613e79573d6000803e3d6000fd5b505050506040513d6020811015613e8f57600080fd5b810190808051906020019092919050505060405160200180807fff0000000000000000000000000000000000000000000000000000000000000081525060010184815260200183815260200182815260200193505050506040516020818303038152906040528051906020012060001c93505050509392505050565b600080856323b872dd8686866040516024018084815260200183815260200182815260200193505050506040516020818303038152906040529060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040518082805190602001908083835b60208310613fa95780518252602082019150602081019050602083039250613f86565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461400b576040519150601f19603f3d011682016040523d82523d6000602084013e614010565b606091505b5091509150818015614050575060008151148061404f575080806020019051602081101561403d57600080fd5b81019080805190602001909291905050505b5b6140a5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603181526020018061505e6031913960400191505060405180910390fd5b505050505050565b60005b60018351038110156142e4576000808483815181106140cb57fe5b60200260200101518560018501815181106140e257fe5b60200260200101519150915060006140fa8383614a93565b509050600087600186018151811061410e57fe5b6020026020010151905060008083861461412a5782600061412e565b6000835b91509150600060028a510388106141455788614187565b6141867f0000000000000000000000000000000000000000000000000000000000000000878c60028c018151811061417957fe5b6020026020010151613ded565b5b90506141b47f00000000000000000000000000000000000000000000000000000000000000008888613ded565b63022c0d9f848484600067ffffffffffffffff811180156141d457600080fd5b506040519080825280601f01601f1916602001820160405280156142075781602001600182028036833780820191505090505b506040518563ffffffff1660e01b81526004018085815260200184815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561426957808201518184015260208101905061424e565b50505050905090810190601f1680156142965780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b1580156142b857600080fd5b505af11580156142cc573d6000803e3d6000fd5b505050505050505050505080806001019150506140b0565b50505050565b6060600282511015614364576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f556e697377617056324c6962726172793a20494e56414c49445f50415448000081525060200191505060405180910390fd5b815167ffffffffffffffff8111801561437c57600080fd5b506040519080825280602002602001820160405280156143ab5781602001602082028036833780820191505090505b50905082816001835103815181106143bf57fe5b6020026020010181815250506000600183510390505b600081111561446257600080614415878660018603815181106143f457fe5b602002602001015187868151811061440857fe5b6020026020010151614f4a565b9150915061443784848151811061442857fe5b60200260200101518383614872565b84600185038151811061444657fe5b60200260200101818152505050508080600190039150506143d5565b509392505050565b60005b60018351038110156147ea5760008084838151811061448857fe5b602002602001015185600185018151811061449f57fe5b60200260200101519150915060006144b78383614a93565b50905060006144e77f00000000000000000000000000000000000000000000000000000000000000008585613ded565b905060008060008084630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b15801561451f57600080fd5b505afa158015614533573d6000803e3d6000fd5b505050506040513d606081101561454957600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050506dffffffffffffffffffffffffffff1691506dffffffffffffffffffffffffffff169150600080878a146145a45782846145a7565b83835b91509150614633828b6370a082318a6040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156145ea57600080fd5b505afa1580156145fe573d6000803e3d6000fd5b505050506040513d602081101561461457600080fd5b81019080805190602001909291905050506147ef90919063ffffffff16565b9550614640868383613b45565b9450505050506000808588146146585782600061465c565b6000835b91509150600060028c51038a10614673578a6146b5565b6146b47f0000000000000000000000000000000000000000000000000000000000000000898e60028e01815181106146a757fe5b6020026020010151613ded565b5b90508563022c0d9f848484600067ffffffffffffffff811180156146d857600080fd5b506040519080825280601f01601f19166020018201604052801561470b5781602001600182028036833780820191505090505b506040518563ffffffff1660e01b81526004018085815260200184815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561476d578082015181840152602081019050614752565b50505050905090810190601f16801561479a5780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b1580156147bc57600080fd5b505af11580156147d0573d6000803e3d6000fd5b50505050505050505050505050808060010191505061446d565b505050565b600082828403915081111561486c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f64732d6d6174682d7375622d756e646572666c6f77000000000000000000000081525060200191505060405180910390fd5b92915050565b60008084116148cc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c815260200180615032602c913960400191505060405180910390fd5b6000831180156148dc5750600082115b614931576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602881526020018061510e6028913960400191505060405180910390fd5b600061495a6103e861494c8787614e3290919063ffffffff16565b614e3290919063ffffffff16565b905060006149856103e561497788876147ef90919063ffffffff16565b614e3290919063ffffffff16565b90506149a4600182848161499557fe5b04614ec790919063ffffffff16565b925050509392505050565b6000808411614a09576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806151366025913960400191505060405180910390fd5b600083118015614a195750600082115b614a6e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602881526020018061510e6028913960400191505060405180910390fd5b82614a828386614e3290919063ffffffff16565b81614a8957fe5b0490509392505050565b60008082841415614aef576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806150c36025913960400191505060405180910390fd5b828410614afd578284614b00565b83835b80925081935050506000821415614b7f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f556e697377617056324c6962726172793a205a45524f5f41444452455353000081525060200191505060405180910390fd5b9250929050565b60008060007f000000000000000000000000000000000000000000000000000000000000000063e6a439058a8a6040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b158015614bee57600080fd5b505afa158015614c02573d6000803e3d6000fd5b505050506040513d6020811015614c1857600080fd5b81019080805190602001909291905050501415614cd1577f000000000000000000000000000000000000000000000000000000000000000063c9c6539689896040518363ffffffff1660e01b81526004018083815260200182815260200192505050602060405180830381600087803b158015614c9457600080fd5b505af1158015614ca8573d6000803e3d6000fd5b505050506040513d6020811015614cbe57600080fd5b8101908080519060200190929190505050505b600080614cff7f00000000000000000000000000000000000000000000000000000000000000008b8b614f4a565b91509150600082148015614d135750600081145b15614d275787878094508195505050614e25565b6000614d348984846149af565b9050878111614da55785811015614d96576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806150e86026913960400191505060405180910390fd5b88818095508196505050614e23565b6000614db28984866149af565b905089811115614dbe57fe5b87811015614e17576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806151826026913960400191505060405180910390fd5b80898096508197505050505b505b5050965096945050505050565b600080821480614e4f5750828283850292508281614e4c57fe5b04145b614ec1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f64732d6d6174682d6d756c2d6f766572666c6f7700000000000000000000000081525060200191505060405180910390fd5b92915050565b6000828284019150811015614f44576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f64732d6d6174682d6164642d6f766572666c6f7700000000000000000000000081525060200191505060405180910390fd5b92915050565b6000806000614f598585614a93565b509050600080614f6a888888613ded565b630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b158015614f9957600080fd5b505afa158015614fad573d6000803e3d6000fd5b505050506040513d6060811015614fc357600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050506dffffffffffffffffffffffffffff1691506dffffffffffffffffffffffffffff16915082871461501b57808261501e565b81815b809550819650505050505093509391505056fe556e697377617056324c6962726172793a20494e53554646494349454e545f4f55545055545f414d4f554e545472616e7366657248656c7065723a3a7472616e7366657246726f6d3a207472616e7366657246726f6d206661696c65645472616e7366657248656c7065723a3a736166655472616e736665724554483a20455448207472616e73666572206661696c6564556e697377617056324c6962726172793a204944454e544943414c5f414444524553534553556e69737761705632526f757465723a20494e53554646494349454e545f425f414d4f554e54556e697377617056324c6962726172793a20494e53554646494349454e545f4c4951554944495459556e697377617056324c6962726172793a20494e53554646494349454e545f414d4f554e54556e69737761705632526f757465723a204558434553534956455f494e5055545f414d4f554e54556e69737761705632526f757465723a20494e53554646494349454e545f415f414d4f554e54556e69737761705632526f757465723a20494e53554646494349454e545f4f55545055545f414d4f554e545472616e7366657248656c7065723a3a736166655472616e736665723a207472616e73666572206661696c6564556e697377617056324c6962726172793a20494e53554646494349454e545f494e5055545f414d4f554e54a2646970667358221220ba2e1d6fcfbda6ea3cd371d17c2db40fdf72fa84c892c2d6ae3fc1bf93277a7864736f6c63430007060033";
775
+
776
+ static connect(address, runner) {
777
+ return new QuantumSwapV2Router02(address, runner);
778
+ }
779
+
780
+ constructor(address, runner, _deployTx) {
781
+ super(address, QuantumSwapV2Router02.abi, runner, QuantumSwapV2Router02.bytecode);
782
+ this._deployTx = _deployTx;
783
+
784
+ // Typed populateTransaction helpers (offline signing / sendRawTransaction flows)
785
+ this.populateTransaction = {
786
+ addLiquidity: async (tokenA, tokenB, amountADesired, amountBDesired, amountAMin, amountBMin, to, deadline, overrides) => {
787
+ const data = this.interface.encodeFunctionData("addLiquidity", [tokenA, tokenB, amountADesired, amountBDesired, amountAMin, amountBMin, to, deadline]);
788
+ return { to: this.address, data, ...(overrides || {}) };
789
+ },
790
+ addLiquidityETH: async (token, amountTokenDesired, amountTokenMin, amountETHMin, to, deadline, overrides) => {
791
+ const data = this.interface.encodeFunctionData("addLiquidityETH", [token, amountTokenDesired, amountTokenMin, amountETHMin, to, deadline]);
792
+ return { to: this.address, data, ...(overrides || {}) };
793
+ },
794
+ removeLiquidity: async (tokenA, tokenB, liquidity, amountAMin, amountBMin, to, deadline, overrides) => {
795
+ const data = this.interface.encodeFunctionData("removeLiquidity", [tokenA, tokenB, liquidity, amountAMin, amountBMin, to, deadline]);
796
+ return { to: this.address, data, ...(overrides || {}) };
797
+ },
798
+ removeLiquidityETH: async (token, liquidity, amountTokenMin, amountETHMin, to, deadline, overrides) => {
799
+ const data = this.interface.encodeFunctionData("removeLiquidityETH", [token, liquidity, amountTokenMin, amountETHMin, to, deadline]);
800
+ return { to: this.address, data, ...(overrides || {}) };
801
+ },
802
+ removeLiquidityETHSupportingFeeOnTransferTokens: async (token, liquidity, amountTokenMin, amountETHMin, to, deadline, overrides) => {
803
+ const data = this.interface.encodeFunctionData("removeLiquidityETHSupportingFeeOnTransferTokens", [token, liquidity, amountTokenMin, amountETHMin, to, deadline]);
804
+ return { to: this.address, data, ...(overrides || {}) };
805
+ },
806
+ swapETHForExactTokens: async (amountOut, path, to, deadline, overrides) => {
807
+ const data = this.interface.encodeFunctionData("swapETHForExactTokens", [amountOut, path, to, deadline]);
808
+ return { to: this.address, data, ...(overrides || {}) };
809
+ },
810
+ swapExactETHForTokens: async (amountOutMin, path, to, deadline, overrides) => {
811
+ const data = this.interface.encodeFunctionData("swapExactETHForTokens", [amountOutMin, path, to, deadline]);
812
+ return { to: this.address, data, ...(overrides || {}) };
813
+ },
814
+ swapExactETHForTokensSupportingFeeOnTransferTokens: async (amountOutMin, path, to, deadline, overrides) => {
815
+ const data = this.interface.encodeFunctionData("swapExactETHForTokensSupportingFeeOnTransferTokens", [amountOutMin, path, to, deadline]);
816
+ return { to: this.address, data, ...(overrides || {}) };
817
+ },
818
+ swapExactTokensForETH: async (amountIn, amountOutMin, path, to, deadline, overrides) => {
819
+ const data = this.interface.encodeFunctionData("swapExactTokensForETH", [amountIn, amountOutMin, path, to, deadline]);
820
+ return { to: this.address, data, ...(overrides || {}) };
821
+ },
822
+ swapExactTokensForETHSupportingFeeOnTransferTokens: async (amountIn, amountOutMin, path, to, deadline, overrides) => {
823
+ const data = this.interface.encodeFunctionData("swapExactTokensForETHSupportingFeeOnTransferTokens", [amountIn, amountOutMin, path, to, deadline]);
824
+ return { to: this.address, data, ...(overrides || {}) };
825
+ },
826
+ swapExactTokensForTokens: async (amountIn, amountOutMin, path, to, deadline, overrides) => {
827
+ const data = this.interface.encodeFunctionData("swapExactTokensForTokens", [amountIn, amountOutMin, path, to, deadline]);
828
+ return { to: this.address, data, ...(overrides || {}) };
829
+ },
830
+ swapExactTokensForTokensSupportingFeeOnTransferTokens: async (amountIn, amountOutMin, path, to, deadline, overrides) => {
831
+ const data = this.interface.encodeFunctionData("swapExactTokensForTokensSupportingFeeOnTransferTokens", [amountIn, amountOutMin, path, to, deadline]);
832
+ return { to: this.address, data, ...(overrides || {}) };
833
+ },
834
+ swapTokensForExactETH: async (amountOut, amountInMax, path, to, deadline, overrides) => {
835
+ const data = this.interface.encodeFunctionData("swapTokensForExactETH", [amountOut, amountInMax, path, to, deadline]);
836
+ return { to: this.address, data, ...(overrides || {}) };
837
+ },
838
+ swapTokensForExactTokens: async (amountOut, amountInMax, path, to, deadline, overrides) => {
839
+ const data = this.interface.encodeFunctionData("swapTokensForExactTokens", [amountOut, amountInMax, path, to, deadline]);
840
+ return { to: this.address, data, ...(overrides || {}) };
841
+ },
842
+ };
843
+ }
844
+
845
+ /**
846
+ * WETH
847
+ * @returns {Promise<import("quantumcoin/types").SolAddress>}
848
+ */
849
+ async WETH() {
850
+ const res = await this.call("WETH", []);
851
+ return Array.isArray(res) ? res[0] : res;
852
+ }
853
+
854
+ /**
855
+ * addLiquidity
856
+ * @param {import("quantumcoin/types").AddressLike} tokenA
857
+ * @param {import("quantumcoin/types").AddressLike} tokenB
858
+ * @param {import("quantumcoin/types").Uint256Like} amountADesired
859
+ * @param {import("quantumcoin/types").Uint256Like} amountBDesired
860
+ * @param {import("quantumcoin/types").Uint256Like} amountAMin
861
+ * @param {import("quantumcoin/types").Uint256Like} amountBMin
862
+ * @param {import("quantumcoin/types").AddressLike} to
863
+ * @param {import("quantumcoin/types").Uint256Like} deadline
864
+ * @returns {Promise<import("quantumcoin").ContractTransactionResponse>}
865
+ */
866
+ async addLiquidity(tokenA, tokenB, amountADesired, amountBDesired, amountAMin, amountBMin, to, deadline, overrides) {
867
+ return this.send("addLiquidity", [tokenA, tokenB, amountADesired, amountBDesired, amountAMin, amountBMin, to, deadline], overrides);
868
+ }
869
+
870
+ /**
871
+ * addLiquidityETH
872
+ * @param {import("quantumcoin/types").AddressLike} token
873
+ * @param {import("quantumcoin/types").Uint256Like} amountTokenDesired
874
+ * @param {import("quantumcoin/types").Uint256Like} amountTokenMin
875
+ * @param {import("quantumcoin/types").Uint256Like} amountETHMin
876
+ * @param {import("quantumcoin/types").AddressLike} to
877
+ * @param {import("quantumcoin/types").Uint256Like} deadline
878
+ * @returns {Promise<import("quantumcoin").ContractTransactionResponse>}
879
+ */
880
+ async addLiquidityETH(token, amountTokenDesired, amountTokenMin, amountETHMin, to, deadline, overrides) {
881
+ return this.send("addLiquidityETH", [token, amountTokenDesired, amountTokenMin, amountETHMin, to, deadline], overrides);
882
+ }
883
+
884
+ /**
885
+ * factory
886
+ * @returns {Promise<import("quantumcoin/types").SolAddress>}
887
+ */
888
+ async factory() {
889
+ const res = await this.call("factory", []);
890
+ return Array.isArray(res) ? res[0] : res;
891
+ }
892
+
893
+ /**
894
+ * getAmountIn
895
+ * @param {import("quantumcoin/types").Uint256Like} amountOut
896
+ * @param {import("quantumcoin/types").Uint256Like} reserveIn
897
+ * @param {import("quantumcoin/types").Uint256Like} reserveOut
898
+ * @returns {Promise<import("quantumcoin/types").Uint256>}
899
+ */
900
+ async getAmountIn(amountOut, reserveIn, reserveOut) {
901
+ const res = await this.call("getAmountIn", [amountOut, reserveIn, reserveOut]);
902
+ return Array.isArray(res) ? res[0] : res;
903
+ }
904
+
905
+ /**
906
+ * getAmountOut
907
+ * @param {import("quantumcoin/types").Uint256Like} amountIn
908
+ * @param {import("quantumcoin/types").Uint256Like} reserveIn
909
+ * @param {import("quantumcoin/types").Uint256Like} reserveOut
910
+ * @returns {Promise<import("quantumcoin/types").Uint256>}
911
+ */
912
+ async getAmountOut(amountIn, reserveIn, reserveOut) {
913
+ const res = await this.call("getAmountOut", [amountIn, reserveIn, reserveOut]);
914
+ return Array.isArray(res) ? res[0] : res;
915
+ }
916
+
917
+ /**
918
+ * getAmountsIn
919
+ * @param {import("quantumcoin/types").Uint256Like} amountOut
920
+ * @param {Array<import("quantumcoin/types").AddressLike>} path
921
+ * @returns {Promise<Array<import("quantumcoin/types").Uint256>>}
922
+ */
923
+ async getAmountsIn(amountOut, path) {
924
+ const res = await this.call("getAmountsIn", [amountOut, path]);
925
+ return Array.isArray(res) ? res[0] : res;
926
+ }
927
+
928
+ /**
929
+ * getAmountsOut
930
+ * @param {import("quantumcoin/types").Uint256Like} amountIn
931
+ * @param {Array<import("quantumcoin/types").AddressLike>} path
932
+ * @returns {Promise<Array<import("quantumcoin/types").Uint256>>}
933
+ */
934
+ async getAmountsOut(amountIn, path) {
935
+ const res = await this.call("getAmountsOut", [amountIn, path]);
936
+ return Array.isArray(res) ? res[0] : res;
937
+ }
938
+
939
+ /**
940
+ * quote
941
+ * @param {import("quantumcoin/types").Uint256Like} amountA
942
+ * @param {import("quantumcoin/types").Uint256Like} reserveA
943
+ * @param {import("quantumcoin/types").Uint256Like} reserveB
944
+ * @returns {Promise<import("quantumcoin/types").Uint256>}
945
+ */
946
+ async quote(amountA, reserveA, reserveB) {
947
+ const res = await this.call("quote", [amountA, reserveA, reserveB]);
948
+ return Array.isArray(res) ? res[0] : res;
949
+ }
950
+
951
+ /**
952
+ * removeLiquidity
953
+ * @param {import("quantumcoin/types").AddressLike} tokenA
954
+ * @param {import("quantumcoin/types").AddressLike} tokenB
955
+ * @param {import("quantumcoin/types").Uint256Like} liquidity
956
+ * @param {import("quantumcoin/types").Uint256Like} amountAMin
957
+ * @param {import("quantumcoin/types").Uint256Like} amountBMin
958
+ * @param {import("quantumcoin/types").AddressLike} to
959
+ * @param {import("quantumcoin/types").Uint256Like} deadline
960
+ * @returns {Promise<import("quantumcoin").ContractTransactionResponse>}
961
+ */
962
+ async removeLiquidity(tokenA, tokenB, liquidity, amountAMin, amountBMin, to, deadline, overrides) {
963
+ return this.send("removeLiquidity", [tokenA, tokenB, liquidity, amountAMin, amountBMin, to, deadline], overrides);
964
+ }
965
+
966
+ /**
967
+ * removeLiquidityETH
968
+ * @param {import("quantumcoin/types").AddressLike} token
969
+ * @param {import("quantumcoin/types").Uint256Like} liquidity
970
+ * @param {import("quantumcoin/types").Uint256Like} amountTokenMin
971
+ * @param {import("quantumcoin/types").Uint256Like} amountETHMin
972
+ * @param {import("quantumcoin/types").AddressLike} to
973
+ * @param {import("quantumcoin/types").Uint256Like} deadline
974
+ * @returns {Promise<import("quantumcoin").ContractTransactionResponse>}
975
+ */
976
+ async removeLiquidityETH(token, liquidity, amountTokenMin, amountETHMin, to, deadline, overrides) {
977
+ return this.send("removeLiquidityETH", [token, liquidity, amountTokenMin, amountETHMin, to, deadline], overrides);
978
+ }
979
+
980
+ /**
981
+ * removeLiquidityETHSupportingFeeOnTransferTokens
982
+ * @param {import("quantumcoin/types").AddressLike} token
983
+ * @param {import("quantumcoin/types").Uint256Like} liquidity
984
+ * @param {import("quantumcoin/types").Uint256Like} amountTokenMin
985
+ * @param {import("quantumcoin/types").Uint256Like} amountETHMin
986
+ * @param {import("quantumcoin/types").AddressLike} to
987
+ * @param {import("quantumcoin/types").Uint256Like} deadline
988
+ * @returns {Promise<import("quantumcoin").ContractTransactionResponse>}
989
+ */
990
+ async removeLiquidityETHSupportingFeeOnTransferTokens(token, liquidity, amountTokenMin, amountETHMin, to, deadline, overrides) {
991
+ return this.send("removeLiquidityETHSupportingFeeOnTransferTokens", [token, liquidity, amountTokenMin, amountETHMin, to, deadline], overrides);
992
+ }
993
+
994
+ /**
995
+ * swapETHForExactTokens
996
+ * @param {import("quantumcoin/types").Uint256Like} amountOut
997
+ * @param {Array<import("quantumcoin/types").AddressLike>} path
998
+ * @param {import("quantumcoin/types").AddressLike} to
999
+ * @param {import("quantumcoin/types").Uint256Like} deadline
1000
+ * @returns {Promise<import("quantumcoin").ContractTransactionResponse>}
1001
+ */
1002
+ async swapETHForExactTokens(amountOut, path, to, deadline, overrides) {
1003
+ return this.send("swapETHForExactTokens", [amountOut, path, to, deadline], overrides);
1004
+ }
1005
+
1006
+ /**
1007
+ * swapExactETHForTokens
1008
+ * @param {import("quantumcoin/types").Uint256Like} amountOutMin
1009
+ * @param {Array<import("quantumcoin/types").AddressLike>} path
1010
+ * @param {import("quantumcoin/types").AddressLike} to
1011
+ * @param {import("quantumcoin/types").Uint256Like} deadline
1012
+ * @returns {Promise<import("quantumcoin").ContractTransactionResponse>}
1013
+ */
1014
+ async swapExactETHForTokens(amountOutMin, path, to, deadline, overrides) {
1015
+ return this.send("swapExactETHForTokens", [amountOutMin, path, to, deadline], overrides);
1016
+ }
1017
+
1018
+ /**
1019
+ * swapExactETHForTokensSupportingFeeOnTransferTokens
1020
+ * @param {import("quantumcoin/types").Uint256Like} amountOutMin
1021
+ * @param {Array<import("quantumcoin/types").AddressLike>} path
1022
+ * @param {import("quantumcoin/types").AddressLike} to
1023
+ * @param {import("quantumcoin/types").Uint256Like} deadline
1024
+ * @returns {Promise<import("quantumcoin").ContractTransactionResponse>}
1025
+ */
1026
+ async swapExactETHForTokensSupportingFeeOnTransferTokens(amountOutMin, path, to, deadline, overrides) {
1027
+ return this.send("swapExactETHForTokensSupportingFeeOnTransferTokens", [amountOutMin, path, to, deadline], overrides);
1028
+ }
1029
+
1030
+ /**
1031
+ * swapExactTokensForETH
1032
+ * @param {import("quantumcoin/types").Uint256Like} amountIn
1033
+ * @param {import("quantumcoin/types").Uint256Like} amountOutMin
1034
+ * @param {Array<import("quantumcoin/types").AddressLike>} path
1035
+ * @param {import("quantumcoin/types").AddressLike} to
1036
+ * @param {import("quantumcoin/types").Uint256Like} deadline
1037
+ * @returns {Promise<import("quantumcoin").ContractTransactionResponse>}
1038
+ */
1039
+ async swapExactTokensForETH(amountIn, amountOutMin, path, to, deadline, overrides) {
1040
+ return this.send("swapExactTokensForETH", [amountIn, amountOutMin, path, to, deadline], overrides);
1041
+ }
1042
+
1043
+ /**
1044
+ * swapExactTokensForETHSupportingFeeOnTransferTokens
1045
+ * @param {import("quantumcoin/types").Uint256Like} amountIn
1046
+ * @param {import("quantumcoin/types").Uint256Like} amountOutMin
1047
+ * @param {Array<import("quantumcoin/types").AddressLike>} path
1048
+ * @param {import("quantumcoin/types").AddressLike} to
1049
+ * @param {import("quantumcoin/types").Uint256Like} deadline
1050
+ * @returns {Promise<import("quantumcoin").ContractTransactionResponse>}
1051
+ */
1052
+ async swapExactTokensForETHSupportingFeeOnTransferTokens(amountIn, amountOutMin, path, to, deadline, overrides) {
1053
+ return this.send("swapExactTokensForETHSupportingFeeOnTransferTokens", [amountIn, amountOutMin, path, to, deadline], overrides);
1054
+ }
1055
+
1056
+ /**
1057
+ * swapExactTokensForTokens
1058
+ * @param {import("quantumcoin/types").Uint256Like} amountIn
1059
+ * @param {import("quantumcoin/types").Uint256Like} amountOutMin
1060
+ * @param {Array<import("quantumcoin/types").AddressLike>} path
1061
+ * @param {import("quantumcoin/types").AddressLike} to
1062
+ * @param {import("quantumcoin/types").Uint256Like} deadline
1063
+ * @returns {Promise<import("quantumcoin").ContractTransactionResponse>}
1064
+ */
1065
+ async swapExactTokensForTokens(amountIn, amountOutMin, path, to, deadline, overrides) {
1066
+ return this.send("swapExactTokensForTokens", [amountIn, amountOutMin, path, to, deadline], overrides);
1067
+ }
1068
+
1069
+ /**
1070
+ * swapExactTokensForTokensSupportingFeeOnTransferTokens
1071
+ * @param {import("quantumcoin/types").Uint256Like} amountIn
1072
+ * @param {import("quantumcoin/types").Uint256Like} amountOutMin
1073
+ * @param {Array<import("quantumcoin/types").AddressLike>} path
1074
+ * @param {import("quantumcoin/types").AddressLike} to
1075
+ * @param {import("quantumcoin/types").Uint256Like} deadline
1076
+ * @returns {Promise<import("quantumcoin").ContractTransactionResponse>}
1077
+ */
1078
+ async swapExactTokensForTokensSupportingFeeOnTransferTokens(amountIn, amountOutMin, path, to, deadline, overrides) {
1079
+ return this.send("swapExactTokensForTokensSupportingFeeOnTransferTokens", [amountIn, amountOutMin, path, to, deadline], overrides);
1080
+ }
1081
+
1082
+ /**
1083
+ * swapTokensForExactETH
1084
+ * @param {import("quantumcoin/types").Uint256Like} amountOut
1085
+ * @param {import("quantumcoin/types").Uint256Like} amountInMax
1086
+ * @param {Array<import("quantumcoin/types").AddressLike>} path
1087
+ * @param {import("quantumcoin/types").AddressLike} to
1088
+ * @param {import("quantumcoin/types").Uint256Like} deadline
1089
+ * @returns {Promise<import("quantumcoin").ContractTransactionResponse>}
1090
+ */
1091
+ async swapTokensForExactETH(amountOut, amountInMax, path, to, deadline, overrides) {
1092
+ return this.send("swapTokensForExactETH", [amountOut, amountInMax, path, to, deadline], overrides);
1093
+ }
1094
+
1095
+ /**
1096
+ * swapTokensForExactTokens
1097
+ * @param {import("quantumcoin/types").Uint256Like} amountOut
1098
+ * @param {import("quantumcoin/types").Uint256Like} amountInMax
1099
+ * @param {Array<import("quantumcoin/types").AddressLike>} path
1100
+ * @param {import("quantumcoin/types").AddressLike} to
1101
+ * @param {import("quantumcoin/types").Uint256Like} deadline
1102
+ * @returns {Promise<import("quantumcoin").ContractTransactionResponse>}
1103
+ */
1104
+ async swapTokensForExactTokens(amountOut, amountInMax, path, to, deadline, overrides) {
1105
+ return this.send("swapTokensForExactTokens", [amountOut, amountInMax, path, to, deadline], overrides);
1106
+ }
1107
+ }
1108
+
1109
+ module.exports = { QuantumSwapV2Router02 };