@underscore-finance/sdk 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/LICENSE +41 -0
  2. package/README.md +131 -0
  3. package/dist/contracts/AddyRegistry.d.ts +471 -0
  4. package/dist/contracts/AddyRegistry.d.ts.map +1 -0
  5. package/dist/contracts/AddyRegistry.js +592 -0
  6. package/dist/contracts/AgentFactory.d.ts +966 -0
  7. package/dist/contracts/AgentFactory.d.ts.map +1 -0
  8. package/dist/contracts/AgentFactory.js +1227 -0
  9. package/dist/contracts/AgentTemplate.d.ts +2629 -0
  10. package/dist/contracts/AgentTemplate.d.ts.map +1 -0
  11. package/dist/contracts/AgentTemplate.js +3370 -0
  12. package/dist/contracts/ChainlinkFeeds.d.ts +567 -0
  13. package/dist/contracts/ChainlinkFeeds.d.ts.map +1 -0
  14. package/dist/contracts/ChainlinkFeeds.js +735 -0
  15. package/dist/contracts/LegoAaveV3.d.ts +894 -0
  16. package/dist/contracts/LegoAaveV3.d.ts.map +1 -0
  17. package/dist/contracts/LegoAaveV3.js +1165 -0
  18. package/dist/contracts/LegoAeroClassic.d.ts +1065 -0
  19. package/dist/contracts/LegoAeroClassic.d.ts.map +1 -0
  20. package/dist/contracts/LegoAeroClassic.js +1381 -0
  21. package/dist/contracts/LegoAeroSlipstream.d.ts +1161 -0
  22. package/dist/contracts/LegoAeroSlipstream.d.ts.map +1 -0
  23. package/dist/contracts/LegoAeroSlipstream.js +1506 -0
  24. package/dist/contracts/LegoCompoundV3.d.ts +921 -0
  25. package/dist/contracts/LegoCompoundV3.d.ts.map +1 -0
  26. package/dist/contracts/LegoCompoundV3.js +1200 -0
  27. package/dist/contracts/LegoCurve.d.ts +1050 -0
  28. package/dist/contracts/LegoCurve.d.ts.map +1 -0
  29. package/dist/contracts/LegoCurve.js +1354 -0
  30. package/dist/contracts/LegoEuler.d.ts +935 -0
  31. package/dist/contracts/LegoEuler.d.ts.map +1 -0
  32. package/dist/contracts/LegoEuler.js +1218 -0
  33. package/dist/contracts/LegoFluid.d.ts +875 -0
  34. package/dist/contracts/LegoFluid.d.ts.map +1 -0
  35. package/dist/contracts/LegoFluid.js +1141 -0
  36. package/dist/contracts/LegoHelper.d.ts +1555 -0
  37. package/dist/contracts/LegoHelper.d.ts.map +1 -0
  38. package/dist/contracts/LegoHelper.js +1945 -0
  39. package/dist/contracts/LegoMoonwell.d.ts +903 -0
  40. package/dist/contracts/LegoMoonwell.d.ts.map +1 -0
  41. package/dist/contracts/LegoMoonwell.js +1177 -0
  42. package/dist/contracts/LegoMorpho.d.ts +935 -0
  43. package/dist/contracts/LegoMorpho.d.ts.map +1 -0
  44. package/dist/contracts/LegoMorpho.js +1218 -0
  45. package/dist/contracts/LegoRegistry.d.ts +589 -0
  46. package/dist/contracts/LegoRegistry.d.ts.map +1 -0
  47. package/dist/contracts/LegoRegistry.js +746 -0
  48. package/dist/contracts/LegoSky.d.ts +784 -0
  49. package/dist/contracts/LegoSky.d.ts.map +1 -0
  50. package/dist/contracts/LegoSky.js +1015 -0
  51. package/dist/contracts/LegoUniswapV2.d.ts +1065 -0
  52. package/dist/contracts/LegoUniswapV2.d.ts.map +1 -0
  53. package/dist/contracts/LegoUniswapV2.js +1381 -0
  54. package/dist/contracts/LegoUniswapV3.d.ts +1199 -0
  55. package/dist/contracts/LegoUniswapV3.d.ts.map +1 -0
  56. package/dist/contracts/LegoUniswapV3.js +1553 -0
  57. package/dist/contracts/OracleRegistry.d.ts +811 -0
  58. package/dist/contracts/OracleRegistry.d.ts.map +1 -0
  59. package/dist/contracts/OracleRegistry.js +1049 -0
  60. package/dist/contracts/PriceSheets.d.ts +1053 -0
  61. package/dist/contracts/PriceSheets.d.ts.map +1 -0
  62. package/dist/contracts/PriceSheets.js +1296 -0
  63. package/dist/contracts/PythFeeds.d.ts +501 -0
  64. package/dist/contracts/PythFeeds.d.ts.map +1 -0
  65. package/dist/contracts/PythFeeds.js +648 -0
  66. package/dist/contracts/StorkFeeds.d.ts +501 -0
  67. package/dist/contracts/StorkFeeds.d.ts.map +1 -0
  68. package/dist/contracts/StorkFeeds.js +648 -0
  69. package/dist/contracts/WalletConfig.d.ts +1398 -0
  70. package/dist/contracts/WalletConfig.d.ts.map +1 -0
  71. package/dist/contracts/WalletConfig.js +1674 -0
  72. package/dist/contracts/WalletFunds.d.ts +1978 -0
  73. package/dist/contracts/WalletFunds.d.ts.map +1 -0
  74. package/dist/contracts/WalletFunds.js +2579 -0
  75. package/dist/contracts/index.d.ts +25 -0
  76. package/dist/contracts/index.d.ts.map +1 -0
  77. package/dist/contracts/index.js +28 -0
  78. package/dist/contracts/sdk.d.ts +53 -0
  79. package/dist/contracts/sdk.d.ts.map +1 -0
  80. package/dist/contracts/sdk.js +56 -0
  81. package/dist/index.d.ts +15 -0
  82. package/dist/index.d.ts.map +1 -0
  83. package/dist/index.js +16 -0
  84. package/package.json +31 -0
@@ -0,0 +1,1506 @@
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": "sender",
13
+ "type": "address"
14
+ },
15
+ {
16
+ "indexed": true,
17
+ "name": "tokenIn",
18
+ "type": "address"
19
+ },
20
+ {
21
+ "indexed": true,
22
+ "name": "tokenOut",
23
+ "type": "address"
24
+ },
25
+ {
26
+ "indexed": false,
27
+ "name": "amountIn",
28
+ "type": "uint256"
29
+ },
30
+ {
31
+ "indexed": false,
32
+ "name": "amountOut",
33
+ "type": "uint256"
34
+ },
35
+ {
36
+ "indexed": false,
37
+ "name": "usdValue",
38
+ "type": "uint256"
39
+ },
40
+ {
41
+ "indexed": false,
42
+ "name": "numTokens",
43
+ "type": "uint256"
44
+ },
45
+ {
46
+ "indexed": false,
47
+ "name": "recipient",
48
+ "type": "address"
49
+ }
50
+ ],
51
+ "name": "AeroSlipStreamSwap",
52
+ "type": "event"
53
+ },
54
+ {
55
+ "anonymous": false,
56
+ "inputs": [
57
+ {
58
+ "indexed": true,
59
+ "name": "sender",
60
+ "type": "address"
61
+ },
62
+ {
63
+ "indexed": true,
64
+ "name": "tokenA",
65
+ "type": "address"
66
+ },
67
+ {
68
+ "indexed": true,
69
+ "name": "tokenB",
70
+ "type": "address"
71
+ },
72
+ {
73
+ "indexed": false,
74
+ "name": "amountA",
75
+ "type": "uint256"
76
+ },
77
+ {
78
+ "indexed": false,
79
+ "name": "amountB",
80
+ "type": "uint256"
81
+ },
82
+ {
83
+ "indexed": false,
84
+ "name": "liquidityAdded",
85
+ "type": "uint256"
86
+ },
87
+ {
88
+ "indexed": false,
89
+ "name": "nftTokenId",
90
+ "type": "uint256"
91
+ },
92
+ {
93
+ "indexed": false,
94
+ "name": "usdValue",
95
+ "type": "uint256"
96
+ },
97
+ {
98
+ "indexed": false,
99
+ "name": "recipient",
100
+ "type": "address"
101
+ }
102
+ ],
103
+ "name": "AeroSlipStreamLiquidityAdded",
104
+ "type": "event"
105
+ },
106
+ {
107
+ "anonymous": false,
108
+ "inputs": [
109
+ {
110
+ "indexed": false,
111
+ "name": "sender",
112
+ "type": "address"
113
+ },
114
+ {
115
+ "indexed": true,
116
+ "name": "pool",
117
+ "type": "address"
118
+ },
119
+ {
120
+ "indexed": false,
121
+ "name": "nftTokenId",
122
+ "type": "uint256"
123
+ },
124
+ {
125
+ "indexed": true,
126
+ "name": "tokenA",
127
+ "type": "address"
128
+ },
129
+ {
130
+ "indexed": true,
131
+ "name": "tokenB",
132
+ "type": "address"
133
+ },
134
+ {
135
+ "indexed": false,
136
+ "name": "amountA",
137
+ "type": "uint256"
138
+ },
139
+ {
140
+ "indexed": false,
141
+ "name": "amountB",
142
+ "type": "uint256"
143
+ },
144
+ {
145
+ "indexed": false,
146
+ "name": "liquidityRemoved",
147
+ "type": "uint256"
148
+ },
149
+ {
150
+ "indexed": false,
151
+ "name": "usdValue",
152
+ "type": "uint256"
153
+ },
154
+ {
155
+ "indexed": false,
156
+ "name": "recipient",
157
+ "type": "address"
158
+ }
159
+ ],
160
+ "name": "AeroSlipStreamLiquidityRemoved",
161
+ "type": "event"
162
+ },
163
+ {
164
+ "anonymous": false,
165
+ "inputs": [
166
+ {
167
+ "indexed": true,
168
+ "name": "pool",
169
+ "type": "address"
170
+ }
171
+ ],
172
+ "name": "AeroSlipStreamCoreRouterPoolSet",
173
+ "type": "event"
174
+ },
175
+ {
176
+ "anonymous": false,
177
+ "inputs": [
178
+ {
179
+ "indexed": true,
180
+ "name": "asset",
181
+ "type": "address"
182
+ },
183
+ {
184
+ "indexed": true,
185
+ "name": "recipient",
186
+ "type": "address"
187
+ },
188
+ {
189
+ "indexed": false,
190
+ "name": "amount",
191
+ "type": "uint256"
192
+ }
193
+ ],
194
+ "name": "AeroSlipStreamFundsRecovered",
195
+ "type": "event"
196
+ },
197
+ {
198
+ "anonymous": false,
199
+ "inputs": [
200
+ {
201
+ "indexed": true,
202
+ "name": "collection",
203
+ "type": "address"
204
+ },
205
+ {
206
+ "indexed": false,
207
+ "name": "nftTokenId",
208
+ "type": "uint256"
209
+ },
210
+ {
211
+ "indexed": true,
212
+ "name": "recipient",
213
+ "type": "address"
214
+ }
215
+ ],
216
+ "name": "AeroSlipStreamNftRecovered",
217
+ "type": "event"
218
+ },
219
+ {
220
+ "anonymous": false,
221
+ "inputs": [
222
+ {
223
+ "indexed": false,
224
+ "name": "legoId",
225
+ "type": "uint256"
226
+ }
227
+ ],
228
+ "name": "AeroSlipStreamLegoIdSet",
229
+ "type": "event"
230
+ },
231
+ {
232
+ "anonymous": false,
233
+ "inputs": [
234
+ {
235
+ "indexed": false,
236
+ "name": "isActivated",
237
+ "type": "bool"
238
+ }
239
+ ],
240
+ "name": "AeroSlipStreamActivated",
241
+ "type": "event"
242
+ },
243
+ {
244
+ "anonymous": false,
245
+ "inputs": [
246
+ {
247
+ "indexed": true,
248
+ "name": "addr",
249
+ "type": "address"
250
+ }
251
+ ],
252
+ "name": "LocalGovernorSet",
253
+ "type": "event"
254
+ },
255
+ {
256
+ "inputs": [
257
+ {
258
+ "name": "_address",
259
+ "type": "address"
260
+ }
261
+ ],
262
+ "name": "isGovernor",
263
+ "outputs": [
264
+ {
265
+ "name": "",
266
+ "type": "bool"
267
+ }
268
+ ],
269
+ "stateMutability": "view",
270
+ "type": "function"
271
+ },
272
+ {
273
+ "inputs": [
274
+ {
275
+ "name": "_newGovernor",
276
+ "type": "address"
277
+ }
278
+ ],
279
+ "name": "isValidLocalGovernor",
280
+ "outputs": [
281
+ {
282
+ "name": "",
283
+ "type": "bool"
284
+ }
285
+ ],
286
+ "stateMutability": "view",
287
+ "type": "function"
288
+ },
289
+ {
290
+ "inputs": [
291
+ {
292
+ "name": "_newGovernor",
293
+ "type": "address"
294
+ }
295
+ ],
296
+ "name": "setLocalGovernor",
297
+ "outputs": [
298
+ {
299
+ "name": "",
300
+ "type": "bool"
301
+ }
302
+ ],
303
+ "stateMutability": "nonpayable",
304
+ "type": "function"
305
+ },
306
+ {
307
+ "inputs": [],
308
+ "name": "localGovernor",
309
+ "outputs": [
310
+ {
311
+ "name": "",
312
+ "type": "address"
313
+ }
314
+ ],
315
+ "stateMutability": "view",
316
+ "type": "function"
317
+ },
318
+ {
319
+ "inputs": [
320
+ {
321
+ "name": "_operator",
322
+ "type": "address"
323
+ },
324
+ {
325
+ "name": "_owner",
326
+ "type": "address"
327
+ },
328
+ {
329
+ "name": "_tokenId",
330
+ "type": "uint256"
331
+ },
332
+ {
333
+ "name": "_data",
334
+ "type": "bytes"
335
+ }
336
+ ],
337
+ "name": "onERC721Received",
338
+ "outputs": [
339
+ {
340
+ "name": "",
341
+ "type": "bytes4"
342
+ }
343
+ ],
344
+ "stateMutability": "view",
345
+ "type": "function"
346
+ },
347
+ {
348
+ "inputs": [],
349
+ "name": "getRegistries",
350
+ "outputs": [
351
+ {
352
+ "name": "",
353
+ "type": "address[]"
354
+ }
355
+ ],
356
+ "stateMutability": "view",
357
+ "type": "function"
358
+ },
359
+ {
360
+ "inputs": [
361
+ {
362
+ "name": "_user",
363
+ "type": "address"
364
+ }
365
+ ],
366
+ "name": "getAccessForLego",
367
+ "outputs": [
368
+ {
369
+ "name": "",
370
+ "type": "address"
371
+ },
372
+ {
373
+ "name": "",
374
+ "type": "string"
375
+ },
376
+ {
377
+ "name": "",
378
+ "type": "uint256"
379
+ }
380
+ ],
381
+ "stateMutability": "view",
382
+ "type": "function"
383
+ },
384
+ {
385
+ "inputs": [
386
+ {
387
+ "name": "_amountIn",
388
+ "type": "uint256"
389
+ },
390
+ {
391
+ "name": "_minAmountOut",
392
+ "type": "uint256"
393
+ },
394
+ {
395
+ "name": "_tokenPath",
396
+ "type": "address[]"
397
+ },
398
+ {
399
+ "name": "_poolPath",
400
+ "type": "address[]"
401
+ },
402
+ {
403
+ "name": "_recipient",
404
+ "type": "address"
405
+ }
406
+ ],
407
+ "name": "swapTokens",
408
+ "outputs": [
409
+ {
410
+ "name": "",
411
+ "type": "uint256"
412
+ },
413
+ {
414
+ "name": "",
415
+ "type": "uint256"
416
+ },
417
+ {
418
+ "name": "",
419
+ "type": "uint256"
420
+ },
421
+ {
422
+ "name": "",
423
+ "type": "uint256"
424
+ }
425
+ ],
426
+ "stateMutability": "nonpayable",
427
+ "type": "function"
428
+ },
429
+ {
430
+ "inputs": [
431
+ {
432
+ "name": "_amountIn",
433
+ "type": "uint256"
434
+ },
435
+ {
436
+ "name": "_minAmountOut",
437
+ "type": "uint256"
438
+ },
439
+ {
440
+ "name": "_tokenPath",
441
+ "type": "address[]"
442
+ },
443
+ {
444
+ "name": "_poolPath",
445
+ "type": "address[]"
446
+ },
447
+ {
448
+ "name": "_recipient",
449
+ "type": "address"
450
+ },
451
+ {
452
+ "name": "_oracleRegistry",
453
+ "type": "address"
454
+ }
455
+ ],
456
+ "name": "swapTokens",
457
+ "outputs": [
458
+ {
459
+ "name": "",
460
+ "type": "uint256"
461
+ },
462
+ {
463
+ "name": "",
464
+ "type": "uint256"
465
+ },
466
+ {
467
+ "name": "",
468
+ "type": "uint256"
469
+ },
470
+ {
471
+ "name": "",
472
+ "type": "uint256"
473
+ }
474
+ ],
475
+ "stateMutability": "nonpayable",
476
+ "type": "function"
477
+ },
478
+ {
479
+ "inputs": [
480
+ {
481
+ "name": "_amount0Delta",
482
+ "type": "int256"
483
+ },
484
+ {
485
+ "name": "_amount1Delta",
486
+ "type": "int256"
487
+ },
488
+ {
489
+ "name": "_data",
490
+ "type": "bytes"
491
+ }
492
+ ],
493
+ "name": "uniswapV3SwapCallback",
494
+ "outputs": [],
495
+ "stateMutability": "nonpayable",
496
+ "type": "function"
497
+ },
498
+ {
499
+ "inputs": [
500
+ {
501
+ "name": "_nftTokenId",
502
+ "type": "uint256"
503
+ },
504
+ {
505
+ "name": "_pool",
506
+ "type": "address"
507
+ },
508
+ {
509
+ "name": "_tokenA",
510
+ "type": "address"
511
+ },
512
+ {
513
+ "name": "_tokenB",
514
+ "type": "address"
515
+ },
516
+ {
517
+ "name": "_tickLower",
518
+ "type": "int24"
519
+ },
520
+ {
521
+ "name": "_tickUpper",
522
+ "type": "int24"
523
+ },
524
+ {
525
+ "name": "_amountA",
526
+ "type": "uint256"
527
+ },
528
+ {
529
+ "name": "_amountB",
530
+ "type": "uint256"
531
+ },
532
+ {
533
+ "name": "_minAmountA",
534
+ "type": "uint256"
535
+ },
536
+ {
537
+ "name": "_minAmountB",
538
+ "type": "uint256"
539
+ },
540
+ {
541
+ "name": "_minLpAmount",
542
+ "type": "uint256"
543
+ },
544
+ {
545
+ "name": "_recipient",
546
+ "type": "address"
547
+ }
548
+ ],
549
+ "name": "addLiquidity",
550
+ "outputs": [
551
+ {
552
+ "name": "",
553
+ "type": "uint256"
554
+ },
555
+ {
556
+ "name": "",
557
+ "type": "uint256"
558
+ },
559
+ {
560
+ "name": "",
561
+ "type": "uint256"
562
+ },
563
+ {
564
+ "name": "",
565
+ "type": "uint256"
566
+ },
567
+ {
568
+ "name": "",
569
+ "type": "uint256"
570
+ },
571
+ {
572
+ "name": "",
573
+ "type": "uint256"
574
+ },
575
+ {
576
+ "name": "",
577
+ "type": "uint256"
578
+ }
579
+ ],
580
+ "stateMutability": "nonpayable",
581
+ "type": "function"
582
+ },
583
+ {
584
+ "inputs": [
585
+ {
586
+ "name": "_nftTokenId",
587
+ "type": "uint256"
588
+ },
589
+ {
590
+ "name": "_pool",
591
+ "type": "address"
592
+ },
593
+ {
594
+ "name": "_tokenA",
595
+ "type": "address"
596
+ },
597
+ {
598
+ "name": "_tokenB",
599
+ "type": "address"
600
+ },
601
+ {
602
+ "name": "_tickLower",
603
+ "type": "int24"
604
+ },
605
+ {
606
+ "name": "_tickUpper",
607
+ "type": "int24"
608
+ },
609
+ {
610
+ "name": "_amountA",
611
+ "type": "uint256"
612
+ },
613
+ {
614
+ "name": "_amountB",
615
+ "type": "uint256"
616
+ },
617
+ {
618
+ "name": "_minAmountA",
619
+ "type": "uint256"
620
+ },
621
+ {
622
+ "name": "_minAmountB",
623
+ "type": "uint256"
624
+ },
625
+ {
626
+ "name": "_minLpAmount",
627
+ "type": "uint256"
628
+ },
629
+ {
630
+ "name": "_recipient",
631
+ "type": "address"
632
+ },
633
+ {
634
+ "name": "_oracleRegistry",
635
+ "type": "address"
636
+ }
637
+ ],
638
+ "name": "addLiquidity",
639
+ "outputs": [
640
+ {
641
+ "name": "",
642
+ "type": "uint256"
643
+ },
644
+ {
645
+ "name": "",
646
+ "type": "uint256"
647
+ },
648
+ {
649
+ "name": "",
650
+ "type": "uint256"
651
+ },
652
+ {
653
+ "name": "",
654
+ "type": "uint256"
655
+ },
656
+ {
657
+ "name": "",
658
+ "type": "uint256"
659
+ },
660
+ {
661
+ "name": "",
662
+ "type": "uint256"
663
+ },
664
+ {
665
+ "name": "",
666
+ "type": "uint256"
667
+ }
668
+ ],
669
+ "stateMutability": "nonpayable",
670
+ "type": "function"
671
+ },
672
+ {
673
+ "inputs": [
674
+ {
675
+ "name": "_nftTokenId",
676
+ "type": "uint256"
677
+ },
678
+ {
679
+ "name": "_pool",
680
+ "type": "address"
681
+ },
682
+ {
683
+ "name": "_tokenA",
684
+ "type": "address"
685
+ },
686
+ {
687
+ "name": "_tokenB",
688
+ "type": "address"
689
+ },
690
+ {
691
+ "name": "_lpToken",
692
+ "type": "address"
693
+ },
694
+ {
695
+ "name": "_liqToRemove",
696
+ "type": "uint256"
697
+ },
698
+ {
699
+ "name": "_minAmountA",
700
+ "type": "uint256"
701
+ },
702
+ {
703
+ "name": "_minAmountB",
704
+ "type": "uint256"
705
+ },
706
+ {
707
+ "name": "_recipient",
708
+ "type": "address"
709
+ }
710
+ ],
711
+ "name": "removeLiquidity",
712
+ "outputs": [
713
+ {
714
+ "name": "",
715
+ "type": "uint256"
716
+ },
717
+ {
718
+ "name": "",
719
+ "type": "uint256"
720
+ },
721
+ {
722
+ "name": "",
723
+ "type": "uint256"
724
+ },
725
+ {
726
+ "name": "",
727
+ "type": "uint256"
728
+ },
729
+ {
730
+ "name": "",
731
+ "type": "uint256"
732
+ },
733
+ {
734
+ "name": "",
735
+ "type": "bool"
736
+ }
737
+ ],
738
+ "stateMutability": "nonpayable",
739
+ "type": "function"
740
+ },
741
+ {
742
+ "inputs": [
743
+ {
744
+ "name": "_nftTokenId",
745
+ "type": "uint256"
746
+ },
747
+ {
748
+ "name": "_pool",
749
+ "type": "address"
750
+ },
751
+ {
752
+ "name": "_tokenA",
753
+ "type": "address"
754
+ },
755
+ {
756
+ "name": "_tokenB",
757
+ "type": "address"
758
+ },
759
+ {
760
+ "name": "_lpToken",
761
+ "type": "address"
762
+ },
763
+ {
764
+ "name": "_liqToRemove",
765
+ "type": "uint256"
766
+ },
767
+ {
768
+ "name": "_minAmountA",
769
+ "type": "uint256"
770
+ },
771
+ {
772
+ "name": "_minAmountB",
773
+ "type": "uint256"
774
+ },
775
+ {
776
+ "name": "_recipient",
777
+ "type": "address"
778
+ },
779
+ {
780
+ "name": "_oracleRegistry",
781
+ "type": "address"
782
+ }
783
+ ],
784
+ "name": "removeLiquidity",
785
+ "outputs": [
786
+ {
787
+ "name": "",
788
+ "type": "uint256"
789
+ },
790
+ {
791
+ "name": "",
792
+ "type": "uint256"
793
+ },
794
+ {
795
+ "name": "",
796
+ "type": "uint256"
797
+ },
798
+ {
799
+ "name": "",
800
+ "type": "uint256"
801
+ },
802
+ {
803
+ "name": "",
804
+ "type": "uint256"
805
+ },
806
+ {
807
+ "name": "",
808
+ "type": "bool"
809
+ }
810
+ ],
811
+ "stateMutability": "nonpayable",
812
+ "type": "function"
813
+ },
814
+ {
815
+ "inputs": [
816
+ {
817
+ "name": "_user",
818
+ "type": "address"
819
+ },
820
+ {
821
+ "name": "_market",
822
+ "type": "address"
823
+ },
824
+ {
825
+ "name": "_rewardToken",
826
+ "type": "address"
827
+ },
828
+ {
829
+ "name": "_rewardAmount",
830
+ "type": "uint256"
831
+ },
832
+ {
833
+ "name": "_proof",
834
+ "type": "bytes32"
835
+ }
836
+ ],
837
+ "name": "claimRewards",
838
+ "outputs": [],
839
+ "stateMutability": "nonpayable",
840
+ "type": "function"
841
+ },
842
+ {
843
+ "inputs": [
844
+ {
845
+ "name": "_user",
846
+ "type": "address"
847
+ }
848
+ ],
849
+ "name": "hasClaimableRewards",
850
+ "outputs": [
851
+ {
852
+ "name": "",
853
+ "type": "bool"
854
+ }
855
+ ],
856
+ "stateMutability": "view",
857
+ "type": "function"
858
+ },
859
+ {
860
+ "inputs": [
861
+ {
862
+ "name": "_pool",
863
+ "type": "address"
864
+ }
865
+ ],
866
+ "name": "getLpToken",
867
+ "outputs": [
868
+ {
869
+ "name": "",
870
+ "type": "address"
871
+ }
872
+ ],
873
+ "stateMutability": "view",
874
+ "type": "function"
875
+ },
876
+ {
877
+ "inputs": [
878
+ {
879
+ "name": "_lpToken",
880
+ "type": "address"
881
+ }
882
+ ],
883
+ "name": "getPoolForLpToken",
884
+ "outputs": [
885
+ {
886
+ "name": "",
887
+ "type": "address"
888
+ }
889
+ ],
890
+ "stateMutability": "view",
891
+ "type": "function"
892
+ },
893
+ {
894
+ "inputs": [],
895
+ "name": "getCoreRouterPool",
896
+ "outputs": [
897
+ {
898
+ "name": "",
899
+ "type": "address"
900
+ }
901
+ ],
902
+ "stateMutability": "view",
903
+ "type": "function"
904
+ },
905
+ {
906
+ "inputs": [
907
+ {
908
+ "name": "_tokenA",
909
+ "type": "address"
910
+ },
911
+ {
912
+ "name": "_tokenB",
913
+ "type": "address"
914
+ }
915
+ ],
916
+ "name": "getDeepestLiqPool",
917
+ "outputs": [
918
+ {
919
+ "components": [
920
+ {
921
+ "name": "pool",
922
+ "type": "address"
923
+ },
924
+ {
925
+ "name": "fee",
926
+ "type": "uint256"
927
+ },
928
+ {
929
+ "name": "liquidity",
930
+ "type": "uint256"
931
+ },
932
+ {
933
+ "name": "numCoins",
934
+ "type": "uint256"
935
+ },
936
+ {
937
+ "name": "legoId",
938
+ "type": "uint256"
939
+ }
940
+ ],
941
+ "name": "",
942
+ "type": "tuple"
943
+ }
944
+ ],
945
+ "stateMutability": "view",
946
+ "type": "function"
947
+ },
948
+ {
949
+ "inputs": [
950
+ {
951
+ "name": "_tokenIn",
952
+ "type": "address"
953
+ },
954
+ {
955
+ "name": "_tokenOut",
956
+ "type": "address"
957
+ },
958
+ {
959
+ "name": "_amountIn",
960
+ "type": "uint256"
961
+ }
962
+ ],
963
+ "name": "getBestSwapAmountOut",
964
+ "outputs": [
965
+ {
966
+ "name": "",
967
+ "type": "address"
968
+ },
969
+ {
970
+ "name": "",
971
+ "type": "uint256"
972
+ }
973
+ ],
974
+ "stateMutability": "nonpayable",
975
+ "type": "function"
976
+ },
977
+ {
978
+ "inputs": [
979
+ {
980
+ "name": "_pool",
981
+ "type": "address"
982
+ },
983
+ {
984
+ "name": "_tokenIn",
985
+ "type": "address"
986
+ },
987
+ {
988
+ "name": "_tokenOut",
989
+ "type": "address"
990
+ },
991
+ {
992
+ "name": "_amountIn",
993
+ "type": "uint256"
994
+ }
995
+ ],
996
+ "name": "getSwapAmountOut",
997
+ "outputs": [
998
+ {
999
+ "name": "",
1000
+ "type": "uint256"
1001
+ }
1002
+ ],
1003
+ "stateMutability": "nonpayable",
1004
+ "type": "function"
1005
+ },
1006
+ {
1007
+ "inputs": [
1008
+ {
1009
+ "name": "_tokenIn",
1010
+ "type": "address"
1011
+ },
1012
+ {
1013
+ "name": "_tokenOut",
1014
+ "type": "address"
1015
+ },
1016
+ {
1017
+ "name": "_amountOut",
1018
+ "type": "uint256"
1019
+ }
1020
+ ],
1021
+ "name": "getBestSwapAmountIn",
1022
+ "outputs": [
1023
+ {
1024
+ "name": "",
1025
+ "type": "address"
1026
+ },
1027
+ {
1028
+ "name": "",
1029
+ "type": "uint256"
1030
+ }
1031
+ ],
1032
+ "stateMutability": "nonpayable",
1033
+ "type": "function"
1034
+ },
1035
+ {
1036
+ "inputs": [
1037
+ {
1038
+ "name": "_pool",
1039
+ "type": "address"
1040
+ },
1041
+ {
1042
+ "name": "_tokenIn",
1043
+ "type": "address"
1044
+ },
1045
+ {
1046
+ "name": "_tokenOut",
1047
+ "type": "address"
1048
+ },
1049
+ {
1050
+ "name": "_amountOut",
1051
+ "type": "uint256"
1052
+ }
1053
+ ],
1054
+ "name": "getSwapAmountIn",
1055
+ "outputs": [
1056
+ {
1057
+ "name": "",
1058
+ "type": "uint256"
1059
+ }
1060
+ ],
1061
+ "stateMutability": "nonpayable",
1062
+ "type": "function"
1063
+ },
1064
+ {
1065
+ "inputs": [
1066
+ {
1067
+ "name": "_pool",
1068
+ "type": "address"
1069
+ },
1070
+ {
1071
+ "name": "_tokenA",
1072
+ "type": "address"
1073
+ },
1074
+ {
1075
+ "name": "_tokenB",
1076
+ "type": "address"
1077
+ },
1078
+ {
1079
+ "name": "_availAmountA",
1080
+ "type": "uint256"
1081
+ },
1082
+ {
1083
+ "name": "_availAmountB",
1084
+ "type": "uint256"
1085
+ }
1086
+ ],
1087
+ "name": "getAddLiqAmountsIn",
1088
+ "outputs": [
1089
+ {
1090
+ "name": "",
1091
+ "type": "uint256"
1092
+ },
1093
+ {
1094
+ "name": "",
1095
+ "type": "uint256"
1096
+ },
1097
+ {
1098
+ "name": "",
1099
+ "type": "uint256"
1100
+ }
1101
+ ],
1102
+ "stateMutability": "view",
1103
+ "type": "function"
1104
+ },
1105
+ {
1106
+ "inputs": [
1107
+ {
1108
+ "name": "_pool",
1109
+ "type": "address"
1110
+ },
1111
+ {
1112
+ "name": "_tokenA",
1113
+ "type": "address"
1114
+ },
1115
+ {
1116
+ "name": "_tokenB",
1117
+ "type": "address"
1118
+ },
1119
+ {
1120
+ "name": "_lpAmount",
1121
+ "type": "uint256"
1122
+ }
1123
+ ],
1124
+ "name": "getRemoveLiqAmountsOut",
1125
+ "outputs": [
1126
+ {
1127
+ "name": "",
1128
+ "type": "uint256"
1129
+ },
1130
+ {
1131
+ "name": "",
1132
+ "type": "uint256"
1133
+ }
1134
+ ],
1135
+ "stateMutability": "view",
1136
+ "type": "function"
1137
+ },
1138
+ {
1139
+ "inputs": [
1140
+ {
1141
+ "name": "_pool",
1142
+ "type": "address"
1143
+ },
1144
+ {
1145
+ "name": "_targetToken",
1146
+ "type": "address"
1147
+ }
1148
+ ],
1149
+ "name": "getPriceUnsafe",
1150
+ "outputs": [
1151
+ {
1152
+ "name": "",
1153
+ "type": "uint256"
1154
+ }
1155
+ ],
1156
+ "stateMutability": "view",
1157
+ "type": "function"
1158
+ },
1159
+ {
1160
+ "inputs": [
1161
+ {
1162
+ "name": "_pool",
1163
+ "type": "address"
1164
+ },
1165
+ {
1166
+ "name": "_targetToken",
1167
+ "type": "address"
1168
+ },
1169
+ {
1170
+ "name": "_oracleRegistry",
1171
+ "type": "address"
1172
+ }
1173
+ ],
1174
+ "name": "getPriceUnsafe",
1175
+ "outputs": [
1176
+ {
1177
+ "name": "",
1178
+ "type": "uint256"
1179
+ }
1180
+ ],
1181
+ "stateMutability": "view",
1182
+ "type": "function"
1183
+ },
1184
+ {
1185
+ "inputs": [
1186
+ {
1187
+ "name": "_addr",
1188
+ "type": "address"
1189
+ }
1190
+ ],
1191
+ "name": "setCoreRouterPool",
1192
+ "outputs": [
1193
+ {
1194
+ "name": "",
1195
+ "type": "bool"
1196
+ }
1197
+ ],
1198
+ "stateMutability": "nonpayable",
1199
+ "type": "function"
1200
+ },
1201
+ {
1202
+ "inputs": [
1203
+ {
1204
+ "name": "_asset",
1205
+ "type": "address"
1206
+ },
1207
+ {
1208
+ "name": "_recipient",
1209
+ "type": "address"
1210
+ }
1211
+ ],
1212
+ "name": "recoverFunds",
1213
+ "outputs": [
1214
+ {
1215
+ "name": "",
1216
+ "type": "bool"
1217
+ }
1218
+ ],
1219
+ "stateMutability": "nonpayable",
1220
+ "type": "function"
1221
+ },
1222
+ {
1223
+ "inputs": [
1224
+ {
1225
+ "name": "_collection",
1226
+ "type": "address"
1227
+ },
1228
+ {
1229
+ "name": "_nftTokenId",
1230
+ "type": "uint256"
1231
+ },
1232
+ {
1233
+ "name": "_recipient",
1234
+ "type": "address"
1235
+ }
1236
+ ],
1237
+ "name": "recoverNft",
1238
+ "outputs": [
1239
+ {
1240
+ "name": "",
1241
+ "type": "bool"
1242
+ }
1243
+ ],
1244
+ "stateMutability": "nonpayable",
1245
+ "type": "function"
1246
+ },
1247
+ {
1248
+ "inputs": [
1249
+ {
1250
+ "name": "_legoId",
1251
+ "type": "uint256"
1252
+ }
1253
+ ],
1254
+ "name": "setLegoId",
1255
+ "outputs": [
1256
+ {
1257
+ "name": "",
1258
+ "type": "bool"
1259
+ }
1260
+ ],
1261
+ "stateMutability": "nonpayable",
1262
+ "type": "function"
1263
+ },
1264
+ {
1265
+ "inputs": [
1266
+ {
1267
+ "name": "_shouldActivate",
1268
+ "type": "bool"
1269
+ }
1270
+ ],
1271
+ "name": "activate",
1272
+ "outputs": [],
1273
+ "stateMutability": "nonpayable",
1274
+ "type": "function"
1275
+ },
1276
+ {
1277
+ "inputs": [],
1278
+ "name": "coreRouterPool",
1279
+ "outputs": [
1280
+ {
1281
+ "name": "",
1282
+ "type": "address"
1283
+ }
1284
+ ],
1285
+ "stateMutability": "view",
1286
+ "type": "function"
1287
+ },
1288
+ {
1289
+ "inputs": [],
1290
+ "name": "AERO_SLIPSTREAM_FACTORY",
1291
+ "outputs": [
1292
+ {
1293
+ "name": "",
1294
+ "type": "address"
1295
+ }
1296
+ ],
1297
+ "stateMutability": "view",
1298
+ "type": "function"
1299
+ },
1300
+ {
1301
+ "inputs": [],
1302
+ "name": "AERO_SLIPSTREAM_NFT_MANAGER",
1303
+ "outputs": [
1304
+ {
1305
+ "name": "",
1306
+ "type": "address"
1307
+ }
1308
+ ],
1309
+ "stateMutability": "view",
1310
+ "type": "function"
1311
+ },
1312
+ {
1313
+ "inputs": [],
1314
+ "name": "AERO_SLIPSTREAM_QUOTER",
1315
+ "outputs": [
1316
+ {
1317
+ "name": "",
1318
+ "type": "address"
1319
+ }
1320
+ ],
1321
+ "stateMutability": "view",
1322
+ "type": "function"
1323
+ },
1324
+ {
1325
+ "inputs": [],
1326
+ "name": "legoId",
1327
+ "outputs": [
1328
+ {
1329
+ "name": "",
1330
+ "type": "uint256"
1331
+ }
1332
+ ],
1333
+ "stateMutability": "view",
1334
+ "type": "function"
1335
+ },
1336
+ {
1337
+ "inputs": [],
1338
+ "name": "isActivated",
1339
+ "outputs": [
1340
+ {
1341
+ "name": "",
1342
+ "type": "bool"
1343
+ }
1344
+ ],
1345
+ "stateMutability": "view",
1346
+ "type": "function"
1347
+ },
1348
+ {
1349
+ "inputs": [],
1350
+ "name": "ADDY_REGISTRY",
1351
+ "outputs": [
1352
+ {
1353
+ "name": "",
1354
+ "type": "address"
1355
+ }
1356
+ ],
1357
+ "stateMutability": "view",
1358
+ "type": "function"
1359
+ },
1360
+ {
1361
+ "inputs": [
1362
+ {
1363
+ "name": "_aeroFactory",
1364
+ "type": "address"
1365
+ },
1366
+ {
1367
+ "name": "_aeroNftPositionManager",
1368
+ "type": "address"
1369
+ },
1370
+ {
1371
+ "name": "_aeroQuoter",
1372
+ "type": "address"
1373
+ },
1374
+ {
1375
+ "name": "_addyRegistry",
1376
+ "type": "address"
1377
+ },
1378
+ {
1379
+ "name": "_coreRouterPool",
1380
+ "type": "address"
1381
+ }
1382
+ ],
1383
+ "outputs": [],
1384
+ "stateMutability": "nonpayable",
1385
+ "type": "constructor"
1386
+ }
1387
+ ];
1388
+ export const deployAddress = undefined;
1389
+ function getRequest(method, args, contractAddressOrOptions) {
1390
+ const address = typeof contractAddressOrOptions === 'string' ? contractAddressOrOptions : contractAddressOrOptions?.contractAddress;
1391
+ const defaultValue = typeof contractAddressOrOptions === 'string' ? undefined : contractAddressOrOptions?.defaultValue;
1392
+ const call = {
1393
+ contractName: 'LegoAeroSlipstream',
1394
+ method,
1395
+ args,
1396
+ address,
1397
+ deployAddress,
1398
+ defaultValue,
1399
+ getAbi: () => abi,
1400
+ with: (options) => {
1401
+ call.address = options.contractAddress;
1402
+ call.defaultValue = options.defaultValue;
1403
+ return call;
1404
+ },
1405
+ defaultTo: (defaultValue) => {
1406
+ call.defaultValue = defaultValue;
1407
+ return call;
1408
+ },
1409
+ at: (address) => {
1410
+ call.address = address;
1411
+ return call;
1412
+ },
1413
+ };
1414
+ return call;
1415
+ }
1416
+ export const call = {
1417
+ isGovernor: (...args) => getRequest('isGovernor', args),
1418
+ isValidLocalGovernor: (...args) => getRequest('isValidLocalGovernor', args),
1419
+ localGovernor: (...args) => getRequest('localGovernor', args),
1420
+ onERC721Received: (...args) => getRequest('onERC721Received', args),
1421
+ getRegistries: (...args) => getRequest('getRegistries', args),
1422
+ getAccessForLego: (...args) => getRequest('getAccessForLego', args),
1423
+ hasClaimableRewards: (...args) => getRequest('hasClaimableRewards', args),
1424
+ getLpToken: (...args) => getRequest('getLpToken', args),
1425
+ getPoolForLpToken: (...args) => getRequest('getPoolForLpToken', args),
1426
+ getCoreRouterPool: (...args) => getRequest('getCoreRouterPool', args),
1427
+ getDeepestLiqPool: (...args) => getRequest('getDeepestLiqPool', args),
1428
+ getAddLiqAmountsIn: (...args) => getRequest('getAddLiqAmountsIn', args),
1429
+ getRemoveLiqAmountsOut: (...args) => getRequest('getRemoveLiqAmountsOut', args),
1430
+ getPriceUnsafe: (...args) => getRequest('getPriceUnsafe', args),
1431
+ coreRouterPool: (...args) => getRequest('coreRouterPool', args),
1432
+ AERO_SLIPSTREAM_FACTORY: (...args) => getRequest('AERO_SLIPSTREAM_FACTORY', args),
1433
+ AERO_SLIPSTREAM_NFT_MANAGER: (...args) => getRequest('AERO_SLIPSTREAM_NFT_MANAGER', args),
1434
+ AERO_SLIPSTREAM_QUOTER: (...args) => getRequest('AERO_SLIPSTREAM_QUOTER', args),
1435
+ legoId: (...args) => getRequest('legoId', args),
1436
+ isActivated: (...args) => getRequest('isActivated', args),
1437
+ ADDY_REGISTRY: (...args) => getRequest('ADDY_REGISTRY', args),
1438
+ };
1439
+ function getMutation(functionName) {
1440
+ return {
1441
+ contractName: 'LegoAeroSlipstream',
1442
+ functionName,
1443
+ deployAddress,
1444
+ argsType: undefined,
1445
+ getAbi: () => abi,
1446
+ };
1447
+ }
1448
+ export const mutation = {
1449
+ setLocalGovernor: getMutation('setLocalGovernor'),
1450
+ swapTokens: getMutation('swapTokens'),
1451
+ uniswapV3SwapCallback: getMutation('uniswapV3SwapCallback'),
1452
+ addLiquidity: getMutation('addLiquidity'),
1453
+ removeLiquidity: getMutation('removeLiquidity'),
1454
+ claimRewards: getMutation('claimRewards'),
1455
+ getBestSwapAmountOut: getMutation('getBestSwapAmountOut'),
1456
+ getSwapAmountOut: getMutation('getSwapAmountOut'),
1457
+ getBestSwapAmountIn: getMutation('getBestSwapAmountIn'),
1458
+ getSwapAmountIn: getMutation('getSwapAmountIn'),
1459
+ setCoreRouterPool: getMutation('setCoreRouterPool'),
1460
+ recoverFunds: getMutation('recoverFunds'),
1461
+ recoverNft: getMutation('recoverNft'),
1462
+ setLegoId: getMutation('setLegoId'),
1463
+ activate: getMutation('activate'),
1464
+ };
1465
+ export function toSdk(publicClient, walletClient) {
1466
+ return {
1467
+ // Queries
1468
+ isGovernor: (...args) => singleQuery(publicClient, call.isGovernor(...args)),
1469
+ isValidLocalGovernor: (...args) => singleQuery(publicClient, call.isValidLocalGovernor(...args)),
1470
+ localGovernor: (...args) => singleQuery(publicClient, call.localGovernor(...args)),
1471
+ onERC721Received: (...args) => singleQuery(publicClient, call.onERC721Received(...args)),
1472
+ getRegistries: (...args) => singleQuery(publicClient, call.getRegistries(...args)),
1473
+ getAccessForLego: (...args) => singleQuery(publicClient, call.getAccessForLego(...args)),
1474
+ hasClaimableRewards: (...args) => singleQuery(publicClient, call.hasClaimableRewards(...args)),
1475
+ getLpToken: (...args) => singleQuery(publicClient, call.getLpToken(...args)),
1476
+ getPoolForLpToken: (...args) => singleQuery(publicClient, call.getPoolForLpToken(...args)),
1477
+ getCoreRouterPool: (...args) => singleQuery(publicClient, call.getCoreRouterPool(...args)),
1478
+ getDeepestLiqPool: (...args) => singleQuery(publicClient, call.getDeepestLiqPool(...args)),
1479
+ getAddLiqAmountsIn: (...args) => singleQuery(publicClient, call.getAddLiqAmountsIn(...args)),
1480
+ getRemoveLiqAmountsOut: (...args) => singleQuery(publicClient, call.getRemoveLiqAmountsOut(...args)),
1481
+ getPriceUnsafe: (...args) => singleQuery(publicClient, call.getPriceUnsafe(...args)),
1482
+ coreRouterPool: (...args) => singleQuery(publicClient, call.coreRouterPool(...args)),
1483
+ AERO_SLIPSTREAM_FACTORY: (...args) => singleQuery(publicClient, call.AERO_SLIPSTREAM_FACTORY(...args)),
1484
+ AERO_SLIPSTREAM_NFT_MANAGER: (...args) => singleQuery(publicClient, call.AERO_SLIPSTREAM_NFT_MANAGER(...args)),
1485
+ AERO_SLIPSTREAM_QUOTER: (...args) => singleQuery(publicClient, call.AERO_SLIPSTREAM_QUOTER(...args)),
1486
+ legoId: (...args) => singleQuery(publicClient, call.legoId(...args)),
1487
+ isActivated: (...args) => singleQuery(publicClient, call.isActivated(...args)),
1488
+ ADDY_REGISTRY: (...args) => singleQuery(publicClient, call.ADDY_REGISTRY(...args)),
1489
+ // Mutations
1490
+ setLocalGovernor: (...args) => mutate(walletClient, mutation.setLocalGovernor)(...args),
1491
+ swapTokens: (...args) => mutate(walletClient, mutation.swapTokens)(...args),
1492
+ uniswapV3SwapCallback: (...args) => mutate(walletClient, mutation.uniswapV3SwapCallback)(...args),
1493
+ addLiquidity: (...args) => mutate(walletClient, mutation.addLiquidity)(...args),
1494
+ removeLiquidity: (...args) => mutate(walletClient, mutation.removeLiquidity)(...args),
1495
+ claimRewards: (...args) => mutate(walletClient, mutation.claimRewards)(...args),
1496
+ getBestSwapAmountOut: (...args) => mutate(walletClient, mutation.getBestSwapAmountOut)(...args),
1497
+ getSwapAmountOut: (...args) => mutate(walletClient, mutation.getSwapAmountOut)(...args),
1498
+ getBestSwapAmountIn: (...args) => mutate(walletClient, mutation.getBestSwapAmountIn)(...args),
1499
+ getSwapAmountIn: (...args) => mutate(walletClient, mutation.getSwapAmountIn)(...args),
1500
+ setCoreRouterPool: (...args) => mutate(walletClient, mutation.setCoreRouterPool)(...args),
1501
+ recoverFunds: (...args) => mutate(walletClient, mutation.recoverFunds)(...args),
1502
+ recoverNft: (...args) => mutate(walletClient, mutation.recoverNft)(...args),
1503
+ setLegoId: (...args) => mutate(walletClient, mutation.setLegoId)(...args),
1504
+ activate: (...args) => mutate(walletClient, mutation.activate)(...args),
1505
+ };
1506
+ }