@underscore-finance/sdk 0.3.1 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/dist/contracts/AddyRegistry_v1.d.ts +471 -0
  2. package/dist/contracts/AddyRegistry_v1.d.ts.map +1 -0
  3. package/dist/contracts/AddyRegistry_v1.js +592 -0
  4. package/dist/contracts/AddyRegistry_v2.d.ts +1048 -0
  5. package/dist/contracts/AddyRegistry_v2.d.ts.map +1 -0
  6. package/dist/contracts/AddyRegistry_v2.js +1311 -0
  7. package/dist/contracts/AgentFactory.js +1 -1
  8. package/dist/contracts/AgentFactory_v1.d.ts +1052 -0
  9. package/dist/contracts/AgentFactory_v1.d.ts.map +1 -0
  10. package/dist/contracts/AgentFactory_v1.js +1334 -0
  11. package/dist/contracts/AgentFactory_v2.d.ts +17 -3
  12. package/dist/contracts/AgentFactory_v2.d.ts.map +1 -1
  13. package/dist/contracts/AgentFactory_v2.js +23 -4
  14. package/dist/contracts/Agent_v2.d.ts +2707 -0
  15. package/dist/contracts/Agent_v2.d.ts.map +1 -0
  16. package/dist/contracts/Agent_v2.js +3456 -0
  17. package/dist/contracts/UserWalletConfig_v1.d.ts +1398 -0
  18. package/dist/contracts/UserWalletConfig_v1.d.ts.map +1 -0
  19. package/dist/contracts/UserWalletConfig_v1.js +1674 -0
  20. package/dist/contracts/UserWalletConfig_v2.d.ts +1466 -0
  21. package/dist/contracts/UserWalletConfig_v2.d.ts.map +1 -0
  22. package/dist/contracts/UserWalletConfig_v2.js +1762 -0
  23. package/dist/contracts/UserWallet_v1.d.ts +1978 -0
  24. package/dist/contracts/UserWallet_v1.d.ts.map +1 -0
  25. package/dist/contracts/UserWallet_v1.js +2579 -0
  26. package/dist/contracts/UserWallet_v2.d.ts +1956 -0
  27. package/dist/contracts/UserWallet_v2.d.ts.map +1 -0
  28. package/dist/contracts/UserWallet_v2.js +2551 -0
  29. package/dist/contracts/index.d.ts +8 -0
  30. package/dist/contracts/index.d.ts.map +1 -1
  31. package/dist/contracts/index.js +8 -0
  32. package/dist/contracts/sdk.d.ts +16 -0
  33. package/dist/contracts/sdk.d.ts.map +1 -1
  34. package/dist/contracts/sdk.js +16 -0
  35. package/dist/index.d.ts +43 -0
  36. package/dist/index.d.ts.map +1 -1
  37. package/dist/index.js +51 -0
  38. package/package.json +1 -1
@@ -0,0 +1,3456 @@
1
+ /* Autogenerated file. Do not edit manually. */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /* @ts-nocheck */
5
+ import { singleQuery, mutate } from '@dappql/async';
6
+ export const abi = [
7
+ {
8
+ anonymous: false,
9
+ inputs: [
10
+ {
11
+ indexed: true,
12
+ name: 'asset',
13
+ type: 'address',
14
+ },
15
+ {
16
+ indexed: true,
17
+ name: 'recipient',
18
+ type: 'address',
19
+ },
20
+ {
21
+ indexed: false,
22
+ name: 'balance',
23
+ type: 'uint256',
24
+ },
25
+ ],
26
+ name: 'AgentFundsRecovered',
27
+ type: 'event',
28
+ },
29
+ {
30
+ anonymous: false,
31
+ inputs: [
32
+ {
33
+ indexed: true,
34
+ name: 'prevOwner',
35
+ type: 'address',
36
+ },
37
+ {
38
+ indexed: true,
39
+ name: 'newOwner',
40
+ type: 'address',
41
+ },
42
+ {
43
+ indexed: false,
44
+ name: 'confirmBlock',
45
+ type: 'uint256',
46
+ },
47
+ ],
48
+ name: 'OwnershipChangeInitiated',
49
+ type: 'event',
50
+ },
51
+ {
52
+ anonymous: false,
53
+ inputs: [
54
+ {
55
+ indexed: true,
56
+ name: 'prevOwner',
57
+ type: 'address',
58
+ },
59
+ {
60
+ indexed: true,
61
+ name: 'newOwner',
62
+ type: 'address',
63
+ },
64
+ {
65
+ indexed: false,
66
+ name: 'initiatedBlock',
67
+ type: 'uint256',
68
+ },
69
+ {
70
+ indexed: false,
71
+ name: 'confirmBlock',
72
+ type: 'uint256',
73
+ },
74
+ ],
75
+ name: 'OwnershipChangeConfirmed',
76
+ type: 'event',
77
+ },
78
+ {
79
+ anonymous: false,
80
+ inputs: [
81
+ {
82
+ indexed: true,
83
+ name: 'cancelledOwner',
84
+ type: 'address',
85
+ },
86
+ {
87
+ indexed: true,
88
+ name: 'cancelledBy',
89
+ type: 'address',
90
+ },
91
+ {
92
+ indexed: false,
93
+ name: 'initiatedBlock',
94
+ type: 'uint256',
95
+ },
96
+ {
97
+ indexed: false,
98
+ name: 'confirmBlock',
99
+ type: 'uint256',
100
+ },
101
+ ],
102
+ name: 'OwnershipChangeCancelled',
103
+ type: 'event',
104
+ },
105
+ {
106
+ anonymous: false,
107
+ inputs: [
108
+ {
109
+ indexed: false,
110
+ name: 'delayBlocks',
111
+ type: 'uint256',
112
+ },
113
+ ],
114
+ name: 'OwnershipChangeDelaySet',
115
+ type: 'event',
116
+ },
117
+ {
118
+ inputs: [],
119
+ name: 'hasPendingOwnerChange',
120
+ outputs: [
121
+ {
122
+ name: '',
123
+ type: 'bool',
124
+ },
125
+ ],
126
+ stateMutability: 'view',
127
+ type: 'function',
128
+ },
129
+ {
130
+ inputs: [
131
+ {
132
+ name: '_newOwner',
133
+ type: 'address',
134
+ },
135
+ ],
136
+ name: 'changeOwnership',
137
+ outputs: [],
138
+ stateMutability: 'nonpayable',
139
+ type: 'function',
140
+ },
141
+ {
142
+ inputs: [],
143
+ name: 'confirmOwnershipChange',
144
+ outputs: [],
145
+ stateMutability: 'nonpayable',
146
+ type: 'function',
147
+ },
148
+ {
149
+ inputs: [],
150
+ name: 'cancelOwnershipChange',
151
+ outputs: [],
152
+ stateMutability: 'nonpayable',
153
+ type: 'function',
154
+ },
155
+ {
156
+ inputs: [
157
+ {
158
+ name: '_numBlocks',
159
+ type: 'uint256',
160
+ },
161
+ ],
162
+ name: 'setOwnershipChangeDelay',
163
+ outputs: [],
164
+ stateMutability: 'nonpayable',
165
+ type: 'function',
166
+ },
167
+ {
168
+ inputs: [],
169
+ name: 'owner',
170
+ outputs: [
171
+ {
172
+ name: '',
173
+ type: 'address',
174
+ },
175
+ ],
176
+ stateMutability: 'view',
177
+ type: 'function',
178
+ },
179
+ {
180
+ inputs: [],
181
+ name: 'pendingOwner',
182
+ outputs: [
183
+ {
184
+ components: [
185
+ {
186
+ name: 'newOwner',
187
+ type: 'address',
188
+ },
189
+ {
190
+ name: 'initiatedBlock',
191
+ type: 'uint256',
192
+ },
193
+ {
194
+ name: 'confirmBlock',
195
+ type: 'uint256',
196
+ },
197
+ ],
198
+ name: '',
199
+ type: 'tuple',
200
+ },
201
+ ],
202
+ stateMutability: 'view',
203
+ type: 'function',
204
+ },
205
+ {
206
+ inputs: [],
207
+ name: 'ownershipChangeDelay',
208
+ outputs: [
209
+ {
210
+ name: '',
211
+ type: 'uint256',
212
+ },
213
+ ],
214
+ stateMutability: 'view',
215
+ type: 'function',
216
+ },
217
+ {
218
+ inputs: [],
219
+ name: 'MIN_OWNER_CHANGE_DELAY',
220
+ outputs: [
221
+ {
222
+ name: '',
223
+ type: 'uint256',
224
+ },
225
+ ],
226
+ stateMutability: 'view',
227
+ type: 'function',
228
+ },
229
+ {
230
+ inputs: [],
231
+ name: 'MAX_OWNER_CHANGE_DELAY',
232
+ outputs: [
233
+ {
234
+ name: '',
235
+ type: 'uint256',
236
+ },
237
+ ],
238
+ stateMutability: 'view',
239
+ type: 'function',
240
+ },
241
+ {
242
+ inputs: [],
243
+ name: '_ADDY_REGISTRY',
244
+ outputs: [
245
+ {
246
+ name: '',
247
+ type: 'address',
248
+ },
249
+ ],
250
+ stateMutability: 'view',
251
+ type: 'function',
252
+ },
253
+ {
254
+ inputs: [],
255
+ name: 'apiVersion',
256
+ outputs: [
257
+ {
258
+ name: '',
259
+ type: 'string',
260
+ },
261
+ ],
262
+ stateMutability: 'pure',
263
+ type: 'function',
264
+ },
265
+ {
266
+ inputs: [
267
+ {
268
+ name: '_userWallet',
269
+ type: 'address',
270
+ },
271
+ {
272
+ name: '_legoId',
273
+ type: 'uint256',
274
+ },
275
+ {
276
+ name: '_asset',
277
+ type: 'address',
278
+ },
279
+ {
280
+ name: '_vault',
281
+ type: 'address',
282
+ },
283
+ ],
284
+ name: 'depositTokens',
285
+ outputs: [
286
+ {
287
+ name: '',
288
+ type: 'uint256',
289
+ },
290
+ {
291
+ name: '',
292
+ type: 'address',
293
+ },
294
+ {
295
+ name: '',
296
+ type: 'uint256',
297
+ },
298
+ {
299
+ name: '',
300
+ type: 'uint256',
301
+ },
302
+ ],
303
+ stateMutability: 'nonpayable',
304
+ type: 'function',
305
+ },
306
+ {
307
+ inputs: [
308
+ {
309
+ name: '_userWallet',
310
+ type: 'address',
311
+ },
312
+ {
313
+ name: '_legoId',
314
+ type: 'uint256',
315
+ },
316
+ {
317
+ name: '_asset',
318
+ type: 'address',
319
+ },
320
+ {
321
+ name: '_vault',
322
+ type: 'address',
323
+ },
324
+ {
325
+ name: '_amount',
326
+ type: 'uint256',
327
+ },
328
+ ],
329
+ name: 'depositTokens',
330
+ outputs: [
331
+ {
332
+ name: '',
333
+ type: 'uint256',
334
+ },
335
+ {
336
+ name: '',
337
+ type: 'address',
338
+ },
339
+ {
340
+ name: '',
341
+ type: 'uint256',
342
+ },
343
+ {
344
+ name: '',
345
+ type: 'uint256',
346
+ },
347
+ ],
348
+ stateMutability: 'nonpayable',
349
+ type: 'function',
350
+ },
351
+ {
352
+ inputs: [
353
+ {
354
+ name: '_userWallet',
355
+ type: 'address',
356
+ },
357
+ {
358
+ name: '_legoId',
359
+ type: 'uint256',
360
+ },
361
+ {
362
+ name: '_asset',
363
+ type: 'address',
364
+ },
365
+ {
366
+ name: '_vault',
367
+ type: 'address',
368
+ },
369
+ {
370
+ name: '_amount',
371
+ type: 'uint256',
372
+ },
373
+ {
374
+ components: [
375
+ {
376
+ name: 'signature',
377
+ type: 'bytes',
378
+ },
379
+ {
380
+ name: 'signer',
381
+ type: 'address',
382
+ },
383
+ {
384
+ name: 'expiration',
385
+ type: 'uint256',
386
+ },
387
+ ],
388
+ name: '_sig',
389
+ type: 'tuple',
390
+ },
391
+ ],
392
+ name: 'depositTokens',
393
+ outputs: [
394
+ {
395
+ name: '',
396
+ type: 'uint256',
397
+ },
398
+ {
399
+ name: '',
400
+ type: 'address',
401
+ },
402
+ {
403
+ name: '',
404
+ type: 'uint256',
405
+ },
406
+ {
407
+ name: '',
408
+ type: 'uint256',
409
+ },
410
+ ],
411
+ stateMutability: 'nonpayable',
412
+ type: 'function',
413
+ },
414
+ {
415
+ inputs: [
416
+ {
417
+ name: '_userWallet',
418
+ type: 'address',
419
+ },
420
+ {
421
+ name: '_legoId',
422
+ type: 'uint256',
423
+ },
424
+ {
425
+ name: '_asset',
426
+ type: 'address',
427
+ },
428
+ {
429
+ name: '_vaultToken',
430
+ type: 'address',
431
+ },
432
+ ],
433
+ name: 'withdrawTokens',
434
+ outputs: [
435
+ {
436
+ name: '',
437
+ type: 'uint256',
438
+ },
439
+ {
440
+ name: '',
441
+ type: 'uint256',
442
+ },
443
+ {
444
+ name: '',
445
+ type: 'uint256',
446
+ },
447
+ ],
448
+ stateMutability: 'nonpayable',
449
+ type: 'function',
450
+ },
451
+ {
452
+ inputs: [
453
+ {
454
+ name: '_userWallet',
455
+ type: 'address',
456
+ },
457
+ {
458
+ name: '_legoId',
459
+ type: 'uint256',
460
+ },
461
+ {
462
+ name: '_asset',
463
+ type: 'address',
464
+ },
465
+ {
466
+ name: '_vaultToken',
467
+ type: 'address',
468
+ },
469
+ {
470
+ name: '_vaultTokenAmount',
471
+ type: 'uint256',
472
+ },
473
+ ],
474
+ name: 'withdrawTokens',
475
+ outputs: [
476
+ {
477
+ name: '',
478
+ type: 'uint256',
479
+ },
480
+ {
481
+ name: '',
482
+ type: 'uint256',
483
+ },
484
+ {
485
+ name: '',
486
+ type: 'uint256',
487
+ },
488
+ ],
489
+ stateMutability: 'nonpayable',
490
+ type: 'function',
491
+ },
492
+ {
493
+ inputs: [
494
+ {
495
+ name: '_userWallet',
496
+ type: 'address',
497
+ },
498
+ {
499
+ name: '_legoId',
500
+ type: 'uint256',
501
+ },
502
+ {
503
+ name: '_asset',
504
+ type: 'address',
505
+ },
506
+ {
507
+ name: '_vaultToken',
508
+ type: 'address',
509
+ },
510
+ {
511
+ name: '_vaultTokenAmount',
512
+ type: 'uint256',
513
+ },
514
+ {
515
+ components: [
516
+ {
517
+ name: 'signature',
518
+ type: 'bytes',
519
+ },
520
+ {
521
+ name: 'signer',
522
+ type: 'address',
523
+ },
524
+ {
525
+ name: 'expiration',
526
+ type: 'uint256',
527
+ },
528
+ ],
529
+ name: '_sig',
530
+ type: 'tuple',
531
+ },
532
+ ],
533
+ name: 'withdrawTokens',
534
+ outputs: [
535
+ {
536
+ name: '',
537
+ type: 'uint256',
538
+ },
539
+ {
540
+ name: '',
541
+ type: 'uint256',
542
+ },
543
+ {
544
+ name: '',
545
+ type: 'uint256',
546
+ },
547
+ ],
548
+ stateMutability: 'nonpayable',
549
+ type: 'function',
550
+ },
551
+ {
552
+ inputs: [
553
+ {
554
+ name: '_userWallet',
555
+ type: 'address',
556
+ },
557
+ {
558
+ name: '_fromLegoId',
559
+ type: 'uint256',
560
+ },
561
+ {
562
+ name: '_fromAsset',
563
+ type: 'address',
564
+ },
565
+ {
566
+ name: '_fromVaultToken',
567
+ type: 'address',
568
+ },
569
+ {
570
+ name: '_toLegoId',
571
+ type: 'uint256',
572
+ },
573
+ {
574
+ name: '_toVault',
575
+ type: 'address',
576
+ },
577
+ ],
578
+ name: 'rebalance',
579
+ outputs: [
580
+ {
581
+ name: '',
582
+ type: 'uint256',
583
+ },
584
+ {
585
+ name: '',
586
+ type: 'address',
587
+ },
588
+ {
589
+ name: '',
590
+ type: 'uint256',
591
+ },
592
+ {
593
+ name: '',
594
+ type: 'uint256',
595
+ },
596
+ ],
597
+ stateMutability: 'nonpayable',
598
+ type: 'function',
599
+ },
600
+ {
601
+ inputs: [
602
+ {
603
+ name: '_userWallet',
604
+ type: 'address',
605
+ },
606
+ {
607
+ name: '_fromLegoId',
608
+ type: 'uint256',
609
+ },
610
+ {
611
+ name: '_fromAsset',
612
+ type: 'address',
613
+ },
614
+ {
615
+ name: '_fromVaultToken',
616
+ type: 'address',
617
+ },
618
+ {
619
+ name: '_toLegoId',
620
+ type: 'uint256',
621
+ },
622
+ {
623
+ name: '_toVault',
624
+ type: 'address',
625
+ },
626
+ {
627
+ name: '_fromVaultTokenAmount',
628
+ type: 'uint256',
629
+ },
630
+ ],
631
+ name: 'rebalance',
632
+ outputs: [
633
+ {
634
+ name: '',
635
+ type: 'uint256',
636
+ },
637
+ {
638
+ name: '',
639
+ type: 'address',
640
+ },
641
+ {
642
+ name: '',
643
+ type: 'uint256',
644
+ },
645
+ {
646
+ name: '',
647
+ type: 'uint256',
648
+ },
649
+ ],
650
+ stateMutability: 'nonpayable',
651
+ type: 'function',
652
+ },
653
+ {
654
+ inputs: [
655
+ {
656
+ name: '_userWallet',
657
+ type: 'address',
658
+ },
659
+ {
660
+ name: '_fromLegoId',
661
+ type: 'uint256',
662
+ },
663
+ {
664
+ name: '_fromAsset',
665
+ type: 'address',
666
+ },
667
+ {
668
+ name: '_fromVaultToken',
669
+ type: 'address',
670
+ },
671
+ {
672
+ name: '_toLegoId',
673
+ type: 'uint256',
674
+ },
675
+ {
676
+ name: '_toVault',
677
+ type: 'address',
678
+ },
679
+ {
680
+ name: '_fromVaultTokenAmount',
681
+ type: 'uint256',
682
+ },
683
+ {
684
+ components: [
685
+ {
686
+ name: 'signature',
687
+ type: 'bytes',
688
+ },
689
+ {
690
+ name: 'signer',
691
+ type: 'address',
692
+ },
693
+ {
694
+ name: 'expiration',
695
+ type: 'uint256',
696
+ },
697
+ ],
698
+ name: '_sig',
699
+ type: 'tuple',
700
+ },
701
+ ],
702
+ name: 'rebalance',
703
+ outputs: [
704
+ {
705
+ name: '',
706
+ type: 'uint256',
707
+ },
708
+ {
709
+ name: '',
710
+ type: 'address',
711
+ },
712
+ {
713
+ name: '',
714
+ type: 'uint256',
715
+ },
716
+ {
717
+ name: '',
718
+ type: 'uint256',
719
+ },
720
+ ],
721
+ stateMutability: 'nonpayable',
722
+ type: 'function',
723
+ },
724
+ {
725
+ inputs: [
726
+ {
727
+ name: '_userWallet',
728
+ type: 'address',
729
+ },
730
+ {
731
+ components: [
732
+ {
733
+ name: 'legoId',
734
+ type: 'uint256',
735
+ },
736
+ {
737
+ name: 'amountIn',
738
+ type: 'uint256',
739
+ },
740
+ {
741
+ name: 'minAmountOut',
742
+ type: 'uint256',
743
+ },
744
+ {
745
+ name: 'tokenPath',
746
+ type: 'address[]',
747
+ },
748
+ {
749
+ name: 'poolPath',
750
+ type: 'address[]',
751
+ },
752
+ ],
753
+ name: '_swapInstructions',
754
+ type: 'tuple[]',
755
+ },
756
+ ],
757
+ name: 'swapTokens',
758
+ outputs: [
759
+ {
760
+ name: '',
761
+ type: 'uint256',
762
+ },
763
+ {
764
+ name: '',
765
+ type: 'uint256',
766
+ },
767
+ {
768
+ name: '',
769
+ type: 'uint256',
770
+ },
771
+ ],
772
+ stateMutability: 'nonpayable',
773
+ type: 'function',
774
+ },
775
+ {
776
+ inputs: [
777
+ {
778
+ name: '_userWallet',
779
+ type: 'address',
780
+ },
781
+ {
782
+ components: [
783
+ {
784
+ name: 'legoId',
785
+ type: 'uint256',
786
+ },
787
+ {
788
+ name: 'amountIn',
789
+ type: 'uint256',
790
+ },
791
+ {
792
+ name: 'minAmountOut',
793
+ type: 'uint256',
794
+ },
795
+ {
796
+ name: 'tokenPath',
797
+ type: 'address[]',
798
+ },
799
+ {
800
+ name: 'poolPath',
801
+ type: 'address[]',
802
+ },
803
+ ],
804
+ name: '_swapInstructions',
805
+ type: 'tuple[]',
806
+ },
807
+ {
808
+ components: [
809
+ {
810
+ name: 'signature',
811
+ type: 'bytes',
812
+ },
813
+ {
814
+ name: 'signer',
815
+ type: 'address',
816
+ },
817
+ {
818
+ name: 'expiration',
819
+ type: 'uint256',
820
+ },
821
+ ],
822
+ name: '_sig',
823
+ type: 'tuple',
824
+ },
825
+ ],
826
+ name: 'swapTokens',
827
+ outputs: [
828
+ {
829
+ name: '',
830
+ type: 'uint256',
831
+ },
832
+ {
833
+ name: '',
834
+ type: 'uint256',
835
+ },
836
+ {
837
+ name: '',
838
+ type: 'uint256',
839
+ },
840
+ ],
841
+ stateMutability: 'nonpayable',
842
+ type: 'function',
843
+ },
844
+ {
845
+ inputs: [
846
+ {
847
+ name: '_userWallet',
848
+ type: 'address',
849
+ },
850
+ {
851
+ components: [
852
+ {
853
+ name: 'legoId',
854
+ type: 'uint256',
855
+ },
856
+ {
857
+ name: 'amountIn',
858
+ type: 'uint256',
859
+ },
860
+ {
861
+ name: 'minAmountOut',
862
+ type: 'uint256',
863
+ },
864
+ {
865
+ name: 'tokenPath',
866
+ type: 'address[]',
867
+ },
868
+ {
869
+ name: 'poolPath',
870
+ type: 'address[]',
871
+ },
872
+ ],
873
+ name: '_swapInstructions',
874
+ type: 'tuple[]',
875
+ },
876
+ {
877
+ name: '_expiration',
878
+ type: 'uint256',
879
+ },
880
+ ],
881
+ name: 'getSwapActionHash',
882
+ outputs: [
883
+ {
884
+ name: '',
885
+ type: 'bytes32',
886
+ },
887
+ ],
888
+ stateMutability: 'view',
889
+ type: 'function',
890
+ },
891
+ {
892
+ inputs: [
893
+ {
894
+ name: '_userWallet',
895
+ type: 'address',
896
+ },
897
+ {
898
+ name: '_legoId',
899
+ type: 'uint256',
900
+ },
901
+ ],
902
+ name: 'borrow',
903
+ outputs: [
904
+ {
905
+ name: '',
906
+ type: 'address',
907
+ },
908
+ {
909
+ name: '',
910
+ type: 'uint256',
911
+ },
912
+ {
913
+ name: '',
914
+ type: 'uint256',
915
+ },
916
+ ],
917
+ stateMutability: 'nonpayable',
918
+ type: 'function',
919
+ },
920
+ {
921
+ inputs: [
922
+ {
923
+ name: '_userWallet',
924
+ type: 'address',
925
+ },
926
+ {
927
+ name: '_legoId',
928
+ type: 'uint256',
929
+ },
930
+ {
931
+ name: '_borrowAsset',
932
+ type: 'address',
933
+ },
934
+ ],
935
+ name: 'borrow',
936
+ outputs: [
937
+ {
938
+ name: '',
939
+ type: 'address',
940
+ },
941
+ {
942
+ name: '',
943
+ type: 'uint256',
944
+ },
945
+ {
946
+ name: '',
947
+ type: 'uint256',
948
+ },
949
+ ],
950
+ stateMutability: 'nonpayable',
951
+ type: 'function',
952
+ },
953
+ {
954
+ inputs: [
955
+ {
956
+ name: '_userWallet',
957
+ type: 'address',
958
+ },
959
+ {
960
+ name: '_legoId',
961
+ type: 'uint256',
962
+ },
963
+ {
964
+ name: '_borrowAsset',
965
+ type: 'address',
966
+ },
967
+ {
968
+ name: '_amount',
969
+ type: 'uint256',
970
+ },
971
+ ],
972
+ name: 'borrow',
973
+ outputs: [
974
+ {
975
+ name: '',
976
+ type: 'address',
977
+ },
978
+ {
979
+ name: '',
980
+ type: 'uint256',
981
+ },
982
+ {
983
+ name: '',
984
+ type: 'uint256',
985
+ },
986
+ ],
987
+ stateMutability: 'nonpayable',
988
+ type: 'function',
989
+ },
990
+ {
991
+ inputs: [
992
+ {
993
+ name: '_userWallet',
994
+ type: 'address',
995
+ },
996
+ {
997
+ name: '_legoId',
998
+ type: 'uint256',
999
+ },
1000
+ {
1001
+ name: '_borrowAsset',
1002
+ type: 'address',
1003
+ },
1004
+ {
1005
+ name: '_amount',
1006
+ type: 'uint256',
1007
+ },
1008
+ {
1009
+ components: [
1010
+ {
1011
+ name: 'signature',
1012
+ type: 'bytes',
1013
+ },
1014
+ {
1015
+ name: 'signer',
1016
+ type: 'address',
1017
+ },
1018
+ {
1019
+ name: 'expiration',
1020
+ type: 'uint256',
1021
+ },
1022
+ ],
1023
+ name: '_sig',
1024
+ type: 'tuple',
1025
+ },
1026
+ ],
1027
+ name: 'borrow',
1028
+ outputs: [
1029
+ {
1030
+ name: '',
1031
+ type: 'address',
1032
+ },
1033
+ {
1034
+ name: '',
1035
+ type: 'uint256',
1036
+ },
1037
+ {
1038
+ name: '',
1039
+ type: 'uint256',
1040
+ },
1041
+ ],
1042
+ stateMutability: 'nonpayable',
1043
+ type: 'function',
1044
+ },
1045
+ {
1046
+ inputs: [
1047
+ {
1048
+ name: '_userWallet',
1049
+ type: 'address',
1050
+ },
1051
+ {
1052
+ name: '_legoId',
1053
+ type: 'uint256',
1054
+ },
1055
+ {
1056
+ name: '_paymentAsset',
1057
+ type: 'address',
1058
+ },
1059
+ ],
1060
+ name: 'repayDebt',
1061
+ outputs: [
1062
+ {
1063
+ name: '',
1064
+ type: 'address',
1065
+ },
1066
+ {
1067
+ name: '',
1068
+ type: 'uint256',
1069
+ },
1070
+ {
1071
+ name: '',
1072
+ type: 'uint256',
1073
+ },
1074
+ {
1075
+ name: '',
1076
+ type: 'uint256',
1077
+ },
1078
+ ],
1079
+ stateMutability: 'nonpayable',
1080
+ type: 'function',
1081
+ },
1082
+ {
1083
+ inputs: [
1084
+ {
1085
+ name: '_userWallet',
1086
+ type: 'address',
1087
+ },
1088
+ {
1089
+ name: '_legoId',
1090
+ type: 'uint256',
1091
+ },
1092
+ {
1093
+ name: '_paymentAsset',
1094
+ type: 'address',
1095
+ },
1096
+ {
1097
+ name: '_paymentAmount',
1098
+ type: 'uint256',
1099
+ },
1100
+ ],
1101
+ name: 'repayDebt',
1102
+ outputs: [
1103
+ {
1104
+ name: '',
1105
+ type: 'address',
1106
+ },
1107
+ {
1108
+ name: '',
1109
+ type: 'uint256',
1110
+ },
1111
+ {
1112
+ name: '',
1113
+ type: 'uint256',
1114
+ },
1115
+ {
1116
+ name: '',
1117
+ type: 'uint256',
1118
+ },
1119
+ ],
1120
+ stateMutability: 'nonpayable',
1121
+ type: 'function',
1122
+ },
1123
+ {
1124
+ inputs: [
1125
+ {
1126
+ name: '_userWallet',
1127
+ type: 'address',
1128
+ },
1129
+ {
1130
+ name: '_legoId',
1131
+ type: 'uint256',
1132
+ },
1133
+ {
1134
+ name: '_paymentAsset',
1135
+ type: 'address',
1136
+ },
1137
+ {
1138
+ name: '_paymentAmount',
1139
+ type: 'uint256',
1140
+ },
1141
+ {
1142
+ components: [
1143
+ {
1144
+ name: 'signature',
1145
+ type: 'bytes',
1146
+ },
1147
+ {
1148
+ name: 'signer',
1149
+ type: 'address',
1150
+ },
1151
+ {
1152
+ name: 'expiration',
1153
+ type: 'uint256',
1154
+ },
1155
+ ],
1156
+ name: '_sig',
1157
+ type: 'tuple',
1158
+ },
1159
+ ],
1160
+ name: 'repayDebt',
1161
+ outputs: [
1162
+ {
1163
+ name: '',
1164
+ type: 'address',
1165
+ },
1166
+ {
1167
+ name: '',
1168
+ type: 'uint256',
1169
+ },
1170
+ {
1171
+ name: '',
1172
+ type: 'uint256',
1173
+ },
1174
+ {
1175
+ name: '',
1176
+ type: 'uint256',
1177
+ },
1178
+ ],
1179
+ stateMutability: 'nonpayable',
1180
+ type: 'function',
1181
+ },
1182
+ {
1183
+ inputs: [
1184
+ {
1185
+ name: '_userWallet',
1186
+ type: 'address',
1187
+ },
1188
+ {
1189
+ name: '_legoId',
1190
+ type: 'uint256',
1191
+ },
1192
+ ],
1193
+ name: 'claimRewards',
1194
+ outputs: [],
1195
+ stateMutability: 'nonpayable',
1196
+ type: 'function',
1197
+ },
1198
+ {
1199
+ inputs: [
1200
+ {
1201
+ name: '_userWallet',
1202
+ type: 'address',
1203
+ },
1204
+ {
1205
+ name: '_legoId',
1206
+ type: 'uint256',
1207
+ },
1208
+ {
1209
+ name: '_market',
1210
+ type: 'address',
1211
+ },
1212
+ ],
1213
+ name: 'claimRewards',
1214
+ outputs: [],
1215
+ stateMutability: 'nonpayable',
1216
+ type: 'function',
1217
+ },
1218
+ {
1219
+ inputs: [
1220
+ {
1221
+ name: '_userWallet',
1222
+ type: 'address',
1223
+ },
1224
+ {
1225
+ name: '_legoId',
1226
+ type: 'uint256',
1227
+ },
1228
+ {
1229
+ name: '_market',
1230
+ type: 'address',
1231
+ },
1232
+ {
1233
+ name: '_rewardToken',
1234
+ type: 'address',
1235
+ },
1236
+ ],
1237
+ name: 'claimRewards',
1238
+ outputs: [],
1239
+ stateMutability: 'nonpayable',
1240
+ type: 'function',
1241
+ },
1242
+ {
1243
+ inputs: [
1244
+ {
1245
+ name: '_userWallet',
1246
+ type: 'address',
1247
+ },
1248
+ {
1249
+ name: '_legoId',
1250
+ type: 'uint256',
1251
+ },
1252
+ {
1253
+ name: '_market',
1254
+ type: 'address',
1255
+ },
1256
+ {
1257
+ name: '_rewardToken',
1258
+ type: 'address',
1259
+ },
1260
+ {
1261
+ name: '_rewardAmount',
1262
+ type: 'uint256',
1263
+ },
1264
+ ],
1265
+ name: 'claimRewards',
1266
+ outputs: [],
1267
+ stateMutability: 'nonpayable',
1268
+ type: 'function',
1269
+ },
1270
+ {
1271
+ inputs: [
1272
+ {
1273
+ name: '_userWallet',
1274
+ type: 'address',
1275
+ },
1276
+ {
1277
+ name: '_legoId',
1278
+ type: 'uint256',
1279
+ },
1280
+ {
1281
+ name: '_market',
1282
+ type: 'address',
1283
+ },
1284
+ {
1285
+ name: '_rewardToken',
1286
+ type: 'address',
1287
+ },
1288
+ {
1289
+ name: '_rewardAmount',
1290
+ type: 'uint256',
1291
+ },
1292
+ {
1293
+ name: '_proof',
1294
+ type: 'bytes32',
1295
+ },
1296
+ ],
1297
+ name: 'claimRewards',
1298
+ outputs: [],
1299
+ stateMutability: 'nonpayable',
1300
+ type: 'function',
1301
+ },
1302
+ {
1303
+ inputs: [
1304
+ {
1305
+ name: '_userWallet',
1306
+ type: 'address',
1307
+ },
1308
+ {
1309
+ name: '_legoId',
1310
+ type: 'uint256',
1311
+ },
1312
+ {
1313
+ name: '_market',
1314
+ type: 'address',
1315
+ },
1316
+ {
1317
+ name: '_rewardToken',
1318
+ type: 'address',
1319
+ },
1320
+ {
1321
+ name: '_rewardAmount',
1322
+ type: 'uint256',
1323
+ },
1324
+ {
1325
+ name: '_proof',
1326
+ type: 'bytes32',
1327
+ },
1328
+ {
1329
+ components: [
1330
+ {
1331
+ name: 'signature',
1332
+ type: 'bytes',
1333
+ },
1334
+ {
1335
+ name: 'signer',
1336
+ type: 'address',
1337
+ },
1338
+ {
1339
+ name: 'expiration',
1340
+ type: 'uint256',
1341
+ },
1342
+ ],
1343
+ name: '_sig',
1344
+ type: 'tuple',
1345
+ },
1346
+ ],
1347
+ name: 'claimRewards',
1348
+ outputs: [],
1349
+ stateMutability: 'nonpayable',
1350
+ type: 'function',
1351
+ },
1352
+ {
1353
+ inputs: [
1354
+ {
1355
+ name: '_userWallet',
1356
+ type: 'address',
1357
+ },
1358
+ {
1359
+ name: '_legoId',
1360
+ type: 'uint256',
1361
+ },
1362
+ {
1363
+ name: '_nftAddr',
1364
+ type: 'address',
1365
+ },
1366
+ {
1367
+ name: '_nftTokenId',
1368
+ type: 'uint256',
1369
+ },
1370
+ {
1371
+ name: '_pool',
1372
+ type: 'address',
1373
+ },
1374
+ {
1375
+ name: '_tokenA',
1376
+ type: 'address',
1377
+ },
1378
+ {
1379
+ name: '_tokenB',
1380
+ type: 'address',
1381
+ },
1382
+ ],
1383
+ name: 'addLiquidity',
1384
+ outputs: [
1385
+ {
1386
+ name: '',
1387
+ type: 'uint256',
1388
+ },
1389
+ {
1390
+ name: '',
1391
+ type: 'uint256',
1392
+ },
1393
+ {
1394
+ name: '',
1395
+ type: 'uint256',
1396
+ },
1397
+ {
1398
+ name: '',
1399
+ type: 'uint256',
1400
+ },
1401
+ {
1402
+ name: '',
1403
+ type: 'uint256',
1404
+ },
1405
+ ],
1406
+ stateMutability: 'nonpayable',
1407
+ type: 'function',
1408
+ },
1409
+ {
1410
+ inputs: [
1411
+ {
1412
+ name: '_userWallet',
1413
+ type: 'address',
1414
+ },
1415
+ {
1416
+ name: '_legoId',
1417
+ type: 'uint256',
1418
+ },
1419
+ {
1420
+ name: '_nftAddr',
1421
+ type: 'address',
1422
+ },
1423
+ {
1424
+ name: '_nftTokenId',
1425
+ type: 'uint256',
1426
+ },
1427
+ {
1428
+ name: '_pool',
1429
+ type: 'address',
1430
+ },
1431
+ {
1432
+ name: '_tokenA',
1433
+ type: 'address',
1434
+ },
1435
+ {
1436
+ name: '_tokenB',
1437
+ type: 'address',
1438
+ },
1439
+ {
1440
+ name: '_amountA',
1441
+ type: 'uint256',
1442
+ },
1443
+ ],
1444
+ name: 'addLiquidity',
1445
+ outputs: [
1446
+ {
1447
+ name: '',
1448
+ type: 'uint256',
1449
+ },
1450
+ {
1451
+ name: '',
1452
+ type: 'uint256',
1453
+ },
1454
+ {
1455
+ name: '',
1456
+ type: 'uint256',
1457
+ },
1458
+ {
1459
+ name: '',
1460
+ type: 'uint256',
1461
+ },
1462
+ {
1463
+ name: '',
1464
+ type: 'uint256',
1465
+ },
1466
+ ],
1467
+ stateMutability: 'nonpayable',
1468
+ type: 'function',
1469
+ },
1470
+ {
1471
+ inputs: [
1472
+ {
1473
+ name: '_userWallet',
1474
+ type: 'address',
1475
+ },
1476
+ {
1477
+ name: '_legoId',
1478
+ type: 'uint256',
1479
+ },
1480
+ {
1481
+ name: '_nftAddr',
1482
+ type: 'address',
1483
+ },
1484
+ {
1485
+ name: '_nftTokenId',
1486
+ type: 'uint256',
1487
+ },
1488
+ {
1489
+ name: '_pool',
1490
+ type: 'address',
1491
+ },
1492
+ {
1493
+ name: '_tokenA',
1494
+ type: 'address',
1495
+ },
1496
+ {
1497
+ name: '_tokenB',
1498
+ type: 'address',
1499
+ },
1500
+ {
1501
+ name: '_amountA',
1502
+ type: 'uint256',
1503
+ },
1504
+ {
1505
+ name: '_amountB',
1506
+ type: 'uint256',
1507
+ },
1508
+ ],
1509
+ name: 'addLiquidity',
1510
+ outputs: [
1511
+ {
1512
+ name: '',
1513
+ type: 'uint256',
1514
+ },
1515
+ {
1516
+ name: '',
1517
+ type: 'uint256',
1518
+ },
1519
+ {
1520
+ name: '',
1521
+ type: 'uint256',
1522
+ },
1523
+ {
1524
+ name: '',
1525
+ type: 'uint256',
1526
+ },
1527
+ {
1528
+ name: '',
1529
+ type: 'uint256',
1530
+ },
1531
+ ],
1532
+ stateMutability: 'nonpayable',
1533
+ type: 'function',
1534
+ },
1535
+ {
1536
+ inputs: [
1537
+ {
1538
+ name: '_userWallet',
1539
+ type: 'address',
1540
+ },
1541
+ {
1542
+ name: '_legoId',
1543
+ type: 'uint256',
1544
+ },
1545
+ {
1546
+ name: '_nftAddr',
1547
+ type: 'address',
1548
+ },
1549
+ {
1550
+ name: '_nftTokenId',
1551
+ type: 'uint256',
1552
+ },
1553
+ {
1554
+ name: '_pool',
1555
+ type: 'address',
1556
+ },
1557
+ {
1558
+ name: '_tokenA',
1559
+ type: 'address',
1560
+ },
1561
+ {
1562
+ name: '_tokenB',
1563
+ type: 'address',
1564
+ },
1565
+ {
1566
+ name: '_amountA',
1567
+ type: 'uint256',
1568
+ },
1569
+ {
1570
+ name: '_amountB',
1571
+ type: 'uint256',
1572
+ },
1573
+ {
1574
+ name: '_tickLower',
1575
+ type: 'int24',
1576
+ },
1577
+ ],
1578
+ name: 'addLiquidity',
1579
+ outputs: [
1580
+ {
1581
+ name: '',
1582
+ type: 'uint256',
1583
+ },
1584
+ {
1585
+ name: '',
1586
+ type: 'uint256',
1587
+ },
1588
+ {
1589
+ name: '',
1590
+ type: 'uint256',
1591
+ },
1592
+ {
1593
+ name: '',
1594
+ type: 'uint256',
1595
+ },
1596
+ {
1597
+ name: '',
1598
+ type: 'uint256',
1599
+ },
1600
+ ],
1601
+ stateMutability: 'nonpayable',
1602
+ type: 'function',
1603
+ },
1604
+ {
1605
+ inputs: [
1606
+ {
1607
+ name: '_userWallet',
1608
+ type: 'address',
1609
+ },
1610
+ {
1611
+ name: '_legoId',
1612
+ type: 'uint256',
1613
+ },
1614
+ {
1615
+ name: '_nftAddr',
1616
+ type: 'address',
1617
+ },
1618
+ {
1619
+ name: '_nftTokenId',
1620
+ type: 'uint256',
1621
+ },
1622
+ {
1623
+ name: '_pool',
1624
+ type: 'address',
1625
+ },
1626
+ {
1627
+ name: '_tokenA',
1628
+ type: 'address',
1629
+ },
1630
+ {
1631
+ name: '_tokenB',
1632
+ type: 'address',
1633
+ },
1634
+ {
1635
+ name: '_amountA',
1636
+ type: 'uint256',
1637
+ },
1638
+ {
1639
+ name: '_amountB',
1640
+ type: 'uint256',
1641
+ },
1642
+ {
1643
+ name: '_tickLower',
1644
+ type: 'int24',
1645
+ },
1646
+ {
1647
+ name: '_tickUpper',
1648
+ type: 'int24',
1649
+ },
1650
+ ],
1651
+ name: 'addLiquidity',
1652
+ outputs: [
1653
+ {
1654
+ name: '',
1655
+ type: 'uint256',
1656
+ },
1657
+ {
1658
+ name: '',
1659
+ type: 'uint256',
1660
+ },
1661
+ {
1662
+ name: '',
1663
+ type: 'uint256',
1664
+ },
1665
+ {
1666
+ name: '',
1667
+ type: 'uint256',
1668
+ },
1669
+ {
1670
+ name: '',
1671
+ type: 'uint256',
1672
+ },
1673
+ ],
1674
+ stateMutability: 'nonpayable',
1675
+ type: 'function',
1676
+ },
1677
+ {
1678
+ inputs: [
1679
+ {
1680
+ name: '_userWallet',
1681
+ type: 'address',
1682
+ },
1683
+ {
1684
+ name: '_legoId',
1685
+ type: 'uint256',
1686
+ },
1687
+ {
1688
+ name: '_nftAddr',
1689
+ type: 'address',
1690
+ },
1691
+ {
1692
+ name: '_nftTokenId',
1693
+ type: 'uint256',
1694
+ },
1695
+ {
1696
+ name: '_pool',
1697
+ type: 'address',
1698
+ },
1699
+ {
1700
+ name: '_tokenA',
1701
+ type: 'address',
1702
+ },
1703
+ {
1704
+ name: '_tokenB',
1705
+ type: 'address',
1706
+ },
1707
+ {
1708
+ name: '_amountA',
1709
+ type: 'uint256',
1710
+ },
1711
+ {
1712
+ name: '_amountB',
1713
+ type: 'uint256',
1714
+ },
1715
+ {
1716
+ name: '_tickLower',
1717
+ type: 'int24',
1718
+ },
1719
+ {
1720
+ name: '_tickUpper',
1721
+ type: 'int24',
1722
+ },
1723
+ {
1724
+ name: '_minAmountA',
1725
+ type: 'uint256',
1726
+ },
1727
+ ],
1728
+ name: 'addLiquidity',
1729
+ outputs: [
1730
+ {
1731
+ name: '',
1732
+ type: 'uint256',
1733
+ },
1734
+ {
1735
+ name: '',
1736
+ type: 'uint256',
1737
+ },
1738
+ {
1739
+ name: '',
1740
+ type: 'uint256',
1741
+ },
1742
+ {
1743
+ name: '',
1744
+ type: 'uint256',
1745
+ },
1746
+ {
1747
+ name: '',
1748
+ type: 'uint256',
1749
+ },
1750
+ ],
1751
+ stateMutability: 'nonpayable',
1752
+ type: 'function',
1753
+ },
1754
+ {
1755
+ inputs: [
1756
+ {
1757
+ name: '_userWallet',
1758
+ type: 'address',
1759
+ },
1760
+ {
1761
+ name: '_legoId',
1762
+ type: 'uint256',
1763
+ },
1764
+ {
1765
+ name: '_nftAddr',
1766
+ type: 'address',
1767
+ },
1768
+ {
1769
+ name: '_nftTokenId',
1770
+ type: 'uint256',
1771
+ },
1772
+ {
1773
+ name: '_pool',
1774
+ type: 'address',
1775
+ },
1776
+ {
1777
+ name: '_tokenA',
1778
+ type: 'address',
1779
+ },
1780
+ {
1781
+ name: '_tokenB',
1782
+ type: 'address',
1783
+ },
1784
+ {
1785
+ name: '_amountA',
1786
+ type: 'uint256',
1787
+ },
1788
+ {
1789
+ name: '_amountB',
1790
+ type: 'uint256',
1791
+ },
1792
+ {
1793
+ name: '_tickLower',
1794
+ type: 'int24',
1795
+ },
1796
+ {
1797
+ name: '_tickUpper',
1798
+ type: 'int24',
1799
+ },
1800
+ {
1801
+ name: '_minAmountA',
1802
+ type: 'uint256',
1803
+ },
1804
+ {
1805
+ name: '_minAmountB',
1806
+ type: 'uint256',
1807
+ },
1808
+ ],
1809
+ name: 'addLiquidity',
1810
+ outputs: [
1811
+ {
1812
+ name: '',
1813
+ type: 'uint256',
1814
+ },
1815
+ {
1816
+ name: '',
1817
+ type: 'uint256',
1818
+ },
1819
+ {
1820
+ name: '',
1821
+ type: 'uint256',
1822
+ },
1823
+ {
1824
+ name: '',
1825
+ type: 'uint256',
1826
+ },
1827
+ {
1828
+ name: '',
1829
+ type: 'uint256',
1830
+ },
1831
+ ],
1832
+ stateMutability: 'nonpayable',
1833
+ type: 'function',
1834
+ },
1835
+ {
1836
+ inputs: [
1837
+ {
1838
+ name: '_userWallet',
1839
+ type: 'address',
1840
+ },
1841
+ {
1842
+ name: '_legoId',
1843
+ type: 'uint256',
1844
+ },
1845
+ {
1846
+ name: '_nftAddr',
1847
+ type: 'address',
1848
+ },
1849
+ {
1850
+ name: '_nftTokenId',
1851
+ type: 'uint256',
1852
+ },
1853
+ {
1854
+ name: '_pool',
1855
+ type: 'address',
1856
+ },
1857
+ {
1858
+ name: '_tokenA',
1859
+ type: 'address',
1860
+ },
1861
+ {
1862
+ name: '_tokenB',
1863
+ type: 'address',
1864
+ },
1865
+ {
1866
+ name: '_amountA',
1867
+ type: 'uint256',
1868
+ },
1869
+ {
1870
+ name: '_amountB',
1871
+ type: 'uint256',
1872
+ },
1873
+ {
1874
+ name: '_tickLower',
1875
+ type: 'int24',
1876
+ },
1877
+ {
1878
+ name: '_tickUpper',
1879
+ type: 'int24',
1880
+ },
1881
+ {
1882
+ name: '_minAmountA',
1883
+ type: 'uint256',
1884
+ },
1885
+ {
1886
+ name: '_minAmountB',
1887
+ type: 'uint256',
1888
+ },
1889
+ {
1890
+ name: '_minLpAmount',
1891
+ type: 'uint256',
1892
+ },
1893
+ ],
1894
+ name: 'addLiquidity',
1895
+ outputs: [
1896
+ {
1897
+ name: '',
1898
+ type: 'uint256',
1899
+ },
1900
+ {
1901
+ name: '',
1902
+ type: 'uint256',
1903
+ },
1904
+ {
1905
+ name: '',
1906
+ type: 'uint256',
1907
+ },
1908
+ {
1909
+ name: '',
1910
+ type: 'uint256',
1911
+ },
1912
+ {
1913
+ name: '',
1914
+ type: 'uint256',
1915
+ },
1916
+ ],
1917
+ stateMutability: 'nonpayable',
1918
+ type: 'function',
1919
+ },
1920
+ {
1921
+ inputs: [
1922
+ {
1923
+ name: '_userWallet',
1924
+ type: 'address',
1925
+ },
1926
+ {
1927
+ name: '_legoId',
1928
+ type: 'uint256',
1929
+ },
1930
+ {
1931
+ name: '_nftAddr',
1932
+ type: 'address',
1933
+ },
1934
+ {
1935
+ name: '_nftTokenId',
1936
+ type: 'uint256',
1937
+ },
1938
+ {
1939
+ name: '_pool',
1940
+ type: 'address',
1941
+ },
1942
+ {
1943
+ name: '_tokenA',
1944
+ type: 'address',
1945
+ },
1946
+ {
1947
+ name: '_tokenB',
1948
+ type: 'address',
1949
+ },
1950
+ {
1951
+ name: '_amountA',
1952
+ type: 'uint256',
1953
+ },
1954
+ {
1955
+ name: '_amountB',
1956
+ type: 'uint256',
1957
+ },
1958
+ {
1959
+ name: '_tickLower',
1960
+ type: 'int24',
1961
+ },
1962
+ {
1963
+ name: '_tickUpper',
1964
+ type: 'int24',
1965
+ },
1966
+ {
1967
+ name: '_minAmountA',
1968
+ type: 'uint256',
1969
+ },
1970
+ {
1971
+ name: '_minAmountB',
1972
+ type: 'uint256',
1973
+ },
1974
+ {
1975
+ name: '_minLpAmount',
1976
+ type: 'uint256',
1977
+ },
1978
+ {
1979
+ components: [
1980
+ {
1981
+ name: 'signature',
1982
+ type: 'bytes',
1983
+ },
1984
+ {
1985
+ name: 'signer',
1986
+ type: 'address',
1987
+ },
1988
+ {
1989
+ name: 'expiration',
1990
+ type: 'uint256',
1991
+ },
1992
+ ],
1993
+ name: '_sig',
1994
+ type: 'tuple',
1995
+ },
1996
+ ],
1997
+ name: 'addLiquidity',
1998
+ outputs: [
1999
+ {
2000
+ name: '',
2001
+ type: 'uint256',
2002
+ },
2003
+ {
2004
+ name: '',
2005
+ type: 'uint256',
2006
+ },
2007
+ {
2008
+ name: '',
2009
+ type: 'uint256',
2010
+ },
2011
+ {
2012
+ name: '',
2013
+ type: 'uint256',
2014
+ },
2015
+ {
2016
+ name: '',
2017
+ type: 'uint256',
2018
+ },
2019
+ ],
2020
+ stateMutability: 'nonpayable',
2021
+ type: 'function',
2022
+ },
2023
+ {
2024
+ inputs: [
2025
+ {
2026
+ name: '_userWallet',
2027
+ type: 'address',
2028
+ },
2029
+ {
2030
+ name: '_legoId',
2031
+ type: 'uint256',
2032
+ },
2033
+ {
2034
+ name: '_nftAddr',
2035
+ type: 'address',
2036
+ },
2037
+ {
2038
+ name: '_nftTokenId',
2039
+ type: 'uint256',
2040
+ },
2041
+ {
2042
+ name: '_pool',
2043
+ type: 'address',
2044
+ },
2045
+ {
2046
+ name: '_tokenA',
2047
+ type: 'address',
2048
+ },
2049
+ {
2050
+ name: '_tokenB',
2051
+ type: 'address',
2052
+ },
2053
+ ],
2054
+ name: 'removeLiquidity',
2055
+ outputs: [
2056
+ {
2057
+ name: '',
2058
+ type: 'uint256',
2059
+ },
2060
+ {
2061
+ name: '',
2062
+ type: 'uint256',
2063
+ },
2064
+ {
2065
+ name: '',
2066
+ type: 'uint256',
2067
+ },
2068
+ {
2069
+ name: '',
2070
+ type: 'bool',
2071
+ },
2072
+ ],
2073
+ stateMutability: 'nonpayable',
2074
+ type: 'function',
2075
+ },
2076
+ {
2077
+ inputs: [
2078
+ {
2079
+ name: '_userWallet',
2080
+ type: 'address',
2081
+ },
2082
+ {
2083
+ name: '_legoId',
2084
+ type: 'uint256',
2085
+ },
2086
+ {
2087
+ name: '_nftAddr',
2088
+ type: 'address',
2089
+ },
2090
+ {
2091
+ name: '_nftTokenId',
2092
+ type: 'uint256',
2093
+ },
2094
+ {
2095
+ name: '_pool',
2096
+ type: 'address',
2097
+ },
2098
+ {
2099
+ name: '_tokenA',
2100
+ type: 'address',
2101
+ },
2102
+ {
2103
+ name: '_tokenB',
2104
+ type: 'address',
2105
+ },
2106
+ {
2107
+ name: '_liqToRemove',
2108
+ type: 'uint256',
2109
+ },
2110
+ ],
2111
+ name: 'removeLiquidity',
2112
+ outputs: [
2113
+ {
2114
+ name: '',
2115
+ type: 'uint256',
2116
+ },
2117
+ {
2118
+ name: '',
2119
+ type: 'uint256',
2120
+ },
2121
+ {
2122
+ name: '',
2123
+ type: 'uint256',
2124
+ },
2125
+ {
2126
+ name: '',
2127
+ type: 'bool',
2128
+ },
2129
+ ],
2130
+ stateMutability: 'nonpayable',
2131
+ type: 'function',
2132
+ },
2133
+ {
2134
+ inputs: [
2135
+ {
2136
+ name: '_userWallet',
2137
+ type: 'address',
2138
+ },
2139
+ {
2140
+ name: '_legoId',
2141
+ type: 'uint256',
2142
+ },
2143
+ {
2144
+ name: '_nftAddr',
2145
+ type: 'address',
2146
+ },
2147
+ {
2148
+ name: '_nftTokenId',
2149
+ type: 'uint256',
2150
+ },
2151
+ {
2152
+ name: '_pool',
2153
+ type: 'address',
2154
+ },
2155
+ {
2156
+ name: '_tokenA',
2157
+ type: 'address',
2158
+ },
2159
+ {
2160
+ name: '_tokenB',
2161
+ type: 'address',
2162
+ },
2163
+ {
2164
+ name: '_liqToRemove',
2165
+ type: 'uint256',
2166
+ },
2167
+ {
2168
+ name: '_minAmountA',
2169
+ type: 'uint256',
2170
+ },
2171
+ ],
2172
+ name: 'removeLiquidity',
2173
+ outputs: [
2174
+ {
2175
+ name: '',
2176
+ type: 'uint256',
2177
+ },
2178
+ {
2179
+ name: '',
2180
+ type: 'uint256',
2181
+ },
2182
+ {
2183
+ name: '',
2184
+ type: 'uint256',
2185
+ },
2186
+ {
2187
+ name: '',
2188
+ type: 'bool',
2189
+ },
2190
+ ],
2191
+ stateMutability: 'nonpayable',
2192
+ type: 'function',
2193
+ },
2194
+ {
2195
+ inputs: [
2196
+ {
2197
+ name: '_userWallet',
2198
+ type: 'address',
2199
+ },
2200
+ {
2201
+ name: '_legoId',
2202
+ type: 'uint256',
2203
+ },
2204
+ {
2205
+ name: '_nftAddr',
2206
+ type: 'address',
2207
+ },
2208
+ {
2209
+ name: '_nftTokenId',
2210
+ type: 'uint256',
2211
+ },
2212
+ {
2213
+ name: '_pool',
2214
+ type: 'address',
2215
+ },
2216
+ {
2217
+ name: '_tokenA',
2218
+ type: 'address',
2219
+ },
2220
+ {
2221
+ name: '_tokenB',
2222
+ type: 'address',
2223
+ },
2224
+ {
2225
+ name: '_liqToRemove',
2226
+ type: 'uint256',
2227
+ },
2228
+ {
2229
+ name: '_minAmountA',
2230
+ type: 'uint256',
2231
+ },
2232
+ {
2233
+ name: '_minAmountB',
2234
+ type: 'uint256',
2235
+ },
2236
+ ],
2237
+ name: 'removeLiquidity',
2238
+ outputs: [
2239
+ {
2240
+ name: '',
2241
+ type: 'uint256',
2242
+ },
2243
+ {
2244
+ name: '',
2245
+ type: 'uint256',
2246
+ },
2247
+ {
2248
+ name: '',
2249
+ type: 'uint256',
2250
+ },
2251
+ {
2252
+ name: '',
2253
+ type: 'bool',
2254
+ },
2255
+ ],
2256
+ stateMutability: 'nonpayable',
2257
+ type: 'function',
2258
+ },
2259
+ {
2260
+ inputs: [
2261
+ {
2262
+ name: '_userWallet',
2263
+ type: 'address',
2264
+ },
2265
+ {
2266
+ name: '_legoId',
2267
+ type: 'uint256',
2268
+ },
2269
+ {
2270
+ name: '_nftAddr',
2271
+ type: 'address',
2272
+ },
2273
+ {
2274
+ name: '_nftTokenId',
2275
+ type: 'uint256',
2276
+ },
2277
+ {
2278
+ name: '_pool',
2279
+ type: 'address',
2280
+ },
2281
+ {
2282
+ name: '_tokenA',
2283
+ type: 'address',
2284
+ },
2285
+ {
2286
+ name: '_tokenB',
2287
+ type: 'address',
2288
+ },
2289
+ {
2290
+ name: '_liqToRemove',
2291
+ type: 'uint256',
2292
+ },
2293
+ {
2294
+ name: '_minAmountA',
2295
+ type: 'uint256',
2296
+ },
2297
+ {
2298
+ name: '_minAmountB',
2299
+ type: 'uint256',
2300
+ },
2301
+ {
2302
+ components: [
2303
+ {
2304
+ name: 'signature',
2305
+ type: 'bytes',
2306
+ },
2307
+ {
2308
+ name: 'signer',
2309
+ type: 'address',
2310
+ },
2311
+ {
2312
+ name: 'expiration',
2313
+ type: 'uint256',
2314
+ },
2315
+ ],
2316
+ name: '_sig',
2317
+ type: 'tuple',
2318
+ },
2319
+ ],
2320
+ name: 'removeLiquidity',
2321
+ outputs: [
2322
+ {
2323
+ name: '',
2324
+ type: 'uint256',
2325
+ },
2326
+ {
2327
+ name: '',
2328
+ type: 'uint256',
2329
+ },
2330
+ {
2331
+ name: '',
2332
+ type: 'uint256',
2333
+ },
2334
+ {
2335
+ name: '',
2336
+ type: 'bool',
2337
+ },
2338
+ ],
2339
+ stateMutability: 'nonpayable',
2340
+ type: 'function',
2341
+ },
2342
+ {
2343
+ inputs: [
2344
+ {
2345
+ name: '_userWallet',
2346
+ type: 'address',
2347
+ },
2348
+ {
2349
+ name: '_recipient',
2350
+ type: 'address',
2351
+ },
2352
+ ],
2353
+ name: 'transferFunds',
2354
+ outputs: [
2355
+ {
2356
+ name: '',
2357
+ type: 'uint256',
2358
+ },
2359
+ {
2360
+ name: '',
2361
+ type: 'uint256',
2362
+ },
2363
+ ],
2364
+ stateMutability: 'nonpayable',
2365
+ type: 'function',
2366
+ },
2367
+ {
2368
+ inputs: [
2369
+ {
2370
+ name: '_userWallet',
2371
+ type: 'address',
2372
+ },
2373
+ {
2374
+ name: '_recipient',
2375
+ type: 'address',
2376
+ },
2377
+ {
2378
+ name: '_amount',
2379
+ type: 'uint256',
2380
+ },
2381
+ ],
2382
+ name: 'transferFunds',
2383
+ outputs: [
2384
+ {
2385
+ name: '',
2386
+ type: 'uint256',
2387
+ },
2388
+ {
2389
+ name: '',
2390
+ type: 'uint256',
2391
+ },
2392
+ ],
2393
+ stateMutability: 'nonpayable',
2394
+ type: 'function',
2395
+ },
2396
+ {
2397
+ inputs: [
2398
+ {
2399
+ name: '_userWallet',
2400
+ type: 'address',
2401
+ },
2402
+ {
2403
+ name: '_recipient',
2404
+ type: 'address',
2405
+ },
2406
+ {
2407
+ name: '_amount',
2408
+ type: 'uint256',
2409
+ },
2410
+ {
2411
+ name: '_asset',
2412
+ type: 'address',
2413
+ },
2414
+ ],
2415
+ name: 'transferFunds',
2416
+ outputs: [
2417
+ {
2418
+ name: '',
2419
+ type: 'uint256',
2420
+ },
2421
+ {
2422
+ name: '',
2423
+ type: 'uint256',
2424
+ },
2425
+ ],
2426
+ stateMutability: 'nonpayable',
2427
+ type: 'function',
2428
+ },
2429
+ {
2430
+ inputs: [
2431
+ {
2432
+ name: '_userWallet',
2433
+ type: 'address',
2434
+ },
2435
+ {
2436
+ name: '_recipient',
2437
+ type: 'address',
2438
+ },
2439
+ {
2440
+ name: '_amount',
2441
+ type: 'uint256',
2442
+ },
2443
+ {
2444
+ name: '_asset',
2445
+ type: 'address',
2446
+ },
2447
+ {
2448
+ components: [
2449
+ {
2450
+ name: 'signature',
2451
+ type: 'bytes',
2452
+ },
2453
+ {
2454
+ name: 'signer',
2455
+ type: 'address',
2456
+ },
2457
+ {
2458
+ name: 'expiration',
2459
+ type: 'uint256',
2460
+ },
2461
+ ],
2462
+ name: '_sig',
2463
+ type: 'tuple',
2464
+ },
2465
+ ],
2466
+ name: 'transferFunds',
2467
+ outputs: [
2468
+ {
2469
+ name: '',
2470
+ type: 'uint256',
2471
+ },
2472
+ {
2473
+ name: '',
2474
+ type: 'uint256',
2475
+ },
2476
+ ],
2477
+ stateMutability: 'nonpayable',
2478
+ type: 'function',
2479
+ },
2480
+ {
2481
+ inputs: [
2482
+ {
2483
+ name: '_userWallet',
2484
+ type: 'address',
2485
+ },
2486
+ ],
2487
+ name: 'convertEthToWeth',
2488
+ outputs: [
2489
+ {
2490
+ name: '',
2491
+ type: 'uint256',
2492
+ },
2493
+ {
2494
+ name: '',
2495
+ type: 'address',
2496
+ },
2497
+ {
2498
+ name: '',
2499
+ type: 'uint256',
2500
+ },
2501
+ ],
2502
+ stateMutability: 'nonpayable',
2503
+ type: 'function',
2504
+ },
2505
+ {
2506
+ inputs: [
2507
+ {
2508
+ name: '_userWallet',
2509
+ type: 'address',
2510
+ },
2511
+ {
2512
+ name: '_amount',
2513
+ type: 'uint256',
2514
+ },
2515
+ ],
2516
+ name: 'convertEthToWeth',
2517
+ outputs: [
2518
+ {
2519
+ name: '',
2520
+ type: 'uint256',
2521
+ },
2522
+ {
2523
+ name: '',
2524
+ type: 'address',
2525
+ },
2526
+ {
2527
+ name: '',
2528
+ type: 'uint256',
2529
+ },
2530
+ ],
2531
+ stateMutability: 'nonpayable',
2532
+ type: 'function',
2533
+ },
2534
+ {
2535
+ inputs: [
2536
+ {
2537
+ name: '_userWallet',
2538
+ type: 'address',
2539
+ },
2540
+ {
2541
+ name: '_amount',
2542
+ type: 'uint256',
2543
+ },
2544
+ {
2545
+ name: '_depositLegoId',
2546
+ type: 'uint256',
2547
+ },
2548
+ ],
2549
+ name: 'convertEthToWeth',
2550
+ outputs: [
2551
+ {
2552
+ name: '',
2553
+ type: 'uint256',
2554
+ },
2555
+ {
2556
+ name: '',
2557
+ type: 'address',
2558
+ },
2559
+ {
2560
+ name: '',
2561
+ type: 'uint256',
2562
+ },
2563
+ ],
2564
+ stateMutability: 'nonpayable',
2565
+ type: 'function',
2566
+ },
2567
+ {
2568
+ inputs: [
2569
+ {
2570
+ name: '_userWallet',
2571
+ type: 'address',
2572
+ },
2573
+ {
2574
+ name: '_amount',
2575
+ type: 'uint256',
2576
+ },
2577
+ {
2578
+ name: '_depositLegoId',
2579
+ type: 'uint256',
2580
+ },
2581
+ {
2582
+ name: '_depositVault',
2583
+ type: 'address',
2584
+ },
2585
+ ],
2586
+ name: 'convertEthToWeth',
2587
+ outputs: [
2588
+ {
2589
+ name: '',
2590
+ type: 'uint256',
2591
+ },
2592
+ {
2593
+ name: '',
2594
+ type: 'address',
2595
+ },
2596
+ {
2597
+ name: '',
2598
+ type: 'uint256',
2599
+ },
2600
+ ],
2601
+ stateMutability: 'nonpayable',
2602
+ type: 'function',
2603
+ },
2604
+ {
2605
+ inputs: [
2606
+ {
2607
+ name: '_userWallet',
2608
+ type: 'address',
2609
+ },
2610
+ {
2611
+ name: '_amount',
2612
+ type: 'uint256',
2613
+ },
2614
+ {
2615
+ name: '_depositLegoId',
2616
+ type: 'uint256',
2617
+ },
2618
+ {
2619
+ name: '_depositVault',
2620
+ type: 'address',
2621
+ },
2622
+ {
2623
+ components: [
2624
+ {
2625
+ name: 'signature',
2626
+ type: 'bytes',
2627
+ },
2628
+ {
2629
+ name: 'signer',
2630
+ type: 'address',
2631
+ },
2632
+ {
2633
+ name: 'expiration',
2634
+ type: 'uint256',
2635
+ },
2636
+ ],
2637
+ name: '_sig',
2638
+ type: 'tuple',
2639
+ },
2640
+ ],
2641
+ name: 'convertEthToWeth',
2642
+ outputs: [
2643
+ {
2644
+ name: '',
2645
+ type: 'uint256',
2646
+ },
2647
+ {
2648
+ name: '',
2649
+ type: 'address',
2650
+ },
2651
+ {
2652
+ name: '',
2653
+ type: 'uint256',
2654
+ },
2655
+ ],
2656
+ stateMutability: 'nonpayable',
2657
+ type: 'function',
2658
+ },
2659
+ {
2660
+ inputs: [
2661
+ {
2662
+ name: '_userWallet',
2663
+ type: 'address',
2664
+ },
2665
+ ],
2666
+ name: 'convertWethToEth',
2667
+ outputs: [
2668
+ {
2669
+ name: '',
2670
+ type: 'uint256',
2671
+ },
2672
+ ],
2673
+ stateMutability: 'nonpayable',
2674
+ type: 'function',
2675
+ },
2676
+ {
2677
+ inputs: [
2678
+ {
2679
+ name: '_userWallet',
2680
+ type: 'address',
2681
+ },
2682
+ {
2683
+ name: '_amount',
2684
+ type: 'uint256',
2685
+ },
2686
+ ],
2687
+ name: 'convertWethToEth',
2688
+ outputs: [
2689
+ {
2690
+ name: '',
2691
+ type: 'uint256',
2692
+ },
2693
+ ],
2694
+ stateMutability: 'nonpayable',
2695
+ type: 'function',
2696
+ },
2697
+ {
2698
+ inputs: [
2699
+ {
2700
+ name: '_userWallet',
2701
+ type: 'address',
2702
+ },
2703
+ {
2704
+ name: '_amount',
2705
+ type: 'uint256',
2706
+ },
2707
+ {
2708
+ name: '_recipient',
2709
+ type: 'address',
2710
+ },
2711
+ ],
2712
+ name: 'convertWethToEth',
2713
+ outputs: [
2714
+ {
2715
+ name: '',
2716
+ type: 'uint256',
2717
+ },
2718
+ ],
2719
+ stateMutability: 'nonpayable',
2720
+ type: 'function',
2721
+ },
2722
+ {
2723
+ inputs: [
2724
+ {
2725
+ name: '_userWallet',
2726
+ type: 'address',
2727
+ },
2728
+ {
2729
+ name: '_amount',
2730
+ type: 'uint256',
2731
+ },
2732
+ {
2733
+ name: '_recipient',
2734
+ type: 'address',
2735
+ },
2736
+ {
2737
+ name: '_withdrawLegoId',
2738
+ type: 'uint256',
2739
+ },
2740
+ ],
2741
+ name: 'convertWethToEth',
2742
+ outputs: [
2743
+ {
2744
+ name: '',
2745
+ type: 'uint256',
2746
+ },
2747
+ ],
2748
+ stateMutability: 'nonpayable',
2749
+ type: 'function',
2750
+ },
2751
+ {
2752
+ inputs: [
2753
+ {
2754
+ name: '_userWallet',
2755
+ type: 'address',
2756
+ },
2757
+ {
2758
+ name: '_amount',
2759
+ type: 'uint256',
2760
+ },
2761
+ {
2762
+ name: '_recipient',
2763
+ type: 'address',
2764
+ },
2765
+ {
2766
+ name: '_withdrawLegoId',
2767
+ type: 'uint256',
2768
+ },
2769
+ {
2770
+ name: '_withdrawVaultToken',
2771
+ type: 'address',
2772
+ },
2773
+ ],
2774
+ name: 'convertWethToEth',
2775
+ outputs: [
2776
+ {
2777
+ name: '',
2778
+ type: 'uint256',
2779
+ },
2780
+ ],
2781
+ stateMutability: 'nonpayable',
2782
+ type: 'function',
2783
+ },
2784
+ {
2785
+ inputs: [
2786
+ {
2787
+ name: '_userWallet',
2788
+ type: 'address',
2789
+ },
2790
+ {
2791
+ name: '_amount',
2792
+ type: 'uint256',
2793
+ },
2794
+ {
2795
+ name: '_recipient',
2796
+ type: 'address',
2797
+ },
2798
+ {
2799
+ name: '_withdrawLegoId',
2800
+ type: 'uint256',
2801
+ },
2802
+ {
2803
+ name: '_withdrawVaultToken',
2804
+ type: 'address',
2805
+ },
2806
+ {
2807
+ components: [
2808
+ {
2809
+ name: 'signature',
2810
+ type: 'bytes',
2811
+ },
2812
+ {
2813
+ name: 'signer',
2814
+ type: 'address',
2815
+ },
2816
+ {
2817
+ name: 'expiration',
2818
+ type: 'uint256',
2819
+ },
2820
+ ],
2821
+ name: '_sig',
2822
+ type: 'tuple',
2823
+ },
2824
+ ],
2825
+ name: 'convertWethToEth',
2826
+ outputs: [
2827
+ {
2828
+ name: '',
2829
+ type: 'uint256',
2830
+ },
2831
+ ],
2832
+ stateMutability: 'nonpayable',
2833
+ type: 'function',
2834
+ },
2835
+ {
2836
+ inputs: [
2837
+ {
2838
+ name: '_userWallet',
2839
+ type: 'address',
2840
+ },
2841
+ {
2842
+ components: [
2843
+ {
2844
+ name: 'usePrevAmountOut',
2845
+ type: 'bool',
2846
+ },
2847
+ {
2848
+ name: 'action',
2849
+ type: 'uint256',
2850
+ },
2851
+ {
2852
+ name: 'legoId',
2853
+ type: 'uint256',
2854
+ },
2855
+ {
2856
+ name: 'asset',
2857
+ type: 'address',
2858
+ },
2859
+ {
2860
+ name: 'vault',
2861
+ type: 'address',
2862
+ },
2863
+ {
2864
+ name: 'amount',
2865
+ type: 'uint256',
2866
+ },
2867
+ {
2868
+ name: 'altLegoId',
2869
+ type: 'uint256',
2870
+ },
2871
+ {
2872
+ name: 'altAsset',
2873
+ type: 'address',
2874
+ },
2875
+ {
2876
+ name: 'altVault',
2877
+ type: 'address',
2878
+ },
2879
+ {
2880
+ name: 'altAmount',
2881
+ type: 'uint256',
2882
+ },
2883
+ {
2884
+ name: 'minAmountOut',
2885
+ type: 'uint256',
2886
+ },
2887
+ {
2888
+ name: 'pool',
2889
+ type: 'address',
2890
+ },
2891
+ {
2892
+ name: 'proof',
2893
+ type: 'bytes32',
2894
+ },
2895
+ {
2896
+ name: 'nftAddr',
2897
+ type: 'address',
2898
+ },
2899
+ {
2900
+ name: 'nftTokenId',
2901
+ type: 'uint256',
2902
+ },
2903
+ {
2904
+ name: 'tickLower',
2905
+ type: 'int24',
2906
+ },
2907
+ {
2908
+ name: 'tickUpper',
2909
+ type: 'int24',
2910
+ },
2911
+ {
2912
+ name: 'minAmountA',
2913
+ type: 'uint256',
2914
+ },
2915
+ {
2916
+ name: 'minAmountB',
2917
+ type: 'uint256',
2918
+ },
2919
+ {
2920
+ name: 'minLpAmount',
2921
+ type: 'uint256',
2922
+ },
2923
+ {
2924
+ name: 'liqToRemove',
2925
+ type: 'uint256',
2926
+ },
2927
+ {
2928
+ name: 'recipient',
2929
+ type: 'address',
2930
+ },
2931
+ {
2932
+ name: 'isWethToEthConversion',
2933
+ type: 'bool',
2934
+ },
2935
+ {
2936
+ components: [
2937
+ {
2938
+ name: 'legoId',
2939
+ type: 'uint256',
2940
+ },
2941
+ {
2942
+ name: 'amountIn',
2943
+ type: 'uint256',
2944
+ },
2945
+ {
2946
+ name: 'minAmountOut',
2947
+ type: 'uint256',
2948
+ },
2949
+ {
2950
+ name: 'tokenPath',
2951
+ type: 'address[]',
2952
+ },
2953
+ {
2954
+ name: 'poolPath',
2955
+ type: 'address[]',
2956
+ },
2957
+ ],
2958
+ name: 'swapInstructions',
2959
+ type: 'tuple[]',
2960
+ },
2961
+ ],
2962
+ name: '_instructions',
2963
+ type: 'tuple[]',
2964
+ },
2965
+ ],
2966
+ name: 'performBatchActions',
2967
+ outputs: [
2968
+ {
2969
+ name: '',
2970
+ type: 'bool',
2971
+ },
2972
+ ],
2973
+ stateMutability: 'nonpayable',
2974
+ type: 'function',
2975
+ },
2976
+ {
2977
+ inputs: [
2978
+ {
2979
+ name: '_userWallet',
2980
+ type: 'address',
2981
+ },
2982
+ {
2983
+ components: [
2984
+ {
2985
+ name: 'usePrevAmountOut',
2986
+ type: 'bool',
2987
+ },
2988
+ {
2989
+ name: 'action',
2990
+ type: 'uint256',
2991
+ },
2992
+ {
2993
+ name: 'legoId',
2994
+ type: 'uint256',
2995
+ },
2996
+ {
2997
+ name: 'asset',
2998
+ type: 'address',
2999
+ },
3000
+ {
3001
+ name: 'vault',
3002
+ type: 'address',
3003
+ },
3004
+ {
3005
+ name: 'amount',
3006
+ type: 'uint256',
3007
+ },
3008
+ {
3009
+ name: 'altLegoId',
3010
+ type: 'uint256',
3011
+ },
3012
+ {
3013
+ name: 'altAsset',
3014
+ type: 'address',
3015
+ },
3016
+ {
3017
+ name: 'altVault',
3018
+ type: 'address',
3019
+ },
3020
+ {
3021
+ name: 'altAmount',
3022
+ type: 'uint256',
3023
+ },
3024
+ {
3025
+ name: 'minAmountOut',
3026
+ type: 'uint256',
3027
+ },
3028
+ {
3029
+ name: 'pool',
3030
+ type: 'address',
3031
+ },
3032
+ {
3033
+ name: 'proof',
3034
+ type: 'bytes32',
3035
+ },
3036
+ {
3037
+ name: 'nftAddr',
3038
+ type: 'address',
3039
+ },
3040
+ {
3041
+ name: 'nftTokenId',
3042
+ type: 'uint256',
3043
+ },
3044
+ {
3045
+ name: 'tickLower',
3046
+ type: 'int24',
3047
+ },
3048
+ {
3049
+ name: 'tickUpper',
3050
+ type: 'int24',
3051
+ },
3052
+ {
3053
+ name: 'minAmountA',
3054
+ type: 'uint256',
3055
+ },
3056
+ {
3057
+ name: 'minAmountB',
3058
+ type: 'uint256',
3059
+ },
3060
+ {
3061
+ name: 'minLpAmount',
3062
+ type: 'uint256',
3063
+ },
3064
+ {
3065
+ name: 'liqToRemove',
3066
+ type: 'uint256',
3067
+ },
3068
+ {
3069
+ name: 'recipient',
3070
+ type: 'address',
3071
+ },
3072
+ {
3073
+ name: 'isWethToEthConversion',
3074
+ type: 'bool',
3075
+ },
3076
+ {
3077
+ components: [
3078
+ {
3079
+ name: 'legoId',
3080
+ type: 'uint256',
3081
+ },
3082
+ {
3083
+ name: 'amountIn',
3084
+ type: 'uint256',
3085
+ },
3086
+ {
3087
+ name: 'minAmountOut',
3088
+ type: 'uint256',
3089
+ },
3090
+ {
3091
+ name: 'tokenPath',
3092
+ type: 'address[]',
3093
+ },
3094
+ {
3095
+ name: 'poolPath',
3096
+ type: 'address[]',
3097
+ },
3098
+ ],
3099
+ name: 'swapInstructions',
3100
+ type: 'tuple[]',
3101
+ },
3102
+ ],
3103
+ name: '_instructions',
3104
+ type: 'tuple[]',
3105
+ },
3106
+ {
3107
+ components: [
3108
+ {
3109
+ name: 'signature',
3110
+ type: 'bytes',
3111
+ },
3112
+ {
3113
+ name: 'signer',
3114
+ type: 'address',
3115
+ },
3116
+ {
3117
+ name: 'expiration',
3118
+ type: 'uint256',
3119
+ },
3120
+ ],
3121
+ name: '_sig',
3122
+ type: 'tuple',
3123
+ },
3124
+ ],
3125
+ name: 'performBatchActions',
3126
+ outputs: [
3127
+ {
3128
+ name: '',
3129
+ type: 'bool',
3130
+ },
3131
+ ],
3132
+ stateMutability: 'nonpayable',
3133
+ type: 'function',
3134
+ },
3135
+ {
3136
+ inputs: [
3137
+ {
3138
+ name: '_userWallet',
3139
+ type: 'address',
3140
+ },
3141
+ {
3142
+ components: [
3143
+ {
3144
+ name: 'usePrevAmountOut',
3145
+ type: 'bool',
3146
+ },
3147
+ {
3148
+ name: 'action',
3149
+ type: 'uint256',
3150
+ },
3151
+ {
3152
+ name: 'legoId',
3153
+ type: 'uint256',
3154
+ },
3155
+ {
3156
+ name: 'asset',
3157
+ type: 'address',
3158
+ },
3159
+ {
3160
+ name: 'vault',
3161
+ type: 'address',
3162
+ },
3163
+ {
3164
+ name: 'amount',
3165
+ type: 'uint256',
3166
+ },
3167
+ {
3168
+ name: 'altLegoId',
3169
+ type: 'uint256',
3170
+ },
3171
+ {
3172
+ name: 'altAsset',
3173
+ type: 'address',
3174
+ },
3175
+ {
3176
+ name: 'altVault',
3177
+ type: 'address',
3178
+ },
3179
+ {
3180
+ name: 'altAmount',
3181
+ type: 'uint256',
3182
+ },
3183
+ {
3184
+ name: 'minAmountOut',
3185
+ type: 'uint256',
3186
+ },
3187
+ {
3188
+ name: 'pool',
3189
+ type: 'address',
3190
+ },
3191
+ {
3192
+ name: 'proof',
3193
+ type: 'bytes32',
3194
+ },
3195
+ {
3196
+ name: 'nftAddr',
3197
+ type: 'address',
3198
+ },
3199
+ {
3200
+ name: 'nftTokenId',
3201
+ type: 'uint256',
3202
+ },
3203
+ {
3204
+ name: 'tickLower',
3205
+ type: 'int24',
3206
+ },
3207
+ {
3208
+ name: 'tickUpper',
3209
+ type: 'int24',
3210
+ },
3211
+ {
3212
+ name: 'minAmountA',
3213
+ type: 'uint256',
3214
+ },
3215
+ {
3216
+ name: 'minAmountB',
3217
+ type: 'uint256',
3218
+ },
3219
+ {
3220
+ name: 'minLpAmount',
3221
+ type: 'uint256',
3222
+ },
3223
+ {
3224
+ name: 'liqToRemove',
3225
+ type: 'uint256',
3226
+ },
3227
+ {
3228
+ name: 'recipient',
3229
+ type: 'address',
3230
+ },
3231
+ {
3232
+ name: 'isWethToEthConversion',
3233
+ type: 'bool',
3234
+ },
3235
+ {
3236
+ components: [
3237
+ {
3238
+ name: 'legoId',
3239
+ type: 'uint256',
3240
+ },
3241
+ {
3242
+ name: 'amountIn',
3243
+ type: 'uint256',
3244
+ },
3245
+ {
3246
+ name: 'minAmountOut',
3247
+ type: 'uint256',
3248
+ },
3249
+ {
3250
+ name: 'tokenPath',
3251
+ type: 'address[]',
3252
+ },
3253
+ {
3254
+ name: 'poolPath',
3255
+ type: 'address[]',
3256
+ },
3257
+ ],
3258
+ name: 'swapInstructions',
3259
+ type: 'tuple[]',
3260
+ },
3261
+ ],
3262
+ name: '_instructions',
3263
+ type: 'tuple[]',
3264
+ },
3265
+ {
3266
+ name: '_expiration',
3267
+ type: 'uint256',
3268
+ },
3269
+ ],
3270
+ name: 'getBatchActionHash',
3271
+ outputs: [
3272
+ {
3273
+ name: '',
3274
+ type: 'bytes32',
3275
+ },
3276
+ ],
3277
+ stateMutability: 'view',
3278
+ type: 'function',
3279
+ },
3280
+ {
3281
+ inputs: [],
3282
+ name: 'DOMAIN_SEPARATOR',
3283
+ outputs: [
3284
+ {
3285
+ name: '',
3286
+ type: 'bytes32',
3287
+ },
3288
+ ],
3289
+ stateMutability: 'view',
3290
+ type: 'function',
3291
+ },
3292
+ {
3293
+ inputs: [
3294
+ {
3295
+ name: '_asset',
3296
+ type: 'address',
3297
+ },
3298
+ ],
3299
+ name: 'recoverFunds',
3300
+ outputs: [
3301
+ {
3302
+ name: '',
3303
+ type: 'bool',
3304
+ },
3305
+ ],
3306
+ stateMutability: 'nonpayable',
3307
+ type: 'function',
3308
+ },
3309
+ {
3310
+ inputs: [
3311
+ {
3312
+ name: 'arg0',
3313
+ type: 'bytes',
3314
+ },
3315
+ ],
3316
+ name: 'usedSignatures',
3317
+ outputs: [
3318
+ {
3319
+ name: '',
3320
+ type: 'bool',
3321
+ },
3322
+ ],
3323
+ stateMutability: 'view',
3324
+ type: 'function',
3325
+ },
3326
+ {
3327
+ inputs: [
3328
+ {
3329
+ name: '_owner',
3330
+ type: 'address',
3331
+ },
3332
+ {
3333
+ name: '_addyRegistry',
3334
+ type: 'address',
3335
+ },
3336
+ {
3337
+ name: '_minOwnerChangeDelay',
3338
+ type: 'uint256',
3339
+ },
3340
+ {
3341
+ name: '_maxOwnerChangeDelay',
3342
+ type: 'uint256',
3343
+ },
3344
+ ],
3345
+ outputs: [],
3346
+ stateMutability: 'nonpayable',
3347
+ type: 'constructor',
3348
+ },
3349
+ ];
3350
+ export const deployAddress = '0x76Eb19Ae42c07a7AD50aFD58b579a7c45bd70183';
3351
+ function getRequest(method, args, contractAddressOrOptions) {
3352
+ const address = typeof contractAddressOrOptions === 'string' ? contractAddressOrOptions : contractAddressOrOptions?.contractAddress;
3353
+ const defaultValue = typeof contractAddressOrOptions === 'string' ? undefined : contractAddressOrOptions?.defaultValue;
3354
+ const call = {
3355
+ contractName: 'Agent_v2',
3356
+ method,
3357
+ args,
3358
+ address,
3359
+ deployAddress,
3360
+ defaultValue,
3361
+ getAbi: () => abi,
3362
+ with: (options) => {
3363
+ call.address = options.contractAddress;
3364
+ call.defaultValue = options.defaultValue;
3365
+ return call;
3366
+ },
3367
+ defaultTo: (defaultValue) => {
3368
+ call.defaultValue = defaultValue;
3369
+ return call;
3370
+ },
3371
+ at: (address) => {
3372
+ call.address = address;
3373
+ return call;
3374
+ },
3375
+ };
3376
+ return call;
3377
+ }
3378
+ export const call = {
3379
+ hasPendingOwnerChange: (...args) => getRequest('hasPendingOwnerChange', args),
3380
+ owner: (...args) => getRequest('owner', args),
3381
+ pendingOwner: (...args) => getRequest('pendingOwner', args),
3382
+ ownershipChangeDelay: (...args) => getRequest('ownershipChangeDelay', args),
3383
+ MIN_OWNER_CHANGE_DELAY: (...args) => getRequest('MIN_OWNER_CHANGE_DELAY', args),
3384
+ MAX_OWNER_CHANGE_DELAY: (...args) => getRequest('MAX_OWNER_CHANGE_DELAY', args),
3385
+ _ADDY_REGISTRY: (...args) => getRequest('_ADDY_REGISTRY', args),
3386
+ apiVersion: (...args) => getRequest('apiVersion', args),
3387
+ getSwapActionHash: (...args) => getRequest('getSwapActionHash', args),
3388
+ getBatchActionHash: (...args) => getRequest('getBatchActionHash', args),
3389
+ DOMAIN_SEPARATOR: (...args) => getRequest('DOMAIN_SEPARATOR', args),
3390
+ usedSignatures: (...args) => getRequest('usedSignatures', args),
3391
+ };
3392
+ function getMutation(functionName) {
3393
+ return {
3394
+ contractName: 'Agent_v2',
3395
+ functionName,
3396
+ deployAddress,
3397
+ argsType: undefined,
3398
+ getAbi: () => abi,
3399
+ };
3400
+ }
3401
+ export const mutation = {
3402
+ changeOwnership: getMutation('changeOwnership'),
3403
+ confirmOwnershipChange: getMutation('confirmOwnershipChange'),
3404
+ cancelOwnershipChange: getMutation('cancelOwnershipChange'),
3405
+ setOwnershipChangeDelay: getMutation('setOwnershipChangeDelay'),
3406
+ depositTokens: getMutation('depositTokens'),
3407
+ withdrawTokens: getMutation('withdrawTokens'),
3408
+ rebalance: getMutation('rebalance'),
3409
+ swapTokens: getMutation('swapTokens'),
3410
+ borrow: getMutation('borrow'),
3411
+ repayDebt: getMutation('repayDebt'),
3412
+ claimRewards: getMutation('claimRewards'),
3413
+ addLiquidity: getMutation('addLiquidity'),
3414
+ removeLiquidity: getMutation('removeLiquidity'),
3415
+ transferFunds: getMutation('transferFunds'),
3416
+ convertEthToWeth: getMutation('convertEthToWeth'),
3417
+ convertWethToEth: getMutation('convertWethToEth'),
3418
+ performBatchActions: getMutation('performBatchActions'),
3419
+ recoverFunds: getMutation('recoverFunds'),
3420
+ };
3421
+ export function toSdk(address, publicClient, walletClient) {
3422
+ return {
3423
+ // Queries
3424
+ hasPendingOwnerChange: (...args) => singleQuery(publicClient, call.hasPendingOwnerChange(...args).at(address)),
3425
+ owner: (...args) => singleQuery(publicClient, call.owner(...args).at(address)),
3426
+ pendingOwner: (...args) => singleQuery(publicClient, call.pendingOwner(...args).at(address)),
3427
+ ownershipChangeDelay: (...args) => singleQuery(publicClient, call.ownershipChangeDelay(...args).at(address)),
3428
+ MIN_OWNER_CHANGE_DELAY: (...args) => singleQuery(publicClient, call.MIN_OWNER_CHANGE_DELAY(...args).at(address)),
3429
+ MAX_OWNER_CHANGE_DELAY: (...args) => singleQuery(publicClient, call.MAX_OWNER_CHANGE_DELAY(...args).at(address)),
3430
+ _ADDY_REGISTRY: (...args) => singleQuery(publicClient, call._ADDY_REGISTRY(...args).at(address)),
3431
+ apiVersion: (...args) => singleQuery(publicClient, call.apiVersion(...args).at(address)),
3432
+ getSwapActionHash: (...args) => singleQuery(publicClient, call.getSwapActionHash(...args).at(address)),
3433
+ getBatchActionHash: (...args) => singleQuery(publicClient, call.getBatchActionHash(...args).at(address)),
3434
+ DOMAIN_SEPARATOR: (...args) => singleQuery(publicClient, call.DOMAIN_SEPARATOR(...args).at(address)),
3435
+ usedSignatures: (...args) => singleQuery(publicClient, call.usedSignatures(...args).at(address)),
3436
+ // Mutations
3437
+ changeOwnership: (...args) => mutate(walletClient, mutation.changeOwnership, { address })(...args),
3438
+ confirmOwnershipChange: (...args) => mutate(walletClient, mutation.confirmOwnershipChange, { address })(...args),
3439
+ cancelOwnershipChange: (...args) => mutate(walletClient, mutation.cancelOwnershipChange, { address })(...args),
3440
+ setOwnershipChangeDelay: (...args) => mutate(walletClient, mutation.setOwnershipChangeDelay, { address })(...args),
3441
+ depositTokens: (...args) => mutate(walletClient, mutation.depositTokens, { address })(...args),
3442
+ withdrawTokens: (...args) => mutate(walletClient, mutation.withdrawTokens, { address })(...args),
3443
+ rebalance: (...args) => mutate(walletClient, mutation.rebalance, { address })(...args),
3444
+ swapTokens: (...args) => mutate(walletClient, mutation.swapTokens, { address })(...args),
3445
+ borrow: (...args) => mutate(walletClient, mutation.borrow, { address })(...args),
3446
+ repayDebt: (...args) => mutate(walletClient, mutation.repayDebt, { address })(...args),
3447
+ claimRewards: (...args) => mutate(walletClient, mutation.claimRewards, { address })(...args),
3448
+ addLiquidity: (...args) => mutate(walletClient, mutation.addLiquidity, { address })(...args),
3449
+ removeLiquidity: (...args) => mutate(walletClient, mutation.removeLiquidity, { address })(...args),
3450
+ transferFunds: (...args) => mutate(walletClient, mutation.transferFunds, { address })(...args),
3451
+ convertEthToWeth: (...args) => mutate(walletClient, mutation.convertEthToWeth, { address })(...args),
3452
+ convertWethToEth: (...args) => mutate(walletClient, mutation.convertWethToEth, { address })(...args),
3453
+ performBatchActions: (...args) => mutate(walletClient, mutation.performBatchActions, { address })(...args),
3454
+ recoverFunds: (...args) => mutate(walletClient, mutation.recoverFunds, { address })(...args),
3455
+ };
3456
+ }