@rabby-wallet/rabby-swap 0.0.71 → 0.0.72-beta.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.
package/dist/abi.js CHANGED
@@ -1,1738 +1,1738 @@
1
- export const OneInchABI = [
2
- {
3
- inputs: [
4
- {
5
- internalType: "contract IAggregationExecutor",
6
- name: "executor",
7
- type: "address",
8
- },
9
- {
10
- components: [
11
- {
12
- internalType: "contract IERC20",
13
- name: "srcToken",
14
- type: "address",
15
- },
16
- {
17
- internalType: "contract IERC20",
18
- name: "dstToken",
19
- type: "address",
20
- },
21
- {
22
- internalType: "address payable",
23
- name: "srcReceiver",
24
- type: "address",
25
- },
26
- {
27
- internalType: "address payable",
28
- name: "dstReceiver",
29
- type: "address",
30
- },
31
- { internalType: "uint256", name: "amount", type: "uint256" },
32
- { internalType: "uint256", name: "minReturnAmount", type: "uint256" },
33
- { internalType: "uint256", name: "flags", type: "uint256" },
34
- ],
35
- internalType: "struct GenericRouter.SwapDescription",
36
- name: "desc",
37
- type: "tuple",
38
- },
39
- { internalType: "bytes", name: "permit", type: "bytes" },
40
- { internalType: "bytes", name: "data", type: "bytes" },
41
- ],
42
- name: "swap",
43
- outputs: [
44
- { internalType: "uint256", name: "returnAmount", type: "uint256" },
45
- { internalType: "uint256", name: "spentAmount", type: "uint256" },
46
- ],
47
- stateMutability: "payable",
48
- type: "function",
49
- },
50
- {
51
- inputs: [
52
- { internalType: "uint256", name: "amount", type: "uint256" },
53
- { internalType: "uint256", name: "minReturn", type: "uint256" },
54
- { internalType: "uint256[]", name: "pools", type: "uint256[]" },
55
- ],
56
- name: "uniswapV3Swap",
57
- outputs: [
58
- { internalType: "uint256", name: "returnAmount", type: "uint256" },
59
- ],
60
- stateMutability: "payable",
61
- type: "function",
62
- },
63
- {
64
- inputs: [
65
- { internalType: "address payable", name: "recipient", type: "address" },
66
- { internalType: "uint256", name: "amount", type: "uint256" },
67
- { internalType: "uint256", name: "minReturn", type: "uint256" },
68
- { internalType: "uint256[]", name: "pools", type: "uint256[]" },
69
- ],
70
- name: "uniswapV3SwapTo",
71
- outputs: [
72
- { internalType: "uint256", name: "returnAmount", type: "uint256" },
73
- ],
74
- stateMutability: "payable",
75
- type: "function",
76
- },
77
- {
78
- inputs: [
79
- { internalType: "contract IERC20", name: "srcToken", type: "address" },
80
- { internalType: "uint256", name: "amount", type: "uint256" },
81
- { internalType: "uint256", name: "minReturn", type: "uint256" },
82
- { internalType: "uint256[]", name: "pools", type: "uint256[]" },
83
- ],
84
- name: "unoswap",
85
- outputs: [
86
- { internalType: "uint256", name: "returnAmount", type: "uint256" },
87
- ],
88
- stateMutability: "payable",
89
- type: "function",
90
- },
91
- {
92
- inputs: [
93
- { internalType: "address payable", name: "recipient", type: "address" },
94
- { internalType: "contract IERC20", name: "srcToken", type: "address" },
95
- { internalType: "uint256", name: "amount", type: "uint256" },
96
- { internalType: "uint256", name: "minReturn", type: "uint256" },
97
- { internalType: "uint256[]", name: "pools", type: "uint256[]" },
98
- ],
99
- name: "unoswapTo",
100
- outputs: [
101
- { internalType: "uint256", name: "returnAmount", type: "uint256" },
102
- ],
103
- stateMutability: "payable",
104
- type: "function",
105
- },
106
- ];
107
- export const ZeroXABI = [
108
- {
109
- inputs: [
110
- {
111
- name: "inputToken",
112
- type: "address",
113
- },
114
- {
115
- name: "outputToken",
116
- type: "address",
117
- },
118
- {
119
- name: "inputTokenAmount",
120
- type: "uint256",
121
- },
122
- {
123
- name: "minOutputTokenAmount",
124
- type: "uint256",
125
- },
126
- {
127
- name: "transformations",
128
- type: "(uint32,bytes)[]",
129
- components: [
130
- {
131
- name: "deploymentNonce",
132
- type: "uint32",
133
- },
134
- {
135
- name: "data",
136
- type: "bytes",
137
- },
138
- ],
139
- },
140
- ],
141
- name: "transformERC20",
142
- outputs: [
143
- {
144
- name: "outputTokenAmount",
145
- type: "uint256",
146
- },
147
- ],
148
- stateMutability: "payable",
149
- type: "function",
150
- },
151
- ];
152
- export const ParaSwapABI = [
153
- {
154
- inputs: [
155
- {
156
- components: [
157
- {
158
- internalType: "address",
159
- name: "fromToken",
160
- type: "address",
161
- },
162
- {
163
- internalType: "uint256",
164
- name: "fromAmount",
165
- type: "uint256",
166
- },
167
- {
168
- internalType: "uint256",
169
- name: "toAmount",
170
- type: "uint256",
171
- },
172
- {
173
- internalType: "uint256",
174
- name: "expectedAmount",
175
- type: "uint256",
176
- },
177
- {
178
- internalType: "address payable",
179
- name: "beneficiary",
180
- type: "address",
181
- },
182
- {
183
- components: [
184
- {
185
- internalType: "uint256",
186
- name: "fromAmountPercent",
187
- type: "uint256",
188
- },
189
- {
190
- components: [
191
- {
192
- internalType: "address",
193
- name: "to",
194
- type: "address",
195
- },
196
- {
197
- internalType: "uint256",
198
- name: "totalNetworkFee",
199
- type: "uint256",
200
- },
201
- {
202
- components: [
203
- {
204
- internalType: "address payable",
205
- name: "adapter",
206
- type: "address",
207
- },
208
- {
209
- internalType: "uint256",
210
- name: "percent",
211
- type: "uint256",
212
- },
213
- {
214
- internalType: "uint256",
215
- name: "networkFee",
216
- type: "uint256",
217
- },
218
- {
219
- components: [
220
- {
221
- internalType: "uint256",
222
- name: "index",
223
- type: "uint256",
224
- },
225
- {
226
- internalType: "address",
227
- name: "targetExchange",
228
- type: "address",
229
- },
230
- {
231
- internalType: "uint256",
232
- name: "percent",
233
- type: "uint256",
234
- },
235
- {
236
- internalType: "bytes",
237
- name: "payload",
238
- type: "bytes",
239
- },
240
- {
241
- internalType: "uint256",
242
- name: "networkFee",
243
- type: "uint256",
244
- },
245
- ],
246
- internalType: "struct Utils.Route[]",
247
- name: "route",
248
- type: "tuple[]",
249
- },
250
- ],
251
- internalType: "struct Utils.Adapter[]",
252
- name: "adapters",
253
- type: "tuple[]",
254
- },
255
- ],
256
- internalType: "struct Utils.Path[]",
257
- name: "path",
258
- type: "tuple[]",
259
- },
260
- ],
261
- internalType: "struct Utils.MegaSwapPath[]",
262
- name: "path",
263
- type: "tuple[]",
264
- },
265
- {
266
- internalType: "address payable",
267
- name: "partner",
268
- type: "address",
269
- },
270
- {
271
- internalType: "uint256",
272
- name: "feePercent",
273
- type: "uint256",
274
- },
275
- {
276
- internalType: "bytes",
277
- name: "permit",
278
- type: "bytes",
279
- },
280
- {
281
- internalType: "uint256",
282
- name: "deadline",
283
- type: "uint256",
284
- },
285
- {
286
- internalType: "bytes16",
287
- name: "uuid",
288
- type: "bytes16",
289
- },
290
- ],
291
- internalType: "struct Utils.MegaSwapSellData",
292
- name: "data",
293
- type: "tuple",
294
- },
295
- ],
296
- name: "megaSwap",
297
- outputs: [
298
- {
299
- internalType: "uint256",
300
- name: "",
301
- type: "uint256",
302
- },
303
- ],
304
- stateMutability: "payable",
305
- type: "function",
306
- },
307
- {
308
- inputs: [
309
- {
310
- components: [
311
- {
312
- internalType: "address",
313
- name: "fromToken",
314
- type: "address",
315
- },
316
- {
317
- internalType: "uint256",
318
- name: "fromAmount",
319
- type: "uint256",
320
- },
321
- {
322
- internalType: "uint256",
323
- name: "toAmount",
324
- type: "uint256",
325
- },
326
- {
327
- internalType: "uint256",
328
- name: "expectedAmount",
329
- type: "uint256",
330
- },
331
- {
332
- internalType: "address payable",
333
- name: "beneficiary",
334
- type: "address",
335
- },
336
- {
337
- components: [
338
- {
339
- internalType: "address",
340
- name: "to",
341
- type: "address",
342
- },
343
- {
344
- internalType: "uint256",
345
- name: "totalNetworkFee",
346
- type: "uint256",
347
- },
348
- {
349
- components: [
350
- {
351
- internalType: "address payable",
352
- name: "adapter",
353
- type: "address",
354
- },
355
- {
356
- internalType: "uint256",
357
- name: "percent",
358
- type: "uint256",
359
- },
360
- {
361
- internalType: "uint256",
362
- name: "networkFee",
363
- type: "uint256",
364
- },
365
- {
366
- components: [
367
- {
368
- internalType: "uint256",
369
- name: "index",
370
- type: "uint256",
371
- },
372
- {
373
- internalType: "address",
374
- name: "targetExchange",
375
- type: "address",
376
- },
377
- {
378
- internalType: "uint256",
379
- name: "percent",
380
- type: "uint256",
381
- },
382
- {
383
- internalType: "bytes",
384
- name: "payload",
385
- type: "bytes",
386
- },
387
- {
388
- internalType: "uint256",
389
- name: "networkFee",
390
- type: "uint256",
391
- },
392
- ],
393
- internalType: "struct Utils.Route[]",
394
- name: "route",
395
- type: "tuple[]",
396
- },
397
- ],
398
- internalType: "struct Utils.Adapter[]",
399
- name: "adapters",
400
- type: "tuple[]",
401
- },
402
- ],
403
- internalType: "struct Utils.Path[]",
404
- name: "path",
405
- type: "tuple[]",
406
- },
407
- {
408
- internalType: "address payable",
409
- name: "partner",
410
- type: "address",
411
- },
412
- {
413
- internalType: "uint256",
414
- name: "feePercent",
415
- type: "uint256",
416
- },
417
- {
418
- internalType: "bytes",
419
- name: "permit",
420
- type: "bytes",
421
- },
422
- {
423
- internalType: "uint256",
424
- name: "deadline",
425
- type: "uint256",
426
- },
427
- {
428
- internalType: "bytes16",
429
- name: "uuid",
430
- type: "bytes16",
431
- },
432
- ],
433
- internalType: "struct Utils.SellData",
434
- name: "data",
435
- type: "tuple",
436
- },
437
- ],
438
- name: "multiSwap",
439
- outputs: [
440
- {
441
- internalType: "uint256",
442
- name: "",
443
- type: "uint256",
444
- },
445
- ],
446
- stateMutability: "payable",
447
- type: "function",
448
- },
449
- {
450
- inputs: [
451
- {
452
- components: [
453
- {
454
- internalType: "address",
455
- name: "fromToken",
456
- type: "address",
457
- },
458
- {
459
- internalType: "address",
460
- name: "toToken",
461
- type: "address",
462
- },
463
- {
464
- internalType: "uint256",
465
- name: "fromAmount",
466
- type: "uint256",
467
- },
468
- {
469
- internalType: "uint256",
470
- name: "toAmount",
471
- type: "uint256",
472
- },
473
- {
474
- internalType: "uint256",
475
- name: "expectedAmount",
476
- type: "uint256",
477
- },
478
- {
479
- internalType: "address[]",
480
- name: "callees",
481
- type: "address[]",
482
- },
483
- {
484
- internalType: "bytes",
485
- name: "exchangeData",
486
- type: "bytes",
487
- },
488
- {
489
- internalType: "uint256[]",
490
- name: "startIndexes",
491
- type: "uint256[]",
492
- },
493
- {
494
- internalType: "uint256[]",
495
- name: "values",
496
- type: "uint256[]",
497
- },
498
- {
499
- internalType: "address payable",
500
- name: "beneficiary",
501
- type: "address",
502
- },
503
- {
504
- internalType: "address payable",
505
- name: "partner",
506
- type: "address",
507
- },
508
- {
509
- internalType: "uint256",
510
- name: "feePercent",
511
- type: "uint256",
512
- },
513
- {
514
- internalType: "bytes",
515
- name: "permit",
516
- type: "bytes",
517
- },
518
- {
519
- internalType: "uint256",
520
- name: "deadline",
521
- type: "uint256",
522
- },
523
- {
524
- internalType: "bytes16",
525
- name: "uuid",
526
- type: "bytes16",
527
- },
528
- ],
529
- internalType: "struct Utils.SimpleData",
530
- name: "data",
531
- type: "tuple",
532
- },
533
- ],
534
- name: "simpleSwap",
535
- outputs: [
536
- {
537
- internalType: "uint256",
538
- name: "receivedAmount",
539
- type: "uint256",
540
- },
541
- ],
542
- stateMutability: "payable",
543
- type: "function",
544
- },
545
- ];
546
- export const OpenOceanABI = [
547
- {
548
- anonymous: false,
549
- inputs: [
550
- {
551
- indexed: true,
552
- internalType: "address",
553
- name: "previousOwner",
554
- type: "address",
555
- },
556
- {
557
- indexed: true,
558
- internalType: "address",
559
- name: "newOwner",
560
- type: "address",
561
- },
562
- ],
563
- name: "OwnershipTransferred",
564
- type: "event",
565
- },
566
- {
567
- anonymous: false,
568
- inputs: [
569
- {
570
- indexed: false,
571
- internalType: "address",
572
- name: "account",
573
- type: "address",
574
- },
575
- ],
576
- name: "Paused",
577
- type: "event",
578
- },
579
- {
580
- anonymous: false,
581
- inputs: [
582
- {
583
- indexed: true,
584
- internalType: "address",
585
- name: "sender",
586
- type: "address",
587
- },
588
- {
589
- indexed: true,
590
- internalType: "contract IERC20",
591
- name: "srcToken",
592
- type: "address",
593
- },
594
- {
595
- indexed: true,
596
- internalType: "contract IERC20",
597
- name: "dstToken",
598
- type: "address",
599
- },
600
- {
601
- indexed: false,
602
- internalType: "address",
603
- name: "dstReceiver",
604
- type: "address",
605
- },
606
- {
607
- indexed: false,
608
- internalType: "uint256",
609
- name: "amount",
610
- type: "uint256",
611
- },
612
- {
613
- indexed: false,
614
- internalType: "uint256",
615
- name: "spentAmount",
616
- type: "uint256",
617
- },
618
- {
619
- indexed: false,
620
- internalType: "uint256",
621
- name: "returnAmount",
622
- type: "uint256",
623
- },
624
- {
625
- indexed: false,
626
- internalType: "uint256",
627
- name: "minReturnAmount",
628
- type: "uint256",
629
- },
630
- {
631
- indexed: false,
632
- internalType: "uint256",
633
- name: "guaranteedAmount",
634
- type: "uint256",
635
- },
636
- {
637
- indexed: false,
638
- internalType: "address",
639
- name: "referrer",
640
- type: "address",
641
- },
642
- ],
643
- name: "Swapped",
644
- type: "event",
645
- },
646
- {
647
- anonymous: false,
648
- inputs: [
649
- {
650
- indexed: false,
651
- internalType: "address",
652
- name: "account",
653
- type: "address",
654
- },
655
- ],
656
- name: "Unpaused",
657
- type: "event",
658
- },
659
- {
660
- inputs: [],
661
- name: "initialize",
662
- outputs: [],
663
- stateMutability: "nonpayable",
664
- type: "function",
665
- },
666
- {
667
- inputs: [],
668
- name: "owner",
669
- outputs: [{ internalType: "address", name: "", type: "address" }],
670
- stateMutability: "view",
671
- type: "function",
672
- },
673
- {
674
- inputs: [],
675
- name: "pause",
676
- outputs: [],
677
- stateMutability: "nonpayable",
678
- type: "function",
679
- },
680
- {
681
- inputs: [],
682
- name: "paused",
683
- outputs: [{ internalType: "bool", name: "", type: "bool" }],
684
- stateMutability: "view",
685
- type: "function",
686
- },
687
- {
688
- inputs: [],
689
- name: "renounceOwnership",
690
- outputs: [],
691
- stateMutability: "nonpayable",
692
- type: "function",
693
- },
694
- {
695
- inputs: [
696
- { internalType: "contract IERC20", name: "token", type: "address" },
697
- { internalType: "uint256", name: "amount", type: "uint256" },
698
- ],
699
- name: "rescueFunds",
700
- outputs: [],
701
- stateMutability: "nonpayable",
702
- type: "function",
703
- },
704
- {
705
- inputs: [
706
- {
707
- internalType: "contract IOpenOceanCaller",
708
- name: "caller",
709
- type: "address",
710
- },
711
- {
712
- components: [
713
- {
714
- internalType: "contract IERC20",
715
- name: "srcToken",
716
- type: "address",
717
- },
718
- {
719
- internalType: "contract IERC20",
720
- name: "dstToken",
721
- type: "address",
722
- },
723
- { internalType: "address", name: "srcReceiver", type: "address" },
724
- { internalType: "address", name: "dstReceiver", type: "address" },
725
- { internalType: "uint256", name: "amount", type: "uint256" },
726
- { internalType: "uint256", name: "minReturnAmount", type: "uint256" },
727
- {
728
- internalType: "uint256",
729
- name: "guaranteedAmount",
730
- type: "uint256",
731
- },
732
- { internalType: "uint256", name: "flags", type: "uint256" },
733
- { internalType: "address", name: "referrer", type: "address" },
734
- { internalType: "bytes", name: "permit", type: "bytes" },
735
- ],
736
- internalType: "struct OpenOceanExchange.SwapDescription",
737
- name: "desc",
738
- type: "tuple",
739
- },
740
- {
741
- components: [
742
- { internalType: "uint256", name: "target", type: "uint256" },
743
- { internalType: "uint256", name: "gasLimit", type: "uint256" },
744
- { internalType: "uint256", name: "value", type: "uint256" },
745
- { internalType: "bytes", name: "data", type: "bytes" },
746
- ],
747
- internalType: "struct IOpenOceanCaller.CallDescription[]",
748
- name: "calls",
749
- type: "tuple[]",
750
- },
751
- ],
752
- name: "swap",
753
- outputs: [
754
- { internalType: "uint256", name: "returnAmount", type: "uint256" },
755
- ],
756
- stateMutability: "payable",
757
- type: "function",
758
- },
759
- {
760
- inputs: [{ internalType: "address", name: "newOwner", type: "address" }],
761
- name: "transferOwnership",
762
- outputs: [],
763
- stateMutability: "nonpayable",
764
- type: "function",
765
- },
766
- ];
767
- export const UniswapABI = [
768
- {
769
- inputs: [
770
- {
771
- components: [
772
- {
773
- internalType: "bytes",
774
- name: "path",
775
- type: "bytes",
776
- },
777
- {
778
- internalType: "address",
779
- name: "recipient",
780
- type: "address",
781
- },
782
- {
783
- internalType: "uint256",
784
- name: "deadline",
785
- type: "uint256",
786
- },
787
- {
788
- internalType: "uint256",
789
- name: "amountIn",
790
- type: "uint256",
791
- },
792
- {
793
- internalType: "uint256",
794
- name: "amountOutMinimum",
795
- type: "uint256",
796
- },
797
- ],
798
- internalType: "struct ISwapRouter.ExactInputParams",
799
- name: "params",
800
- type: "tuple",
801
- },
802
- ],
803
- name: "exactInput",
804
- outputs: [
805
- {
806
- internalType: "uint256",
807
- name: "amountOut",
808
- type: "uint256",
809
- },
810
- ],
811
- stateMutability: "payable",
812
- type: "function",
813
- },
814
- {
815
- inputs: [
816
- {
817
- internalType: "bytes[]",
818
- name: "data",
819
- type: "bytes[]",
820
- },
821
- ],
822
- name: "multicall",
823
- outputs: [
824
- {
825
- internalType: "bytes[]",
826
- name: "results",
827
- type: "bytes[]",
828
- },
829
- ],
830
- stateMutability: "payable",
831
- type: "function",
832
- },
833
- {
834
- inputs: [
835
- {
836
- internalType: "uint256",
837
- name: "amountMinimum",
838
- type: "uint256",
839
- },
840
- {
841
- internalType: "address",
842
- name: "recipient",
843
- type: "address",
844
- },
845
- ],
846
- name: "unwrapWETH9",
847
- outputs: [],
848
- stateMutability: "payable",
849
- type: "function",
850
- },
851
- ];
852
- export const KyberswapABI = [
853
- {
854
- inputs: [{ internalType: "address", name: "_WETH", type: "address" }],
855
- stateMutability: "nonpayable",
856
- type: "constructor",
857
- },
858
- {
859
- anonymous: false,
860
- inputs: [
861
- {
862
- indexed: false,
863
- internalType: "bytes",
864
- name: "clientData",
865
- type: "bytes",
866
- },
867
- ],
868
- name: "ClientData",
869
- type: "event",
870
- },
871
- {
872
- anonymous: false,
873
- inputs: [
874
- {
875
- indexed: false,
876
- internalType: "string",
877
- name: "reason",
878
- type: "string",
879
- },
880
- ],
881
- name: "Error",
882
- type: "event",
883
- },
884
- {
885
- anonymous: false,
886
- inputs: [
887
- {
888
- indexed: false,
889
- internalType: "address",
890
- name: "pair",
891
- type: "address",
892
- },
893
- {
894
- indexed: false,
895
- internalType: "uint256",
896
- name: "amountOut",
897
- type: "uint256",
898
- },
899
- {
900
- indexed: false,
901
- internalType: "address",
902
- name: "output",
903
- type: "address",
904
- },
905
- ],
906
- name: "Exchange",
907
- type: "event",
908
- },
909
- {
910
- anonymous: false,
911
- inputs: [
912
- {
913
- indexed: false,
914
- internalType: "address",
915
- name: "token",
916
- type: "address",
917
- },
918
- {
919
- indexed: false,
920
- internalType: "uint256",
921
- name: "totalAmount",
922
- type: "uint256",
923
- },
924
- {
925
- indexed: false,
926
- internalType: "uint256",
927
- name: "totalFee",
928
- type: "uint256",
929
- },
930
- {
931
- indexed: false,
932
- internalType: "address[]",
933
- name: "recipients",
934
- type: "address[]",
935
- },
936
- {
937
- indexed: false,
938
- internalType: "uint256[]",
939
- name: "amounts",
940
- type: "uint256[]",
941
- },
942
- { indexed: false, internalType: "bool", name: "isBps", type: "bool" },
943
- ],
944
- name: "Fee",
945
- type: "event",
946
- },
947
- {
948
- anonymous: false,
949
- inputs: [
950
- {
951
- indexed: true,
952
- internalType: "address",
953
- name: "previousOwner",
954
- type: "address",
955
- },
956
- {
957
- indexed: true,
958
- internalType: "address",
959
- name: "newOwner",
960
- type: "address",
961
- },
962
- ],
963
- name: "OwnershipTransferred",
964
- type: "event",
965
- },
966
- {
967
- anonymous: false,
968
- inputs: [
969
- {
970
- indexed: false,
971
- internalType: "address",
972
- name: "sender",
973
- type: "address",
974
- },
975
- {
976
- indexed: false,
977
- internalType: "contract IERC20",
978
- name: "srcToken",
979
- type: "address",
980
- },
981
- {
982
- indexed: false,
983
- internalType: "contract IERC20",
984
- name: "dstToken",
985
- type: "address",
986
- },
987
- {
988
- indexed: false,
989
- internalType: "address",
990
- name: "dstReceiver",
991
- type: "address",
992
- },
993
- {
994
- indexed: false,
995
- internalType: "uint256",
996
- name: "spentAmount",
997
- type: "uint256",
998
- },
999
- {
1000
- indexed: false,
1001
- internalType: "uint256",
1002
- name: "returnAmount",
1003
- type: "uint256",
1004
- },
1005
- ],
1006
- name: "Swapped",
1007
- type: "event",
1008
- },
1009
- {
1010
- inputs: [],
1011
- name: "WETH",
1012
- outputs: [{ internalType: "address", name: "", type: "address" }],
1013
- stateMutability: "view",
1014
- type: "function",
1015
- },
1016
- {
1017
- inputs: [{ internalType: "address", name: "", type: "address" }],
1018
- name: "isWhitelist",
1019
- outputs: [{ internalType: "bool", name: "", type: "bool" }],
1020
- stateMutability: "view",
1021
- type: "function",
1022
- },
1023
- {
1024
- inputs: [],
1025
- name: "owner",
1026
- outputs: [{ internalType: "address", name: "", type: "address" }],
1027
- stateMutability: "view",
1028
- type: "function",
1029
- },
1030
- {
1031
- inputs: [],
1032
- name: "renounceOwnership",
1033
- outputs: [],
1034
- stateMutability: "nonpayable",
1035
- type: "function",
1036
- },
1037
- {
1038
- inputs: [
1039
- { internalType: "address", name: "token", type: "address" },
1040
- { internalType: "uint256", name: "amount", type: "uint256" },
1041
- ],
1042
- name: "rescueFunds",
1043
- outputs: [],
1044
- stateMutability: "nonpayable",
1045
- type: "function",
1046
- },
1047
- {
1048
- inputs: [
1049
- {
1050
- components: [
1051
- { internalType: "address", name: "callTarget", type: "address" },
1052
- { internalType: "address", name: "approveTarget", type: "address" },
1053
- { internalType: "bytes", name: "targetData", type: "bytes" },
1054
- {
1055
- components: [
1056
- {
1057
- internalType: "contract IERC20",
1058
- name: "srcToken",
1059
- type: "address",
1060
- },
1061
- {
1062
- internalType: "contract IERC20",
1063
- name: "dstToken",
1064
- type: "address",
1065
- },
1066
- {
1067
- internalType: "address[]",
1068
- name: "srcReceivers",
1069
- type: "address[]",
1070
- },
1071
- {
1072
- internalType: "uint256[]",
1073
- name: "srcAmounts",
1074
- type: "uint256[]",
1075
- },
1076
- {
1077
- internalType: "address[]",
1078
- name: "feeReceivers",
1079
- type: "address[]",
1080
- },
1081
- {
1082
- internalType: "uint256[]",
1083
- name: "feeAmounts",
1084
- type: "uint256[]",
1085
- },
1086
- { internalType: "address", name: "dstReceiver", type: "address" },
1087
- { internalType: "uint256", name: "amount", type: "uint256" },
1088
- {
1089
- internalType: "uint256",
1090
- name: "minReturnAmount",
1091
- type: "uint256",
1092
- },
1093
- { internalType: "uint256", name: "flags", type: "uint256" },
1094
- { internalType: "bytes", name: "permit", type: "bytes" },
1095
- ],
1096
- internalType: "struct MetaAggregationRouterV2.SwapDescriptionV2",
1097
- name: "desc",
1098
- type: "tuple",
1099
- },
1100
- { internalType: "bytes", name: "clientData", type: "bytes" },
1101
- ],
1102
- internalType: "struct MetaAggregationRouterV2.SwapExecutionParams",
1103
- name: "execution",
1104
- type: "tuple",
1105
- },
1106
- ],
1107
- name: "swap",
1108
- outputs: [
1109
- { internalType: "uint256", name: "returnAmount", type: "uint256" },
1110
- { internalType: "uint256", name: "gasUsed", type: "uint256" },
1111
- ],
1112
- stateMutability: "payable",
1113
- type: "function",
1114
- },
1115
- {
1116
- inputs: [
1117
- {
1118
- components: [
1119
- { internalType: "address", name: "callTarget", type: "address" },
1120
- { internalType: "address", name: "approveTarget", type: "address" },
1121
- { internalType: "bytes", name: "targetData", type: "bytes" },
1122
- {
1123
- components: [
1124
- {
1125
- internalType: "contract IERC20",
1126
- name: "srcToken",
1127
- type: "address",
1128
- },
1129
- {
1130
- internalType: "contract IERC20",
1131
- name: "dstToken",
1132
- type: "address",
1133
- },
1134
- {
1135
- internalType: "address[]",
1136
- name: "srcReceivers",
1137
- type: "address[]",
1138
- },
1139
- {
1140
- internalType: "uint256[]",
1141
- name: "srcAmounts",
1142
- type: "uint256[]",
1143
- },
1144
- {
1145
- internalType: "address[]",
1146
- name: "feeReceivers",
1147
- type: "address[]",
1148
- },
1149
- {
1150
- internalType: "uint256[]",
1151
- name: "feeAmounts",
1152
- type: "uint256[]",
1153
- },
1154
- { internalType: "address", name: "dstReceiver", type: "address" },
1155
- { internalType: "uint256", name: "amount", type: "uint256" },
1156
- {
1157
- internalType: "uint256",
1158
- name: "minReturnAmount",
1159
- type: "uint256",
1160
- },
1161
- { internalType: "uint256", name: "flags", type: "uint256" },
1162
- { internalType: "bytes", name: "permit", type: "bytes" },
1163
- ],
1164
- internalType: "struct MetaAggregationRouterV2.SwapDescriptionV2",
1165
- name: "desc",
1166
- type: "tuple",
1167
- },
1168
- { internalType: "bytes", name: "clientData", type: "bytes" },
1169
- ],
1170
- internalType: "struct MetaAggregationRouterV2.SwapExecutionParams",
1171
- name: "execution",
1172
- type: "tuple",
1173
- },
1174
- ],
1175
- name: "swapGeneric",
1176
- outputs: [
1177
- { internalType: "uint256", name: "returnAmount", type: "uint256" },
1178
- { internalType: "uint256", name: "gasUsed", type: "uint256" },
1179
- ],
1180
- stateMutability: "payable",
1181
- type: "function",
1182
- },
1183
- {
1184
- inputs: [
1185
- {
1186
- internalType: "contract IAggregationExecutor",
1187
- name: "caller",
1188
- type: "address",
1189
- },
1190
- {
1191
- components: [
1192
- {
1193
- internalType: "contract IERC20",
1194
- name: "srcToken",
1195
- type: "address",
1196
- },
1197
- {
1198
- internalType: "contract IERC20",
1199
- name: "dstToken",
1200
- type: "address",
1201
- },
1202
- {
1203
- internalType: "address[]",
1204
- name: "srcReceivers",
1205
- type: "address[]",
1206
- },
1207
- { internalType: "uint256[]", name: "srcAmounts", type: "uint256[]" },
1208
- {
1209
- internalType: "address[]",
1210
- name: "feeReceivers",
1211
- type: "address[]",
1212
- },
1213
- { internalType: "uint256[]", name: "feeAmounts", type: "uint256[]" },
1214
- { internalType: "address", name: "dstReceiver", type: "address" },
1215
- { internalType: "uint256", name: "amount", type: "uint256" },
1216
- { internalType: "uint256", name: "minReturnAmount", type: "uint256" },
1217
- { internalType: "uint256", name: "flags", type: "uint256" },
1218
- { internalType: "bytes", name: "permit", type: "bytes" },
1219
- ],
1220
- internalType: "struct MetaAggregationRouterV2.SwapDescriptionV2",
1221
- name: "desc",
1222
- type: "tuple",
1223
- },
1224
- { internalType: "bytes", name: "executorData", type: "bytes" },
1225
- { internalType: "bytes", name: "clientData", type: "bytes" },
1226
- ],
1227
- name: "swapSimpleMode",
1228
- outputs: [
1229
- { internalType: "uint256", name: "returnAmount", type: "uint256" },
1230
- { internalType: "uint256", name: "gasUsed", type: "uint256" },
1231
- ],
1232
- stateMutability: "nonpayable",
1233
- type: "function",
1234
- },
1235
- {
1236
- inputs: [{ internalType: "address", name: "newOwner", type: "address" }],
1237
- name: "transferOwnership",
1238
- outputs: [],
1239
- stateMutability: "nonpayable",
1240
- type: "function",
1241
- },
1242
- {
1243
- inputs: [
1244
- { internalType: "address[]", name: "addr", type: "address[]" },
1245
- { internalType: "bool[]", name: "value", type: "bool[]" },
1246
- ],
1247
- name: "updateWhitelist",
1248
- outputs: [],
1249
- stateMutability: "nonpayable",
1250
- type: "function",
1251
- },
1252
- { stateMutability: "payable", type: "receive" },
1253
- ];
1254
- export const ParaSwapV6ABI = [
1255
- {
1256
- inputs: [
1257
- { internalType: "address", name: "executor", type: "address" },
1258
- {
1259
- components: [
1260
- {
1261
- internalType: "contract IERC20",
1262
- name: "srcToken",
1263
- type: "address",
1264
- },
1265
- {
1266
- internalType: "contract IERC20",
1267
- name: "destToken",
1268
- type: "address",
1269
- },
1270
- { internalType: "uint256", name: "fromAmount", type: "uint256" },
1271
- { internalType: "uint256", name: "toAmount", type: "uint256" },
1272
- { internalType: "uint256", name: "quotedAmount", type: "uint256" },
1273
- { internalType: "bytes32", name: "metadata", type: "bytes32" },
1274
- {
1275
- internalType: "address payable",
1276
- name: "beneficiary",
1277
- type: "address",
1278
- },
1279
- ],
1280
- internalType: "struct GenericData",
1281
- name: "swapData",
1282
- type: "tuple",
1283
- },
1284
- { internalType: "uint256", name: "partnerAndFee", type: "uint256" },
1285
- { internalType: "bytes", name: "permit", type: "bytes" },
1286
- { internalType: "bytes", name: "executorData", type: "bytes" },
1287
- ],
1288
- name: "swapExactAmountIn",
1289
- outputs: [
1290
- { internalType: "uint256", name: "receivedAmount", type: "uint256" },
1291
- { internalType: "uint256", name: "paraswapShare", type: "uint256" },
1292
- { internalType: "uint256", name: "partnerShare", type: "uint256" },
1293
- ],
1294
- stateMutability: "payable",
1295
- type: "function",
1296
- },
1297
- {
1298
- inputs: [
1299
- {
1300
- components: [
1301
- { internalType: "uint256", name: "fromAmount", type: "uint256" },
1302
- { internalType: "uint256", name: "toAmount", type: "uint256" },
1303
- { internalType: "uint256", name: "quotedAmount", type: "uint256" },
1304
- { internalType: "bytes32", name: "metadata", type: "bytes32" },
1305
- {
1306
- internalType: "uint256",
1307
- name: "beneficiaryAndApproveFlag",
1308
- type: "uint256",
1309
- },
1310
- ],
1311
- internalType: "struct BalancerV2Data",
1312
- name: "balancerData",
1313
- type: "tuple",
1314
- },
1315
- { internalType: "uint256", name: "partnerAndFee", type: "uint256" },
1316
- { internalType: "bytes", name: "permit", type: "bytes" },
1317
- { internalType: "bytes", name: "data", type: "bytes" },
1318
- ],
1319
- name: "swapExactAmountInOnBalancerV2",
1320
- outputs: [
1321
- { internalType: "uint256", name: "receivedAmount", type: "uint256" },
1322
- { internalType: "uint256", name: "paraswapShare", type: "uint256" },
1323
- { internalType: "uint256", name: "partnerShare", type: "uint256" },
1324
- ],
1325
- stateMutability: "payable",
1326
- type: "function",
1327
- },
1328
- {
1329
- inputs: [
1330
- {
1331
- components: [
1332
- { internalType: "uint256", name: "curveData", type: "uint256" },
1333
- { internalType: "uint256", name: "curveAssets", type: "uint256" },
1334
- {
1335
- internalType: "contract IERC20",
1336
- name: "srcToken",
1337
- type: "address",
1338
- },
1339
- {
1340
- internalType: "contract IERC20",
1341
- name: "destToken",
1342
- type: "address",
1343
- },
1344
- { internalType: "uint256", name: "fromAmount", type: "uint256" },
1345
- { internalType: "uint256", name: "toAmount", type: "uint256" },
1346
- { internalType: "uint256", name: "quotedAmount", type: "uint256" },
1347
- { internalType: "bytes32", name: "metadata", type: "bytes32" },
1348
- {
1349
- internalType: "address payable",
1350
- name: "beneficiary",
1351
- type: "address",
1352
- },
1353
- ],
1354
- internalType: "struct CurveV1Data",
1355
- name: "curveV1Data",
1356
- type: "tuple",
1357
- },
1358
- { internalType: "uint256", name: "partnerAndFee", type: "uint256" },
1359
- { internalType: "bytes", name: "permit", type: "bytes" },
1360
- ],
1361
- name: "swapExactAmountInOnCurveV1",
1362
- outputs: [
1363
- { internalType: "uint256", name: "receivedAmount", type: "uint256" },
1364
- { internalType: "uint256", name: "paraswapShare", type: "uint256" },
1365
- { internalType: "uint256", name: "partnerShare", type: "uint256" },
1366
- ],
1367
- stateMutability: "payable",
1368
- type: "function",
1369
- },
1370
- {
1371
- inputs: [
1372
- {
1373
- components: [
1374
- { internalType: "uint256", name: "curveData", type: "uint256" },
1375
- { internalType: "uint256", name: "i", type: "uint256" },
1376
- { internalType: "uint256", name: "j", type: "uint256" },
1377
- { internalType: "address", name: "poolAddress", type: "address" },
1378
- {
1379
- internalType: "contract IERC20",
1380
- name: "srcToken",
1381
- type: "address",
1382
- },
1383
- {
1384
- internalType: "contract IERC20",
1385
- name: "destToken",
1386
- type: "address",
1387
- },
1388
- { internalType: "uint256", name: "fromAmount", type: "uint256" },
1389
- { internalType: "uint256", name: "toAmount", type: "uint256" },
1390
- { internalType: "uint256", name: "quotedAmount", type: "uint256" },
1391
- { internalType: "bytes32", name: "metadata", type: "bytes32" },
1392
- {
1393
- internalType: "address payable",
1394
- name: "beneficiary",
1395
- type: "address",
1396
- },
1397
- ],
1398
- internalType: "struct CurveV2Data",
1399
- name: "curveV2Data",
1400
- type: "tuple",
1401
- },
1402
- { internalType: "uint256", name: "partnerAndFee", type: "uint256" },
1403
- { internalType: "bytes", name: "permit", type: "bytes" },
1404
- ],
1405
- name: "swapExactAmountInOnCurveV2",
1406
- outputs: [
1407
- { internalType: "uint256", name: "receivedAmount", type: "uint256" },
1408
- { internalType: "uint256", name: "paraswapShare", type: "uint256" },
1409
- { internalType: "uint256", name: "partnerShare", type: "uint256" },
1410
- ],
1411
- stateMutability: "payable",
1412
- type: "function",
1413
- },
1414
- {
1415
- inputs: [
1416
- {
1417
- components: [
1418
- {
1419
- internalType: "contract IERC20",
1420
- name: "srcToken",
1421
- type: "address",
1422
- },
1423
- {
1424
- internalType: "contract IERC20",
1425
- name: "destToken",
1426
- type: "address",
1427
- },
1428
- { internalType: "uint256", name: "fromAmount", type: "uint256" },
1429
- { internalType: "uint256", name: "toAmount", type: "uint256" },
1430
- { internalType: "uint256", name: "quotedAmount", type: "uint256" },
1431
- { internalType: "bytes32", name: "metadata", type: "bytes32" },
1432
- {
1433
- internalType: "address payable",
1434
- name: "beneficiary",
1435
- type: "address",
1436
- },
1437
- { internalType: "bytes", name: "pools", type: "bytes" },
1438
- ],
1439
- internalType: "struct UniswapV2Data",
1440
- name: "uniData",
1441
- type: "tuple",
1442
- },
1443
- { internalType: "uint256", name: "partnerAndFee", type: "uint256" },
1444
- { internalType: "bytes", name: "permit", type: "bytes" },
1445
- ],
1446
- name: "swapExactAmountInOnUniswapV2",
1447
- outputs: [
1448
- { internalType: "uint256", name: "receivedAmount", type: "uint256" },
1449
- { internalType: "uint256", name: "paraswapShare", type: "uint256" },
1450
- { internalType: "uint256", name: "partnerShare", type: "uint256" },
1451
- ],
1452
- stateMutability: "payable",
1453
- type: "function",
1454
- },
1455
- {
1456
- inputs: [
1457
- {
1458
- components: [
1459
- {
1460
- internalType: "contract IERC20",
1461
- name: "srcToken",
1462
- type: "address",
1463
- },
1464
- {
1465
- internalType: "contract IERC20",
1466
- name: "destToken",
1467
- type: "address",
1468
- },
1469
- { internalType: "uint256", name: "fromAmount", type: "uint256" },
1470
- { internalType: "uint256", name: "toAmount", type: "uint256" },
1471
- { internalType: "uint256", name: "quotedAmount", type: "uint256" },
1472
- { internalType: "bytes32", name: "metadata", type: "bytes32" },
1473
- {
1474
- internalType: "address payable",
1475
- name: "beneficiary",
1476
- type: "address",
1477
- },
1478
- { internalType: "bytes", name: "pools", type: "bytes" },
1479
- ],
1480
- internalType: "struct UniswapV3Data",
1481
- name: "uniData",
1482
- type: "tuple",
1483
- },
1484
- { internalType: "uint256", name: "partnerAndFee", type: "uint256" },
1485
- { internalType: "bytes", name: "permit", type: "bytes" },
1486
- ],
1487
- name: "swapExactAmountInOnUniswapV3",
1488
- outputs: [
1489
- { internalType: "uint256", name: "receivedAmount", type: "uint256" },
1490
- { internalType: "uint256", name: "paraswapShare", type: "uint256" },
1491
- { internalType: "uint256", name: "partnerShare", type: "uint256" },
1492
- ],
1493
- stateMutability: "payable",
1494
- type: "function",
1495
- },
1496
- {
1497
- inputs: [
1498
- { internalType: "address", name: "executor", type: "address" },
1499
- {
1500
- components: [
1501
- {
1502
- internalType: "contract IERC20",
1503
- name: "srcToken",
1504
- type: "address",
1505
- },
1506
- {
1507
- internalType: "contract IERC20",
1508
- name: "destToken",
1509
- type: "address",
1510
- },
1511
- { internalType: "uint256", name: "fromAmount", type: "uint256" },
1512
- { internalType: "uint256", name: "toAmount", type: "uint256" },
1513
- { internalType: "uint256", name: "quotedAmount", type: "uint256" },
1514
- { internalType: "bytes32", name: "metadata", type: "bytes32" },
1515
- {
1516
- internalType: "address payable",
1517
- name: "beneficiary",
1518
- type: "address",
1519
- },
1520
- ],
1521
- internalType: "struct GenericData",
1522
- name: "swapData",
1523
- type: "tuple",
1524
- },
1525
- { internalType: "uint256", name: "partnerAndFee", type: "uint256" },
1526
- { internalType: "bytes", name: "permit", type: "bytes" },
1527
- { internalType: "bytes", name: "executorData", type: "bytes" },
1528
- ],
1529
- name: "swapExactAmountOut",
1530
- outputs: [
1531
- { internalType: "uint256", name: "spentAmount", type: "uint256" },
1532
- { internalType: "uint256", name: "receivedAmount", type: "uint256" },
1533
- { internalType: "uint256", name: "paraswapShare", type: "uint256" },
1534
- { internalType: "uint256", name: "partnerShare", type: "uint256" },
1535
- ],
1536
- stateMutability: "payable",
1537
- type: "function",
1538
- },
1539
- {
1540
- inputs: [
1541
- {
1542
- components: [
1543
- { internalType: "uint256", name: "fromAmount", type: "uint256" },
1544
- { internalType: "uint256", name: "toAmount", type: "uint256" },
1545
- { internalType: "uint256", name: "quotedAmount", type: "uint256" },
1546
- { internalType: "bytes32", name: "metadata", type: "bytes32" },
1547
- {
1548
- internalType: "uint256",
1549
- name: "beneficiaryAndApproveFlag",
1550
- type: "uint256",
1551
- },
1552
- ],
1553
- internalType: "struct BalancerV2Data",
1554
- name: "balancerData",
1555
- type: "tuple",
1556
- },
1557
- { internalType: "uint256", name: "partnerAndFee", type: "uint256" },
1558
- { internalType: "bytes", name: "permit", type: "bytes" },
1559
- { internalType: "bytes", name: "data", type: "bytes" },
1560
- ],
1561
- name: "swapExactAmountOutOnBalancerV2",
1562
- outputs: [
1563
- { internalType: "uint256", name: "spentAmount", type: "uint256" },
1564
- { internalType: "uint256", name: "receivedAmount", type: "uint256" },
1565
- { internalType: "uint256", name: "paraswapShare", type: "uint256" },
1566
- { internalType: "uint256", name: "partnerShare", type: "uint256" },
1567
- ],
1568
- stateMutability: "payable",
1569
- type: "function",
1570
- },
1571
- {
1572
- inputs: [
1573
- {
1574
- components: [
1575
- {
1576
- internalType: "contract IERC20",
1577
- name: "srcToken",
1578
- type: "address",
1579
- },
1580
- {
1581
- internalType: "contract IERC20",
1582
- name: "destToken",
1583
- type: "address",
1584
- },
1585
- { internalType: "uint256", name: "fromAmount", type: "uint256" },
1586
- { internalType: "uint256", name: "toAmount", type: "uint256" },
1587
- { internalType: "uint256", name: "quotedAmount", type: "uint256" },
1588
- { internalType: "bytes32", name: "metadata", type: "bytes32" },
1589
- {
1590
- internalType: "address payable",
1591
- name: "beneficiary",
1592
- type: "address",
1593
- },
1594
- { internalType: "bytes", name: "pools", type: "bytes" },
1595
- ],
1596
- internalType: "struct UniswapV2Data",
1597
- name: "uniData",
1598
- type: "tuple",
1599
- },
1600
- { internalType: "uint256", name: "partnerAndFee", type: "uint256" },
1601
- { internalType: "bytes", name: "permit", type: "bytes" },
1602
- ],
1603
- name: "swapExactAmountOutOnUniswapV2",
1604
- outputs: [
1605
- { internalType: "uint256", name: "spentAmount", type: "uint256" },
1606
- { internalType: "uint256", name: "receivedAmount", type: "uint256" },
1607
- { internalType: "uint256", name: "paraswapShare", type: "uint256" },
1608
- { internalType: "uint256", name: "partnerShare", type: "uint256" },
1609
- ],
1610
- stateMutability: "payable",
1611
- type: "function",
1612
- },
1613
- {
1614
- inputs: [
1615
- {
1616
- components: [
1617
- {
1618
- internalType: "contract IERC20",
1619
- name: "srcToken",
1620
- type: "address",
1621
- },
1622
- {
1623
- internalType: "contract IERC20",
1624
- name: "destToken",
1625
- type: "address",
1626
- },
1627
- { internalType: "uint256", name: "fromAmount", type: "uint256" },
1628
- { internalType: "uint256", name: "toAmount", type: "uint256" },
1629
- { internalType: "uint256", name: "quotedAmount", type: "uint256" },
1630
- { internalType: "bytes32", name: "metadata", type: "bytes32" },
1631
- {
1632
- internalType: "address payable",
1633
- name: "beneficiary",
1634
- type: "address",
1635
- },
1636
- { internalType: "bytes", name: "pools", type: "bytes" },
1637
- ],
1638
- internalType: "struct UniswapV3Data",
1639
- name: "uniData",
1640
- type: "tuple",
1641
- },
1642
- { internalType: "uint256", name: "partnerAndFee", type: "uint256" },
1643
- { internalType: "bytes", name: "permit", type: "bytes" },
1644
- ],
1645
- name: "swapExactAmountOutOnUniswapV3",
1646
- outputs: [
1647
- { internalType: "uint256", name: "spentAmount", type: "uint256" },
1648
- { internalType: "uint256", name: "receivedAmount", type: "uint256" },
1649
- { internalType: "uint256", name: "paraswapShare", type: "uint256" },
1650
- { internalType: "uint256", name: "partnerShare", type: "uint256" },
1651
- ],
1652
- stateMutability: "payable",
1653
- type: "function",
1654
- },
1655
- {
1656
- inputs: [
1657
- {
1658
- components: [
1659
- { internalType: "uint256", name: "fromAmount", type: "uint256" },
1660
- { internalType: "uint256", name: "toAmount", type: "uint256" },
1661
- {
1662
- internalType: "uint8",
1663
- name: "wrapApproveDirection",
1664
- type: "uint8",
1665
- },
1666
- { internalType: "bytes32", name: "metadata", type: "bytes32" },
1667
- {
1668
- internalType: "address payable",
1669
- name: "beneficiary",
1670
- type: "address",
1671
- },
1672
- ],
1673
- internalType: "struct AugustusRFQData",
1674
- name: "data",
1675
- type: "tuple",
1676
- },
1677
- {
1678
- components: [
1679
- {
1680
- components: [
1681
- {
1682
- internalType: "uint256",
1683
- name: "nonceAndMeta",
1684
- type: "uint256",
1685
- },
1686
- { internalType: "uint128", name: "expiry", type: "uint128" },
1687
- { internalType: "address", name: "makerAsset", type: "address" },
1688
- { internalType: "address", name: "takerAsset", type: "address" },
1689
- { internalType: "address", name: "maker", type: "address" },
1690
- { internalType: "address", name: "taker", type: "address" },
1691
- { internalType: "uint256", name: "makerAmount", type: "uint256" },
1692
- { internalType: "uint256", name: "takerAmount", type: "uint256" },
1693
- ],
1694
- internalType: "struct Order",
1695
- name: "order",
1696
- type: "tuple",
1697
- },
1698
- { internalType: "bytes", name: "signature", type: "bytes" },
1699
- {
1700
- internalType: "uint256",
1701
- name: "takerTokenFillAmount",
1702
- type: "uint256",
1703
- },
1704
- { internalType: "bytes", name: "permitTakerAsset", type: "bytes" },
1705
- { internalType: "bytes", name: "permitMakerAsset", type: "bytes" },
1706
- ],
1707
- internalType: "struct OrderInfo[]",
1708
- name: "orders",
1709
- type: "tuple[]",
1710
- },
1711
- { internalType: "bytes", name: "permit", type: "bytes" },
1712
- ],
1713
- name: "swapOnAugustusRFQTryBatchFill",
1714
- outputs: [
1715
- { internalType: "uint256", name: "spentAmount", type: "uint256" },
1716
- { internalType: "uint256", name: "receivedAmount", type: "uint256" },
1717
- ],
1718
- stateMutability: "payable",
1719
- type: "function",
1720
- },
1721
- {
1722
- inputs: [
1723
- { internalType: "int256", name: "amount0Delta", type: "int256" },
1724
- { internalType: "int256", name: "amount1Delta", type: "int256" },
1725
- { internalType: "bytes", name: "data", type: "bytes" },
1726
- ],
1727
- name: "uniswapV3SwapCallback",
1728
- outputs: [],
1729
- stateMutability: "nonpayable",
1730
- type: "function",
1731
- },
1732
- { stateMutability: "payable", type: "receive" },
1733
- ];
1734
- export const ZeroXABIV2 = [
1735
- { inputs: [], stateMutability: "nonpayable", type: "constructor" },
1736
- { inputs: [], name: "ConfusedDeputy", type: "error" },
1737
- { stateMutability: "payable", type: "fallback" },
1738
- ];
1
+ export const OneInchABI = [
2
+ {
3
+ inputs: [
4
+ {
5
+ internalType: "contract IAggregationExecutor",
6
+ name: "executor",
7
+ type: "address",
8
+ },
9
+ {
10
+ components: [
11
+ {
12
+ internalType: "contract IERC20",
13
+ name: "srcToken",
14
+ type: "address",
15
+ },
16
+ {
17
+ internalType: "contract IERC20",
18
+ name: "dstToken",
19
+ type: "address",
20
+ },
21
+ {
22
+ internalType: "address payable",
23
+ name: "srcReceiver",
24
+ type: "address",
25
+ },
26
+ {
27
+ internalType: "address payable",
28
+ name: "dstReceiver",
29
+ type: "address",
30
+ },
31
+ { internalType: "uint256", name: "amount", type: "uint256" },
32
+ { internalType: "uint256", name: "minReturnAmount", type: "uint256" },
33
+ { internalType: "uint256", name: "flags", type: "uint256" },
34
+ ],
35
+ internalType: "struct GenericRouter.SwapDescription",
36
+ name: "desc",
37
+ type: "tuple",
38
+ },
39
+ { internalType: "bytes", name: "permit", type: "bytes" },
40
+ { internalType: "bytes", name: "data", type: "bytes" },
41
+ ],
42
+ name: "swap",
43
+ outputs: [
44
+ { internalType: "uint256", name: "returnAmount", type: "uint256" },
45
+ { internalType: "uint256", name: "spentAmount", type: "uint256" },
46
+ ],
47
+ stateMutability: "payable",
48
+ type: "function",
49
+ },
50
+ {
51
+ inputs: [
52
+ { internalType: "uint256", name: "amount", type: "uint256" },
53
+ { internalType: "uint256", name: "minReturn", type: "uint256" },
54
+ { internalType: "uint256[]", name: "pools", type: "uint256[]" },
55
+ ],
56
+ name: "uniswapV3Swap",
57
+ outputs: [
58
+ { internalType: "uint256", name: "returnAmount", type: "uint256" },
59
+ ],
60
+ stateMutability: "payable",
61
+ type: "function",
62
+ },
63
+ {
64
+ inputs: [
65
+ { internalType: "address payable", name: "recipient", type: "address" },
66
+ { internalType: "uint256", name: "amount", type: "uint256" },
67
+ { internalType: "uint256", name: "minReturn", type: "uint256" },
68
+ { internalType: "uint256[]", name: "pools", type: "uint256[]" },
69
+ ],
70
+ name: "uniswapV3SwapTo",
71
+ outputs: [
72
+ { internalType: "uint256", name: "returnAmount", type: "uint256" },
73
+ ],
74
+ stateMutability: "payable",
75
+ type: "function",
76
+ },
77
+ {
78
+ inputs: [
79
+ { internalType: "contract IERC20", name: "srcToken", type: "address" },
80
+ { internalType: "uint256", name: "amount", type: "uint256" },
81
+ { internalType: "uint256", name: "minReturn", type: "uint256" },
82
+ { internalType: "uint256[]", name: "pools", type: "uint256[]" },
83
+ ],
84
+ name: "unoswap",
85
+ outputs: [
86
+ { internalType: "uint256", name: "returnAmount", type: "uint256" },
87
+ ],
88
+ stateMutability: "payable",
89
+ type: "function",
90
+ },
91
+ {
92
+ inputs: [
93
+ { internalType: "address payable", name: "recipient", type: "address" },
94
+ { internalType: "contract IERC20", name: "srcToken", type: "address" },
95
+ { internalType: "uint256", name: "amount", type: "uint256" },
96
+ { internalType: "uint256", name: "minReturn", type: "uint256" },
97
+ { internalType: "uint256[]", name: "pools", type: "uint256[]" },
98
+ ],
99
+ name: "unoswapTo",
100
+ outputs: [
101
+ { internalType: "uint256", name: "returnAmount", type: "uint256" },
102
+ ],
103
+ stateMutability: "payable",
104
+ type: "function",
105
+ },
106
+ ];
107
+ export const ZeroXABI = [
108
+ {
109
+ inputs: [
110
+ {
111
+ name: "inputToken",
112
+ type: "address",
113
+ },
114
+ {
115
+ name: "outputToken",
116
+ type: "address",
117
+ },
118
+ {
119
+ name: "inputTokenAmount",
120
+ type: "uint256",
121
+ },
122
+ {
123
+ name: "minOutputTokenAmount",
124
+ type: "uint256",
125
+ },
126
+ {
127
+ name: "transformations",
128
+ type: "(uint32,bytes)[]",
129
+ components: [
130
+ {
131
+ name: "deploymentNonce",
132
+ type: "uint32",
133
+ },
134
+ {
135
+ name: "data",
136
+ type: "bytes",
137
+ },
138
+ ],
139
+ },
140
+ ],
141
+ name: "transformERC20",
142
+ outputs: [
143
+ {
144
+ name: "outputTokenAmount",
145
+ type: "uint256",
146
+ },
147
+ ],
148
+ stateMutability: "payable",
149
+ type: "function",
150
+ },
151
+ ];
152
+ export const ParaSwapABI = [
153
+ {
154
+ inputs: [
155
+ {
156
+ components: [
157
+ {
158
+ internalType: "address",
159
+ name: "fromToken",
160
+ type: "address",
161
+ },
162
+ {
163
+ internalType: "uint256",
164
+ name: "fromAmount",
165
+ type: "uint256",
166
+ },
167
+ {
168
+ internalType: "uint256",
169
+ name: "toAmount",
170
+ type: "uint256",
171
+ },
172
+ {
173
+ internalType: "uint256",
174
+ name: "expectedAmount",
175
+ type: "uint256",
176
+ },
177
+ {
178
+ internalType: "address payable",
179
+ name: "beneficiary",
180
+ type: "address",
181
+ },
182
+ {
183
+ components: [
184
+ {
185
+ internalType: "uint256",
186
+ name: "fromAmountPercent",
187
+ type: "uint256",
188
+ },
189
+ {
190
+ components: [
191
+ {
192
+ internalType: "address",
193
+ name: "to",
194
+ type: "address",
195
+ },
196
+ {
197
+ internalType: "uint256",
198
+ name: "totalNetworkFee",
199
+ type: "uint256",
200
+ },
201
+ {
202
+ components: [
203
+ {
204
+ internalType: "address payable",
205
+ name: "adapter",
206
+ type: "address",
207
+ },
208
+ {
209
+ internalType: "uint256",
210
+ name: "percent",
211
+ type: "uint256",
212
+ },
213
+ {
214
+ internalType: "uint256",
215
+ name: "networkFee",
216
+ type: "uint256",
217
+ },
218
+ {
219
+ components: [
220
+ {
221
+ internalType: "uint256",
222
+ name: "index",
223
+ type: "uint256",
224
+ },
225
+ {
226
+ internalType: "address",
227
+ name: "targetExchange",
228
+ type: "address",
229
+ },
230
+ {
231
+ internalType: "uint256",
232
+ name: "percent",
233
+ type: "uint256",
234
+ },
235
+ {
236
+ internalType: "bytes",
237
+ name: "payload",
238
+ type: "bytes",
239
+ },
240
+ {
241
+ internalType: "uint256",
242
+ name: "networkFee",
243
+ type: "uint256",
244
+ },
245
+ ],
246
+ internalType: "struct Utils.Route[]",
247
+ name: "route",
248
+ type: "tuple[]",
249
+ },
250
+ ],
251
+ internalType: "struct Utils.Adapter[]",
252
+ name: "adapters",
253
+ type: "tuple[]",
254
+ },
255
+ ],
256
+ internalType: "struct Utils.Path[]",
257
+ name: "path",
258
+ type: "tuple[]",
259
+ },
260
+ ],
261
+ internalType: "struct Utils.MegaSwapPath[]",
262
+ name: "path",
263
+ type: "tuple[]",
264
+ },
265
+ {
266
+ internalType: "address payable",
267
+ name: "partner",
268
+ type: "address",
269
+ },
270
+ {
271
+ internalType: "uint256",
272
+ name: "feePercent",
273
+ type: "uint256",
274
+ },
275
+ {
276
+ internalType: "bytes",
277
+ name: "permit",
278
+ type: "bytes",
279
+ },
280
+ {
281
+ internalType: "uint256",
282
+ name: "deadline",
283
+ type: "uint256",
284
+ },
285
+ {
286
+ internalType: "bytes16",
287
+ name: "uuid",
288
+ type: "bytes16",
289
+ },
290
+ ],
291
+ internalType: "struct Utils.MegaSwapSellData",
292
+ name: "data",
293
+ type: "tuple",
294
+ },
295
+ ],
296
+ name: "megaSwap",
297
+ outputs: [
298
+ {
299
+ internalType: "uint256",
300
+ name: "",
301
+ type: "uint256",
302
+ },
303
+ ],
304
+ stateMutability: "payable",
305
+ type: "function",
306
+ },
307
+ {
308
+ inputs: [
309
+ {
310
+ components: [
311
+ {
312
+ internalType: "address",
313
+ name: "fromToken",
314
+ type: "address",
315
+ },
316
+ {
317
+ internalType: "uint256",
318
+ name: "fromAmount",
319
+ type: "uint256",
320
+ },
321
+ {
322
+ internalType: "uint256",
323
+ name: "toAmount",
324
+ type: "uint256",
325
+ },
326
+ {
327
+ internalType: "uint256",
328
+ name: "expectedAmount",
329
+ type: "uint256",
330
+ },
331
+ {
332
+ internalType: "address payable",
333
+ name: "beneficiary",
334
+ type: "address",
335
+ },
336
+ {
337
+ components: [
338
+ {
339
+ internalType: "address",
340
+ name: "to",
341
+ type: "address",
342
+ },
343
+ {
344
+ internalType: "uint256",
345
+ name: "totalNetworkFee",
346
+ type: "uint256",
347
+ },
348
+ {
349
+ components: [
350
+ {
351
+ internalType: "address payable",
352
+ name: "adapter",
353
+ type: "address",
354
+ },
355
+ {
356
+ internalType: "uint256",
357
+ name: "percent",
358
+ type: "uint256",
359
+ },
360
+ {
361
+ internalType: "uint256",
362
+ name: "networkFee",
363
+ type: "uint256",
364
+ },
365
+ {
366
+ components: [
367
+ {
368
+ internalType: "uint256",
369
+ name: "index",
370
+ type: "uint256",
371
+ },
372
+ {
373
+ internalType: "address",
374
+ name: "targetExchange",
375
+ type: "address",
376
+ },
377
+ {
378
+ internalType: "uint256",
379
+ name: "percent",
380
+ type: "uint256",
381
+ },
382
+ {
383
+ internalType: "bytes",
384
+ name: "payload",
385
+ type: "bytes",
386
+ },
387
+ {
388
+ internalType: "uint256",
389
+ name: "networkFee",
390
+ type: "uint256",
391
+ },
392
+ ],
393
+ internalType: "struct Utils.Route[]",
394
+ name: "route",
395
+ type: "tuple[]",
396
+ },
397
+ ],
398
+ internalType: "struct Utils.Adapter[]",
399
+ name: "adapters",
400
+ type: "tuple[]",
401
+ },
402
+ ],
403
+ internalType: "struct Utils.Path[]",
404
+ name: "path",
405
+ type: "tuple[]",
406
+ },
407
+ {
408
+ internalType: "address payable",
409
+ name: "partner",
410
+ type: "address",
411
+ },
412
+ {
413
+ internalType: "uint256",
414
+ name: "feePercent",
415
+ type: "uint256",
416
+ },
417
+ {
418
+ internalType: "bytes",
419
+ name: "permit",
420
+ type: "bytes",
421
+ },
422
+ {
423
+ internalType: "uint256",
424
+ name: "deadline",
425
+ type: "uint256",
426
+ },
427
+ {
428
+ internalType: "bytes16",
429
+ name: "uuid",
430
+ type: "bytes16",
431
+ },
432
+ ],
433
+ internalType: "struct Utils.SellData",
434
+ name: "data",
435
+ type: "tuple",
436
+ },
437
+ ],
438
+ name: "multiSwap",
439
+ outputs: [
440
+ {
441
+ internalType: "uint256",
442
+ name: "",
443
+ type: "uint256",
444
+ },
445
+ ],
446
+ stateMutability: "payable",
447
+ type: "function",
448
+ },
449
+ {
450
+ inputs: [
451
+ {
452
+ components: [
453
+ {
454
+ internalType: "address",
455
+ name: "fromToken",
456
+ type: "address",
457
+ },
458
+ {
459
+ internalType: "address",
460
+ name: "toToken",
461
+ type: "address",
462
+ },
463
+ {
464
+ internalType: "uint256",
465
+ name: "fromAmount",
466
+ type: "uint256",
467
+ },
468
+ {
469
+ internalType: "uint256",
470
+ name: "toAmount",
471
+ type: "uint256",
472
+ },
473
+ {
474
+ internalType: "uint256",
475
+ name: "expectedAmount",
476
+ type: "uint256",
477
+ },
478
+ {
479
+ internalType: "address[]",
480
+ name: "callees",
481
+ type: "address[]",
482
+ },
483
+ {
484
+ internalType: "bytes",
485
+ name: "exchangeData",
486
+ type: "bytes",
487
+ },
488
+ {
489
+ internalType: "uint256[]",
490
+ name: "startIndexes",
491
+ type: "uint256[]",
492
+ },
493
+ {
494
+ internalType: "uint256[]",
495
+ name: "values",
496
+ type: "uint256[]",
497
+ },
498
+ {
499
+ internalType: "address payable",
500
+ name: "beneficiary",
501
+ type: "address",
502
+ },
503
+ {
504
+ internalType: "address payable",
505
+ name: "partner",
506
+ type: "address",
507
+ },
508
+ {
509
+ internalType: "uint256",
510
+ name: "feePercent",
511
+ type: "uint256",
512
+ },
513
+ {
514
+ internalType: "bytes",
515
+ name: "permit",
516
+ type: "bytes",
517
+ },
518
+ {
519
+ internalType: "uint256",
520
+ name: "deadline",
521
+ type: "uint256",
522
+ },
523
+ {
524
+ internalType: "bytes16",
525
+ name: "uuid",
526
+ type: "bytes16",
527
+ },
528
+ ],
529
+ internalType: "struct Utils.SimpleData",
530
+ name: "data",
531
+ type: "tuple",
532
+ },
533
+ ],
534
+ name: "simpleSwap",
535
+ outputs: [
536
+ {
537
+ internalType: "uint256",
538
+ name: "receivedAmount",
539
+ type: "uint256",
540
+ },
541
+ ],
542
+ stateMutability: "payable",
543
+ type: "function",
544
+ },
545
+ ];
546
+ export const OpenOceanABI = [
547
+ {
548
+ anonymous: false,
549
+ inputs: [
550
+ {
551
+ indexed: true,
552
+ internalType: "address",
553
+ name: "previousOwner",
554
+ type: "address",
555
+ },
556
+ {
557
+ indexed: true,
558
+ internalType: "address",
559
+ name: "newOwner",
560
+ type: "address",
561
+ },
562
+ ],
563
+ name: "OwnershipTransferred",
564
+ type: "event",
565
+ },
566
+ {
567
+ anonymous: false,
568
+ inputs: [
569
+ {
570
+ indexed: false,
571
+ internalType: "address",
572
+ name: "account",
573
+ type: "address",
574
+ },
575
+ ],
576
+ name: "Paused",
577
+ type: "event",
578
+ },
579
+ {
580
+ anonymous: false,
581
+ inputs: [
582
+ {
583
+ indexed: true,
584
+ internalType: "address",
585
+ name: "sender",
586
+ type: "address",
587
+ },
588
+ {
589
+ indexed: true,
590
+ internalType: "contract IERC20",
591
+ name: "srcToken",
592
+ type: "address",
593
+ },
594
+ {
595
+ indexed: true,
596
+ internalType: "contract IERC20",
597
+ name: "dstToken",
598
+ type: "address",
599
+ },
600
+ {
601
+ indexed: false,
602
+ internalType: "address",
603
+ name: "dstReceiver",
604
+ type: "address",
605
+ },
606
+ {
607
+ indexed: false,
608
+ internalType: "uint256",
609
+ name: "amount",
610
+ type: "uint256",
611
+ },
612
+ {
613
+ indexed: false,
614
+ internalType: "uint256",
615
+ name: "spentAmount",
616
+ type: "uint256",
617
+ },
618
+ {
619
+ indexed: false,
620
+ internalType: "uint256",
621
+ name: "returnAmount",
622
+ type: "uint256",
623
+ },
624
+ {
625
+ indexed: false,
626
+ internalType: "uint256",
627
+ name: "minReturnAmount",
628
+ type: "uint256",
629
+ },
630
+ {
631
+ indexed: false,
632
+ internalType: "uint256",
633
+ name: "guaranteedAmount",
634
+ type: "uint256",
635
+ },
636
+ {
637
+ indexed: false,
638
+ internalType: "address",
639
+ name: "referrer",
640
+ type: "address",
641
+ },
642
+ ],
643
+ name: "Swapped",
644
+ type: "event",
645
+ },
646
+ {
647
+ anonymous: false,
648
+ inputs: [
649
+ {
650
+ indexed: false,
651
+ internalType: "address",
652
+ name: "account",
653
+ type: "address",
654
+ },
655
+ ],
656
+ name: "Unpaused",
657
+ type: "event",
658
+ },
659
+ {
660
+ inputs: [],
661
+ name: "initialize",
662
+ outputs: [],
663
+ stateMutability: "nonpayable",
664
+ type: "function",
665
+ },
666
+ {
667
+ inputs: [],
668
+ name: "owner",
669
+ outputs: [{ internalType: "address", name: "", type: "address" }],
670
+ stateMutability: "view",
671
+ type: "function",
672
+ },
673
+ {
674
+ inputs: [],
675
+ name: "pause",
676
+ outputs: [],
677
+ stateMutability: "nonpayable",
678
+ type: "function",
679
+ },
680
+ {
681
+ inputs: [],
682
+ name: "paused",
683
+ outputs: [{ internalType: "bool", name: "", type: "bool" }],
684
+ stateMutability: "view",
685
+ type: "function",
686
+ },
687
+ {
688
+ inputs: [],
689
+ name: "renounceOwnership",
690
+ outputs: [],
691
+ stateMutability: "nonpayable",
692
+ type: "function",
693
+ },
694
+ {
695
+ inputs: [
696
+ { internalType: "contract IERC20", name: "token", type: "address" },
697
+ { internalType: "uint256", name: "amount", type: "uint256" },
698
+ ],
699
+ name: "rescueFunds",
700
+ outputs: [],
701
+ stateMutability: "nonpayable",
702
+ type: "function",
703
+ },
704
+ {
705
+ inputs: [
706
+ {
707
+ internalType: "contract IOpenOceanCaller",
708
+ name: "caller",
709
+ type: "address",
710
+ },
711
+ {
712
+ components: [
713
+ {
714
+ internalType: "contract IERC20",
715
+ name: "srcToken",
716
+ type: "address",
717
+ },
718
+ {
719
+ internalType: "contract IERC20",
720
+ name: "dstToken",
721
+ type: "address",
722
+ },
723
+ { internalType: "address", name: "srcReceiver", type: "address" },
724
+ { internalType: "address", name: "dstReceiver", type: "address" },
725
+ { internalType: "uint256", name: "amount", type: "uint256" },
726
+ { internalType: "uint256", name: "minReturnAmount", type: "uint256" },
727
+ {
728
+ internalType: "uint256",
729
+ name: "guaranteedAmount",
730
+ type: "uint256",
731
+ },
732
+ { internalType: "uint256", name: "flags", type: "uint256" },
733
+ { internalType: "address", name: "referrer", type: "address" },
734
+ { internalType: "bytes", name: "permit", type: "bytes" },
735
+ ],
736
+ internalType: "struct OpenOceanExchange.SwapDescription",
737
+ name: "desc",
738
+ type: "tuple",
739
+ },
740
+ {
741
+ components: [
742
+ { internalType: "uint256", name: "target", type: "uint256" },
743
+ { internalType: "uint256", name: "gasLimit", type: "uint256" },
744
+ { internalType: "uint256", name: "value", type: "uint256" },
745
+ { internalType: "bytes", name: "data", type: "bytes" },
746
+ ],
747
+ internalType: "struct IOpenOceanCaller.CallDescription[]",
748
+ name: "calls",
749
+ type: "tuple[]",
750
+ },
751
+ ],
752
+ name: "swap",
753
+ outputs: [
754
+ { internalType: "uint256", name: "returnAmount", type: "uint256" },
755
+ ],
756
+ stateMutability: "payable",
757
+ type: "function",
758
+ },
759
+ {
760
+ inputs: [{ internalType: "address", name: "newOwner", type: "address" }],
761
+ name: "transferOwnership",
762
+ outputs: [],
763
+ stateMutability: "nonpayable",
764
+ type: "function",
765
+ },
766
+ ];
767
+ export const UniswapABI = [
768
+ {
769
+ inputs: [
770
+ {
771
+ components: [
772
+ {
773
+ internalType: "bytes",
774
+ name: "path",
775
+ type: "bytes",
776
+ },
777
+ {
778
+ internalType: "address",
779
+ name: "recipient",
780
+ type: "address",
781
+ },
782
+ {
783
+ internalType: "uint256",
784
+ name: "deadline",
785
+ type: "uint256",
786
+ },
787
+ {
788
+ internalType: "uint256",
789
+ name: "amountIn",
790
+ type: "uint256",
791
+ },
792
+ {
793
+ internalType: "uint256",
794
+ name: "amountOutMinimum",
795
+ type: "uint256",
796
+ },
797
+ ],
798
+ internalType: "struct ISwapRouter.ExactInputParams",
799
+ name: "params",
800
+ type: "tuple",
801
+ },
802
+ ],
803
+ name: "exactInput",
804
+ outputs: [
805
+ {
806
+ internalType: "uint256",
807
+ name: "amountOut",
808
+ type: "uint256",
809
+ },
810
+ ],
811
+ stateMutability: "payable",
812
+ type: "function",
813
+ },
814
+ {
815
+ inputs: [
816
+ {
817
+ internalType: "bytes[]",
818
+ name: "data",
819
+ type: "bytes[]",
820
+ },
821
+ ],
822
+ name: "multicall",
823
+ outputs: [
824
+ {
825
+ internalType: "bytes[]",
826
+ name: "results",
827
+ type: "bytes[]",
828
+ },
829
+ ],
830
+ stateMutability: "payable",
831
+ type: "function",
832
+ },
833
+ {
834
+ inputs: [
835
+ {
836
+ internalType: "uint256",
837
+ name: "amountMinimum",
838
+ type: "uint256",
839
+ },
840
+ {
841
+ internalType: "address",
842
+ name: "recipient",
843
+ type: "address",
844
+ },
845
+ ],
846
+ name: "unwrapWETH9",
847
+ outputs: [],
848
+ stateMutability: "payable",
849
+ type: "function",
850
+ },
851
+ ];
852
+ export const KyberswapABI = [
853
+ {
854
+ inputs: [{ internalType: "address", name: "_WETH", type: "address" }],
855
+ stateMutability: "nonpayable",
856
+ type: "constructor",
857
+ },
858
+ {
859
+ anonymous: false,
860
+ inputs: [
861
+ {
862
+ indexed: false,
863
+ internalType: "bytes",
864
+ name: "clientData",
865
+ type: "bytes",
866
+ },
867
+ ],
868
+ name: "ClientData",
869
+ type: "event",
870
+ },
871
+ {
872
+ anonymous: false,
873
+ inputs: [
874
+ {
875
+ indexed: false,
876
+ internalType: "string",
877
+ name: "reason",
878
+ type: "string",
879
+ },
880
+ ],
881
+ name: "Error",
882
+ type: "event",
883
+ },
884
+ {
885
+ anonymous: false,
886
+ inputs: [
887
+ {
888
+ indexed: false,
889
+ internalType: "address",
890
+ name: "pair",
891
+ type: "address",
892
+ },
893
+ {
894
+ indexed: false,
895
+ internalType: "uint256",
896
+ name: "amountOut",
897
+ type: "uint256",
898
+ },
899
+ {
900
+ indexed: false,
901
+ internalType: "address",
902
+ name: "output",
903
+ type: "address",
904
+ },
905
+ ],
906
+ name: "Exchange",
907
+ type: "event",
908
+ },
909
+ {
910
+ anonymous: false,
911
+ inputs: [
912
+ {
913
+ indexed: false,
914
+ internalType: "address",
915
+ name: "token",
916
+ type: "address",
917
+ },
918
+ {
919
+ indexed: false,
920
+ internalType: "uint256",
921
+ name: "totalAmount",
922
+ type: "uint256",
923
+ },
924
+ {
925
+ indexed: false,
926
+ internalType: "uint256",
927
+ name: "totalFee",
928
+ type: "uint256",
929
+ },
930
+ {
931
+ indexed: false,
932
+ internalType: "address[]",
933
+ name: "recipients",
934
+ type: "address[]",
935
+ },
936
+ {
937
+ indexed: false,
938
+ internalType: "uint256[]",
939
+ name: "amounts",
940
+ type: "uint256[]",
941
+ },
942
+ { indexed: false, internalType: "bool", name: "isBps", type: "bool" },
943
+ ],
944
+ name: "Fee",
945
+ type: "event",
946
+ },
947
+ {
948
+ anonymous: false,
949
+ inputs: [
950
+ {
951
+ indexed: true,
952
+ internalType: "address",
953
+ name: "previousOwner",
954
+ type: "address",
955
+ },
956
+ {
957
+ indexed: true,
958
+ internalType: "address",
959
+ name: "newOwner",
960
+ type: "address",
961
+ },
962
+ ],
963
+ name: "OwnershipTransferred",
964
+ type: "event",
965
+ },
966
+ {
967
+ anonymous: false,
968
+ inputs: [
969
+ {
970
+ indexed: false,
971
+ internalType: "address",
972
+ name: "sender",
973
+ type: "address",
974
+ },
975
+ {
976
+ indexed: false,
977
+ internalType: "contract IERC20",
978
+ name: "srcToken",
979
+ type: "address",
980
+ },
981
+ {
982
+ indexed: false,
983
+ internalType: "contract IERC20",
984
+ name: "dstToken",
985
+ type: "address",
986
+ },
987
+ {
988
+ indexed: false,
989
+ internalType: "address",
990
+ name: "dstReceiver",
991
+ type: "address",
992
+ },
993
+ {
994
+ indexed: false,
995
+ internalType: "uint256",
996
+ name: "spentAmount",
997
+ type: "uint256",
998
+ },
999
+ {
1000
+ indexed: false,
1001
+ internalType: "uint256",
1002
+ name: "returnAmount",
1003
+ type: "uint256",
1004
+ },
1005
+ ],
1006
+ name: "Swapped",
1007
+ type: "event",
1008
+ },
1009
+ {
1010
+ inputs: [],
1011
+ name: "WETH",
1012
+ outputs: [{ internalType: "address", name: "", type: "address" }],
1013
+ stateMutability: "view",
1014
+ type: "function",
1015
+ },
1016
+ {
1017
+ inputs: [{ internalType: "address", name: "", type: "address" }],
1018
+ name: "isWhitelist",
1019
+ outputs: [{ internalType: "bool", name: "", type: "bool" }],
1020
+ stateMutability: "view",
1021
+ type: "function",
1022
+ },
1023
+ {
1024
+ inputs: [],
1025
+ name: "owner",
1026
+ outputs: [{ internalType: "address", name: "", type: "address" }],
1027
+ stateMutability: "view",
1028
+ type: "function",
1029
+ },
1030
+ {
1031
+ inputs: [],
1032
+ name: "renounceOwnership",
1033
+ outputs: [],
1034
+ stateMutability: "nonpayable",
1035
+ type: "function",
1036
+ },
1037
+ {
1038
+ inputs: [
1039
+ { internalType: "address", name: "token", type: "address" },
1040
+ { internalType: "uint256", name: "amount", type: "uint256" },
1041
+ ],
1042
+ name: "rescueFunds",
1043
+ outputs: [],
1044
+ stateMutability: "nonpayable",
1045
+ type: "function",
1046
+ },
1047
+ {
1048
+ inputs: [
1049
+ {
1050
+ components: [
1051
+ { internalType: "address", name: "callTarget", type: "address" },
1052
+ { internalType: "address", name: "approveTarget", type: "address" },
1053
+ { internalType: "bytes", name: "targetData", type: "bytes" },
1054
+ {
1055
+ components: [
1056
+ {
1057
+ internalType: "contract IERC20",
1058
+ name: "srcToken",
1059
+ type: "address",
1060
+ },
1061
+ {
1062
+ internalType: "contract IERC20",
1063
+ name: "dstToken",
1064
+ type: "address",
1065
+ },
1066
+ {
1067
+ internalType: "address[]",
1068
+ name: "srcReceivers",
1069
+ type: "address[]",
1070
+ },
1071
+ {
1072
+ internalType: "uint256[]",
1073
+ name: "srcAmounts",
1074
+ type: "uint256[]",
1075
+ },
1076
+ {
1077
+ internalType: "address[]",
1078
+ name: "feeReceivers",
1079
+ type: "address[]",
1080
+ },
1081
+ {
1082
+ internalType: "uint256[]",
1083
+ name: "feeAmounts",
1084
+ type: "uint256[]",
1085
+ },
1086
+ { internalType: "address", name: "dstReceiver", type: "address" },
1087
+ { internalType: "uint256", name: "amount", type: "uint256" },
1088
+ {
1089
+ internalType: "uint256",
1090
+ name: "minReturnAmount",
1091
+ type: "uint256",
1092
+ },
1093
+ { internalType: "uint256", name: "flags", type: "uint256" },
1094
+ { internalType: "bytes", name: "permit", type: "bytes" },
1095
+ ],
1096
+ internalType: "struct MetaAggregationRouterV2.SwapDescriptionV2",
1097
+ name: "desc",
1098
+ type: "tuple",
1099
+ },
1100
+ { internalType: "bytes", name: "clientData", type: "bytes" },
1101
+ ],
1102
+ internalType: "struct MetaAggregationRouterV2.SwapExecutionParams",
1103
+ name: "execution",
1104
+ type: "tuple",
1105
+ },
1106
+ ],
1107
+ name: "swap",
1108
+ outputs: [
1109
+ { internalType: "uint256", name: "returnAmount", type: "uint256" },
1110
+ { internalType: "uint256", name: "gasUsed", type: "uint256" },
1111
+ ],
1112
+ stateMutability: "payable",
1113
+ type: "function",
1114
+ },
1115
+ {
1116
+ inputs: [
1117
+ {
1118
+ components: [
1119
+ { internalType: "address", name: "callTarget", type: "address" },
1120
+ { internalType: "address", name: "approveTarget", type: "address" },
1121
+ { internalType: "bytes", name: "targetData", type: "bytes" },
1122
+ {
1123
+ components: [
1124
+ {
1125
+ internalType: "contract IERC20",
1126
+ name: "srcToken",
1127
+ type: "address",
1128
+ },
1129
+ {
1130
+ internalType: "contract IERC20",
1131
+ name: "dstToken",
1132
+ type: "address",
1133
+ },
1134
+ {
1135
+ internalType: "address[]",
1136
+ name: "srcReceivers",
1137
+ type: "address[]",
1138
+ },
1139
+ {
1140
+ internalType: "uint256[]",
1141
+ name: "srcAmounts",
1142
+ type: "uint256[]",
1143
+ },
1144
+ {
1145
+ internalType: "address[]",
1146
+ name: "feeReceivers",
1147
+ type: "address[]",
1148
+ },
1149
+ {
1150
+ internalType: "uint256[]",
1151
+ name: "feeAmounts",
1152
+ type: "uint256[]",
1153
+ },
1154
+ { internalType: "address", name: "dstReceiver", type: "address" },
1155
+ { internalType: "uint256", name: "amount", type: "uint256" },
1156
+ {
1157
+ internalType: "uint256",
1158
+ name: "minReturnAmount",
1159
+ type: "uint256",
1160
+ },
1161
+ { internalType: "uint256", name: "flags", type: "uint256" },
1162
+ { internalType: "bytes", name: "permit", type: "bytes" },
1163
+ ],
1164
+ internalType: "struct MetaAggregationRouterV2.SwapDescriptionV2",
1165
+ name: "desc",
1166
+ type: "tuple",
1167
+ },
1168
+ { internalType: "bytes", name: "clientData", type: "bytes" },
1169
+ ],
1170
+ internalType: "struct MetaAggregationRouterV2.SwapExecutionParams",
1171
+ name: "execution",
1172
+ type: "tuple",
1173
+ },
1174
+ ],
1175
+ name: "swapGeneric",
1176
+ outputs: [
1177
+ { internalType: "uint256", name: "returnAmount", type: "uint256" },
1178
+ { internalType: "uint256", name: "gasUsed", type: "uint256" },
1179
+ ],
1180
+ stateMutability: "payable",
1181
+ type: "function",
1182
+ },
1183
+ {
1184
+ inputs: [
1185
+ {
1186
+ internalType: "contract IAggregationExecutor",
1187
+ name: "caller",
1188
+ type: "address",
1189
+ },
1190
+ {
1191
+ components: [
1192
+ {
1193
+ internalType: "contract IERC20",
1194
+ name: "srcToken",
1195
+ type: "address",
1196
+ },
1197
+ {
1198
+ internalType: "contract IERC20",
1199
+ name: "dstToken",
1200
+ type: "address",
1201
+ },
1202
+ {
1203
+ internalType: "address[]",
1204
+ name: "srcReceivers",
1205
+ type: "address[]",
1206
+ },
1207
+ { internalType: "uint256[]", name: "srcAmounts", type: "uint256[]" },
1208
+ {
1209
+ internalType: "address[]",
1210
+ name: "feeReceivers",
1211
+ type: "address[]",
1212
+ },
1213
+ { internalType: "uint256[]", name: "feeAmounts", type: "uint256[]" },
1214
+ { internalType: "address", name: "dstReceiver", type: "address" },
1215
+ { internalType: "uint256", name: "amount", type: "uint256" },
1216
+ { internalType: "uint256", name: "minReturnAmount", type: "uint256" },
1217
+ { internalType: "uint256", name: "flags", type: "uint256" },
1218
+ { internalType: "bytes", name: "permit", type: "bytes" },
1219
+ ],
1220
+ internalType: "struct MetaAggregationRouterV2.SwapDescriptionV2",
1221
+ name: "desc",
1222
+ type: "tuple",
1223
+ },
1224
+ { internalType: "bytes", name: "executorData", type: "bytes" },
1225
+ { internalType: "bytes", name: "clientData", type: "bytes" },
1226
+ ],
1227
+ name: "swapSimpleMode",
1228
+ outputs: [
1229
+ { internalType: "uint256", name: "returnAmount", type: "uint256" },
1230
+ { internalType: "uint256", name: "gasUsed", type: "uint256" },
1231
+ ],
1232
+ stateMutability: "nonpayable",
1233
+ type: "function",
1234
+ },
1235
+ {
1236
+ inputs: [{ internalType: "address", name: "newOwner", type: "address" }],
1237
+ name: "transferOwnership",
1238
+ outputs: [],
1239
+ stateMutability: "nonpayable",
1240
+ type: "function",
1241
+ },
1242
+ {
1243
+ inputs: [
1244
+ { internalType: "address[]", name: "addr", type: "address[]" },
1245
+ { internalType: "bool[]", name: "value", type: "bool[]" },
1246
+ ],
1247
+ name: "updateWhitelist",
1248
+ outputs: [],
1249
+ stateMutability: "nonpayable",
1250
+ type: "function",
1251
+ },
1252
+ { stateMutability: "payable", type: "receive" },
1253
+ ];
1254
+ export const ParaSwapV6ABI = [
1255
+ {
1256
+ inputs: [
1257
+ { internalType: "address", name: "executor", type: "address" },
1258
+ {
1259
+ components: [
1260
+ {
1261
+ internalType: "contract IERC20",
1262
+ name: "srcToken",
1263
+ type: "address",
1264
+ },
1265
+ {
1266
+ internalType: "contract IERC20",
1267
+ name: "destToken",
1268
+ type: "address",
1269
+ },
1270
+ { internalType: "uint256", name: "fromAmount", type: "uint256" },
1271
+ { internalType: "uint256", name: "toAmount", type: "uint256" },
1272
+ { internalType: "uint256", name: "quotedAmount", type: "uint256" },
1273
+ { internalType: "bytes32", name: "metadata", type: "bytes32" },
1274
+ {
1275
+ internalType: "address payable",
1276
+ name: "beneficiary",
1277
+ type: "address",
1278
+ },
1279
+ ],
1280
+ internalType: "struct GenericData",
1281
+ name: "swapData",
1282
+ type: "tuple",
1283
+ },
1284
+ { internalType: "uint256", name: "partnerAndFee", type: "uint256" },
1285
+ { internalType: "bytes", name: "permit", type: "bytes" },
1286
+ { internalType: "bytes", name: "executorData", type: "bytes" },
1287
+ ],
1288
+ name: "swapExactAmountIn",
1289
+ outputs: [
1290
+ { internalType: "uint256", name: "receivedAmount", type: "uint256" },
1291
+ { internalType: "uint256", name: "paraswapShare", type: "uint256" },
1292
+ { internalType: "uint256", name: "partnerShare", type: "uint256" },
1293
+ ],
1294
+ stateMutability: "payable",
1295
+ type: "function",
1296
+ },
1297
+ {
1298
+ inputs: [
1299
+ {
1300
+ components: [
1301
+ { internalType: "uint256", name: "fromAmount", type: "uint256" },
1302
+ { internalType: "uint256", name: "toAmount", type: "uint256" },
1303
+ { internalType: "uint256", name: "quotedAmount", type: "uint256" },
1304
+ { internalType: "bytes32", name: "metadata", type: "bytes32" },
1305
+ {
1306
+ internalType: "uint256",
1307
+ name: "beneficiaryAndApproveFlag",
1308
+ type: "uint256",
1309
+ },
1310
+ ],
1311
+ internalType: "struct BalancerV2Data",
1312
+ name: "balancerData",
1313
+ type: "tuple",
1314
+ },
1315
+ { internalType: "uint256", name: "partnerAndFee", type: "uint256" },
1316
+ { internalType: "bytes", name: "permit", type: "bytes" },
1317
+ { internalType: "bytes", name: "data", type: "bytes" },
1318
+ ],
1319
+ name: "swapExactAmountInOnBalancerV2",
1320
+ outputs: [
1321
+ { internalType: "uint256", name: "receivedAmount", type: "uint256" },
1322
+ { internalType: "uint256", name: "paraswapShare", type: "uint256" },
1323
+ { internalType: "uint256", name: "partnerShare", type: "uint256" },
1324
+ ],
1325
+ stateMutability: "payable",
1326
+ type: "function",
1327
+ },
1328
+ {
1329
+ inputs: [
1330
+ {
1331
+ components: [
1332
+ { internalType: "uint256", name: "curveData", type: "uint256" },
1333
+ { internalType: "uint256", name: "curveAssets", type: "uint256" },
1334
+ {
1335
+ internalType: "contract IERC20",
1336
+ name: "srcToken",
1337
+ type: "address",
1338
+ },
1339
+ {
1340
+ internalType: "contract IERC20",
1341
+ name: "destToken",
1342
+ type: "address",
1343
+ },
1344
+ { internalType: "uint256", name: "fromAmount", type: "uint256" },
1345
+ { internalType: "uint256", name: "toAmount", type: "uint256" },
1346
+ { internalType: "uint256", name: "quotedAmount", type: "uint256" },
1347
+ { internalType: "bytes32", name: "metadata", type: "bytes32" },
1348
+ {
1349
+ internalType: "address payable",
1350
+ name: "beneficiary",
1351
+ type: "address",
1352
+ },
1353
+ ],
1354
+ internalType: "struct CurveV1Data",
1355
+ name: "curveV1Data",
1356
+ type: "tuple",
1357
+ },
1358
+ { internalType: "uint256", name: "partnerAndFee", type: "uint256" },
1359
+ { internalType: "bytes", name: "permit", type: "bytes" },
1360
+ ],
1361
+ name: "swapExactAmountInOnCurveV1",
1362
+ outputs: [
1363
+ { internalType: "uint256", name: "receivedAmount", type: "uint256" },
1364
+ { internalType: "uint256", name: "paraswapShare", type: "uint256" },
1365
+ { internalType: "uint256", name: "partnerShare", type: "uint256" },
1366
+ ],
1367
+ stateMutability: "payable",
1368
+ type: "function",
1369
+ },
1370
+ {
1371
+ inputs: [
1372
+ {
1373
+ components: [
1374
+ { internalType: "uint256", name: "curveData", type: "uint256" },
1375
+ { internalType: "uint256", name: "i", type: "uint256" },
1376
+ { internalType: "uint256", name: "j", type: "uint256" },
1377
+ { internalType: "address", name: "poolAddress", type: "address" },
1378
+ {
1379
+ internalType: "contract IERC20",
1380
+ name: "srcToken",
1381
+ type: "address",
1382
+ },
1383
+ {
1384
+ internalType: "contract IERC20",
1385
+ name: "destToken",
1386
+ type: "address",
1387
+ },
1388
+ { internalType: "uint256", name: "fromAmount", type: "uint256" },
1389
+ { internalType: "uint256", name: "toAmount", type: "uint256" },
1390
+ { internalType: "uint256", name: "quotedAmount", type: "uint256" },
1391
+ { internalType: "bytes32", name: "metadata", type: "bytes32" },
1392
+ {
1393
+ internalType: "address payable",
1394
+ name: "beneficiary",
1395
+ type: "address",
1396
+ },
1397
+ ],
1398
+ internalType: "struct CurveV2Data",
1399
+ name: "curveV2Data",
1400
+ type: "tuple",
1401
+ },
1402
+ { internalType: "uint256", name: "partnerAndFee", type: "uint256" },
1403
+ { internalType: "bytes", name: "permit", type: "bytes" },
1404
+ ],
1405
+ name: "swapExactAmountInOnCurveV2",
1406
+ outputs: [
1407
+ { internalType: "uint256", name: "receivedAmount", type: "uint256" },
1408
+ { internalType: "uint256", name: "paraswapShare", type: "uint256" },
1409
+ { internalType: "uint256", name: "partnerShare", type: "uint256" },
1410
+ ],
1411
+ stateMutability: "payable",
1412
+ type: "function",
1413
+ },
1414
+ {
1415
+ inputs: [
1416
+ {
1417
+ components: [
1418
+ {
1419
+ internalType: "contract IERC20",
1420
+ name: "srcToken",
1421
+ type: "address",
1422
+ },
1423
+ {
1424
+ internalType: "contract IERC20",
1425
+ name: "destToken",
1426
+ type: "address",
1427
+ },
1428
+ { internalType: "uint256", name: "fromAmount", type: "uint256" },
1429
+ { internalType: "uint256", name: "toAmount", type: "uint256" },
1430
+ { internalType: "uint256", name: "quotedAmount", type: "uint256" },
1431
+ { internalType: "bytes32", name: "metadata", type: "bytes32" },
1432
+ {
1433
+ internalType: "address payable",
1434
+ name: "beneficiary",
1435
+ type: "address",
1436
+ },
1437
+ { internalType: "bytes", name: "pools", type: "bytes" },
1438
+ ],
1439
+ internalType: "struct UniswapV2Data",
1440
+ name: "uniData",
1441
+ type: "tuple",
1442
+ },
1443
+ { internalType: "uint256", name: "partnerAndFee", type: "uint256" },
1444
+ { internalType: "bytes", name: "permit", type: "bytes" },
1445
+ ],
1446
+ name: "swapExactAmountInOnUniswapV2",
1447
+ outputs: [
1448
+ { internalType: "uint256", name: "receivedAmount", type: "uint256" },
1449
+ { internalType: "uint256", name: "paraswapShare", type: "uint256" },
1450
+ { internalType: "uint256", name: "partnerShare", type: "uint256" },
1451
+ ],
1452
+ stateMutability: "payable",
1453
+ type: "function",
1454
+ },
1455
+ {
1456
+ inputs: [
1457
+ {
1458
+ components: [
1459
+ {
1460
+ internalType: "contract IERC20",
1461
+ name: "srcToken",
1462
+ type: "address",
1463
+ },
1464
+ {
1465
+ internalType: "contract IERC20",
1466
+ name: "destToken",
1467
+ type: "address",
1468
+ },
1469
+ { internalType: "uint256", name: "fromAmount", type: "uint256" },
1470
+ { internalType: "uint256", name: "toAmount", type: "uint256" },
1471
+ { internalType: "uint256", name: "quotedAmount", type: "uint256" },
1472
+ { internalType: "bytes32", name: "metadata", type: "bytes32" },
1473
+ {
1474
+ internalType: "address payable",
1475
+ name: "beneficiary",
1476
+ type: "address",
1477
+ },
1478
+ { internalType: "bytes", name: "pools", type: "bytes" },
1479
+ ],
1480
+ internalType: "struct UniswapV3Data",
1481
+ name: "uniData",
1482
+ type: "tuple",
1483
+ },
1484
+ { internalType: "uint256", name: "partnerAndFee", type: "uint256" },
1485
+ { internalType: "bytes", name: "permit", type: "bytes" },
1486
+ ],
1487
+ name: "swapExactAmountInOnUniswapV3",
1488
+ outputs: [
1489
+ { internalType: "uint256", name: "receivedAmount", type: "uint256" },
1490
+ { internalType: "uint256", name: "paraswapShare", type: "uint256" },
1491
+ { internalType: "uint256", name: "partnerShare", type: "uint256" },
1492
+ ],
1493
+ stateMutability: "payable",
1494
+ type: "function",
1495
+ },
1496
+ {
1497
+ inputs: [
1498
+ { internalType: "address", name: "executor", type: "address" },
1499
+ {
1500
+ components: [
1501
+ {
1502
+ internalType: "contract IERC20",
1503
+ name: "srcToken",
1504
+ type: "address",
1505
+ },
1506
+ {
1507
+ internalType: "contract IERC20",
1508
+ name: "destToken",
1509
+ type: "address",
1510
+ },
1511
+ { internalType: "uint256", name: "fromAmount", type: "uint256" },
1512
+ { internalType: "uint256", name: "toAmount", type: "uint256" },
1513
+ { internalType: "uint256", name: "quotedAmount", type: "uint256" },
1514
+ { internalType: "bytes32", name: "metadata", type: "bytes32" },
1515
+ {
1516
+ internalType: "address payable",
1517
+ name: "beneficiary",
1518
+ type: "address",
1519
+ },
1520
+ ],
1521
+ internalType: "struct GenericData",
1522
+ name: "swapData",
1523
+ type: "tuple",
1524
+ },
1525
+ { internalType: "uint256", name: "partnerAndFee", type: "uint256" },
1526
+ { internalType: "bytes", name: "permit", type: "bytes" },
1527
+ { internalType: "bytes", name: "executorData", type: "bytes" },
1528
+ ],
1529
+ name: "swapExactAmountOut",
1530
+ outputs: [
1531
+ { internalType: "uint256", name: "spentAmount", type: "uint256" },
1532
+ { internalType: "uint256", name: "receivedAmount", type: "uint256" },
1533
+ { internalType: "uint256", name: "paraswapShare", type: "uint256" },
1534
+ { internalType: "uint256", name: "partnerShare", type: "uint256" },
1535
+ ],
1536
+ stateMutability: "payable",
1537
+ type: "function",
1538
+ },
1539
+ {
1540
+ inputs: [
1541
+ {
1542
+ components: [
1543
+ { internalType: "uint256", name: "fromAmount", type: "uint256" },
1544
+ { internalType: "uint256", name: "toAmount", type: "uint256" },
1545
+ { internalType: "uint256", name: "quotedAmount", type: "uint256" },
1546
+ { internalType: "bytes32", name: "metadata", type: "bytes32" },
1547
+ {
1548
+ internalType: "uint256",
1549
+ name: "beneficiaryAndApproveFlag",
1550
+ type: "uint256",
1551
+ },
1552
+ ],
1553
+ internalType: "struct BalancerV2Data",
1554
+ name: "balancerData",
1555
+ type: "tuple",
1556
+ },
1557
+ { internalType: "uint256", name: "partnerAndFee", type: "uint256" },
1558
+ { internalType: "bytes", name: "permit", type: "bytes" },
1559
+ { internalType: "bytes", name: "data", type: "bytes" },
1560
+ ],
1561
+ name: "swapExactAmountOutOnBalancerV2",
1562
+ outputs: [
1563
+ { internalType: "uint256", name: "spentAmount", type: "uint256" },
1564
+ { internalType: "uint256", name: "receivedAmount", type: "uint256" },
1565
+ { internalType: "uint256", name: "paraswapShare", type: "uint256" },
1566
+ { internalType: "uint256", name: "partnerShare", type: "uint256" },
1567
+ ],
1568
+ stateMutability: "payable",
1569
+ type: "function",
1570
+ },
1571
+ {
1572
+ inputs: [
1573
+ {
1574
+ components: [
1575
+ {
1576
+ internalType: "contract IERC20",
1577
+ name: "srcToken",
1578
+ type: "address",
1579
+ },
1580
+ {
1581
+ internalType: "contract IERC20",
1582
+ name: "destToken",
1583
+ type: "address",
1584
+ },
1585
+ { internalType: "uint256", name: "fromAmount", type: "uint256" },
1586
+ { internalType: "uint256", name: "toAmount", type: "uint256" },
1587
+ { internalType: "uint256", name: "quotedAmount", type: "uint256" },
1588
+ { internalType: "bytes32", name: "metadata", type: "bytes32" },
1589
+ {
1590
+ internalType: "address payable",
1591
+ name: "beneficiary",
1592
+ type: "address",
1593
+ },
1594
+ { internalType: "bytes", name: "pools", type: "bytes" },
1595
+ ],
1596
+ internalType: "struct UniswapV2Data",
1597
+ name: "uniData",
1598
+ type: "tuple",
1599
+ },
1600
+ { internalType: "uint256", name: "partnerAndFee", type: "uint256" },
1601
+ { internalType: "bytes", name: "permit", type: "bytes" },
1602
+ ],
1603
+ name: "swapExactAmountOutOnUniswapV2",
1604
+ outputs: [
1605
+ { internalType: "uint256", name: "spentAmount", type: "uint256" },
1606
+ { internalType: "uint256", name: "receivedAmount", type: "uint256" },
1607
+ { internalType: "uint256", name: "paraswapShare", type: "uint256" },
1608
+ { internalType: "uint256", name: "partnerShare", type: "uint256" },
1609
+ ],
1610
+ stateMutability: "payable",
1611
+ type: "function",
1612
+ },
1613
+ {
1614
+ inputs: [
1615
+ {
1616
+ components: [
1617
+ {
1618
+ internalType: "contract IERC20",
1619
+ name: "srcToken",
1620
+ type: "address",
1621
+ },
1622
+ {
1623
+ internalType: "contract IERC20",
1624
+ name: "destToken",
1625
+ type: "address",
1626
+ },
1627
+ { internalType: "uint256", name: "fromAmount", type: "uint256" },
1628
+ { internalType: "uint256", name: "toAmount", type: "uint256" },
1629
+ { internalType: "uint256", name: "quotedAmount", type: "uint256" },
1630
+ { internalType: "bytes32", name: "metadata", type: "bytes32" },
1631
+ {
1632
+ internalType: "address payable",
1633
+ name: "beneficiary",
1634
+ type: "address",
1635
+ },
1636
+ { internalType: "bytes", name: "pools", type: "bytes" },
1637
+ ],
1638
+ internalType: "struct UniswapV3Data",
1639
+ name: "uniData",
1640
+ type: "tuple",
1641
+ },
1642
+ { internalType: "uint256", name: "partnerAndFee", type: "uint256" },
1643
+ { internalType: "bytes", name: "permit", type: "bytes" },
1644
+ ],
1645
+ name: "swapExactAmountOutOnUniswapV3",
1646
+ outputs: [
1647
+ { internalType: "uint256", name: "spentAmount", type: "uint256" },
1648
+ { internalType: "uint256", name: "receivedAmount", type: "uint256" },
1649
+ { internalType: "uint256", name: "paraswapShare", type: "uint256" },
1650
+ { internalType: "uint256", name: "partnerShare", type: "uint256" },
1651
+ ],
1652
+ stateMutability: "payable",
1653
+ type: "function",
1654
+ },
1655
+ {
1656
+ inputs: [
1657
+ {
1658
+ components: [
1659
+ { internalType: "uint256", name: "fromAmount", type: "uint256" },
1660
+ { internalType: "uint256", name: "toAmount", type: "uint256" },
1661
+ {
1662
+ internalType: "uint8",
1663
+ name: "wrapApproveDirection",
1664
+ type: "uint8",
1665
+ },
1666
+ { internalType: "bytes32", name: "metadata", type: "bytes32" },
1667
+ {
1668
+ internalType: "address payable",
1669
+ name: "beneficiary",
1670
+ type: "address",
1671
+ },
1672
+ ],
1673
+ internalType: "struct AugustusRFQData",
1674
+ name: "data",
1675
+ type: "tuple",
1676
+ },
1677
+ {
1678
+ components: [
1679
+ {
1680
+ components: [
1681
+ {
1682
+ internalType: "uint256",
1683
+ name: "nonceAndMeta",
1684
+ type: "uint256",
1685
+ },
1686
+ { internalType: "uint128", name: "expiry", type: "uint128" },
1687
+ { internalType: "address", name: "makerAsset", type: "address" },
1688
+ { internalType: "address", name: "takerAsset", type: "address" },
1689
+ { internalType: "address", name: "maker", type: "address" },
1690
+ { internalType: "address", name: "taker", type: "address" },
1691
+ { internalType: "uint256", name: "makerAmount", type: "uint256" },
1692
+ { internalType: "uint256", name: "takerAmount", type: "uint256" },
1693
+ ],
1694
+ internalType: "struct Order",
1695
+ name: "order",
1696
+ type: "tuple",
1697
+ },
1698
+ { internalType: "bytes", name: "signature", type: "bytes" },
1699
+ {
1700
+ internalType: "uint256",
1701
+ name: "takerTokenFillAmount",
1702
+ type: "uint256",
1703
+ },
1704
+ { internalType: "bytes", name: "permitTakerAsset", type: "bytes" },
1705
+ { internalType: "bytes", name: "permitMakerAsset", type: "bytes" },
1706
+ ],
1707
+ internalType: "struct OrderInfo[]",
1708
+ name: "orders",
1709
+ type: "tuple[]",
1710
+ },
1711
+ { internalType: "bytes", name: "permit", type: "bytes" },
1712
+ ],
1713
+ name: "swapOnAugustusRFQTryBatchFill",
1714
+ outputs: [
1715
+ { internalType: "uint256", name: "spentAmount", type: "uint256" },
1716
+ { internalType: "uint256", name: "receivedAmount", type: "uint256" },
1717
+ ],
1718
+ stateMutability: "payable",
1719
+ type: "function",
1720
+ },
1721
+ {
1722
+ inputs: [
1723
+ { internalType: "int256", name: "amount0Delta", type: "int256" },
1724
+ { internalType: "int256", name: "amount1Delta", type: "int256" },
1725
+ { internalType: "bytes", name: "data", type: "bytes" },
1726
+ ],
1727
+ name: "uniswapV3SwapCallback",
1728
+ outputs: [],
1729
+ stateMutability: "nonpayable",
1730
+ type: "function",
1731
+ },
1732
+ { stateMutability: "payable", type: "receive" },
1733
+ ];
1734
+ export const ZeroXABIV2 = [
1735
+ { inputs: [], stateMutability: "nonpayable", type: "constructor" },
1736
+ { inputs: [], name: "ConfusedDeputy", type: "error" },
1737
+ { stateMutability: "payable", type: "fallback" },
1738
+ ];