@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,1015 @@
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": "asset",
18
+ "type": "address"
19
+ },
20
+ {
21
+ "indexed": true,
22
+ "name": "vaultToken",
23
+ "type": "address"
24
+ },
25
+ {
26
+ "indexed": false,
27
+ "name": "assetAmountDeposited",
28
+ "type": "uint256"
29
+ },
30
+ {
31
+ "indexed": false,
32
+ "name": "usdValue",
33
+ "type": "uint256"
34
+ },
35
+ {
36
+ "indexed": false,
37
+ "name": "vaultTokenAmountReceived",
38
+ "type": "uint256"
39
+ },
40
+ {
41
+ "indexed": false,
42
+ "name": "recipient",
43
+ "type": "address"
44
+ }
45
+ ],
46
+ "name": "SkyDeposit",
47
+ "type": "event"
48
+ },
49
+ {
50
+ "anonymous": false,
51
+ "inputs": [
52
+ {
53
+ "indexed": true,
54
+ "name": "sender",
55
+ "type": "address"
56
+ },
57
+ {
58
+ "indexed": true,
59
+ "name": "asset",
60
+ "type": "address"
61
+ },
62
+ {
63
+ "indexed": true,
64
+ "name": "vaultToken",
65
+ "type": "address"
66
+ },
67
+ {
68
+ "indexed": false,
69
+ "name": "assetAmountReceived",
70
+ "type": "uint256"
71
+ },
72
+ {
73
+ "indexed": false,
74
+ "name": "usdValue",
75
+ "type": "uint256"
76
+ },
77
+ {
78
+ "indexed": false,
79
+ "name": "vaultTokenAmountBurned",
80
+ "type": "uint256"
81
+ },
82
+ {
83
+ "indexed": false,
84
+ "name": "recipient",
85
+ "type": "address"
86
+ }
87
+ ],
88
+ "name": "SkyWithdrawal",
89
+ "type": "event"
90
+ },
91
+ {
92
+ "anonymous": false,
93
+ "inputs": [
94
+ {
95
+ "indexed": true,
96
+ "name": "asset",
97
+ "type": "address"
98
+ },
99
+ {
100
+ "indexed": true,
101
+ "name": "vaultToken",
102
+ "type": "address"
103
+ }
104
+ ],
105
+ "name": "AssetOpportunityAdded",
106
+ "type": "event"
107
+ },
108
+ {
109
+ "anonymous": false,
110
+ "inputs": [
111
+ {
112
+ "indexed": true,
113
+ "name": "asset",
114
+ "type": "address"
115
+ },
116
+ {
117
+ "indexed": true,
118
+ "name": "vaultToken",
119
+ "type": "address"
120
+ }
121
+ ],
122
+ "name": "AssetOpportunityRemoved",
123
+ "type": "event"
124
+ },
125
+ {
126
+ "anonymous": false,
127
+ "inputs": [
128
+ {
129
+ "indexed": true,
130
+ "name": "asset",
131
+ "type": "address"
132
+ },
133
+ {
134
+ "indexed": true,
135
+ "name": "recipient",
136
+ "type": "address"
137
+ },
138
+ {
139
+ "indexed": false,
140
+ "name": "amount",
141
+ "type": "uint256"
142
+ }
143
+ ],
144
+ "name": "SkyFundsRecovered",
145
+ "type": "event"
146
+ },
147
+ {
148
+ "anonymous": false,
149
+ "inputs": [
150
+ {
151
+ "indexed": false,
152
+ "name": "legoId",
153
+ "type": "uint256"
154
+ }
155
+ ],
156
+ "name": "SkyLegoIdSet",
157
+ "type": "event"
158
+ },
159
+ {
160
+ "anonymous": false,
161
+ "inputs": [
162
+ {
163
+ "indexed": false,
164
+ "name": "isActivated",
165
+ "type": "bool"
166
+ }
167
+ ],
168
+ "name": "SkyActivated",
169
+ "type": "event"
170
+ },
171
+ {
172
+ "anonymous": false,
173
+ "inputs": [
174
+ {
175
+ "indexed": true,
176
+ "name": "addr",
177
+ "type": "address"
178
+ }
179
+ ],
180
+ "name": "LocalGovernorSet",
181
+ "type": "event"
182
+ },
183
+ {
184
+ "inputs": [
185
+ {
186
+ "name": "_address",
187
+ "type": "address"
188
+ }
189
+ ],
190
+ "name": "isGovernor",
191
+ "outputs": [
192
+ {
193
+ "name": "",
194
+ "type": "bool"
195
+ }
196
+ ],
197
+ "stateMutability": "view",
198
+ "type": "function"
199
+ },
200
+ {
201
+ "inputs": [
202
+ {
203
+ "name": "_newGovernor",
204
+ "type": "address"
205
+ }
206
+ ],
207
+ "name": "isValidLocalGovernor",
208
+ "outputs": [
209
+ {
210
+ "name": "",
211
+ "type": "bool"
212
+ }
213
+ ],
214
+ "stateMutability": "view",
215
+ "type": "function"
216
+ },
217
+ {
218
+ "inputs": [
219
+ {
220
+ "name": "_newGovernor",
221
+ "type": "address"
222
+ }
223
+ ],
224
+ "name": "setLocalGovernor",
225
+ "outputs": [
226
+ {
227
+ "name": "",
228
+ "type": "bool"
229
+ }
230
+ ],
231
+ "stateMutability": "nonpayable",
232
+ "type": "function"
233
+ },
234
+ {
235
+ "inputs": [],
236
+ "name": "localGovernor",
237
+ "outputs": [
238
+ {
239
+ "name": "",
240
+ "type": "address"
241
+ }
242
+ ],
243
+ "stateMutability": "view",
244
+ "type": "function"
245
+ },
246
+ {
247
+ "inputs": [],
248
+ "name": "getRegistries",
249
+ "outputs": [
250
+ {
251
+ "name": "",
252
+ "type": "address[]"
253
+ }
254
+ ],
255
+ "stateMutability": "view",
256
+ "type": "function"
257
+ },
258
+ {
259
+ "inputs": [
260
+ {
261
+ "name": "_user",
262
+ "type": "address"
263
+ }
264
+ ],
265
+ "name": "getAccessForLego",
266
+ "outputs": [
267
+ {
268
+ "name": "",
269
+ "type": "address"
270
+ },
271
+ {
272
+ "name": "",
273
+ "type": "string"
274
+ },
275
+ {
276
+ "name": "",
277
+ "type": "uint256"
278
+ }
279
+ ],
280
+ "stateMutability": "view",
281
+ "type": "function"
282
+ },
283
+ {
284
+ "inputs": [
285
+ {
286
+ "name": "_asset",
287
+ "type": "address"
288
+ }
289
+ ],
290
+ "name": "getAssetOpportunities",
291
+ "outputs": [
292
+ {
293
+ "name": "",
294
+ "type": "address[]"
295
+ }
296
+ ],
297
+ "stateMutability": "view",
298
+ "type": "function"
299
+ },
300
+ {
301
+ "inputs": [],
302
+ "name": "getAssets",
303
+ "outputs": [
304
+ {
305
+ "name": "",
306
+ "type": "address[]"
307
+ }
308
+ ],
309
+ "stateMutability": "view",
310
+ "type": "function"
311
+ },
312
+ {
313
+ "inputs": [
314
+ {
315
+ "name": "_vaultToken",
316
+ "type": "address"
317
+ }
318
+ ],
319
+ "name": "isVaultToken",
320
+ "outputs": [
321
+ {
322
+ "name": "",
323
+ "type": "bool"
324
+ }
325
+ ],
326
+ "stateMutability": "view",
327
+ "type": "function"
328
+ },
329
+ {
330
+ "inputs": [
331
+ {
332
+ "name": "_vaultToken",
333
+ "type": "address"
334
+ }
335
+ ],
336
+ "name": "getUnderlyingAsset",
337
+ "outputs": [
338
+ {
339
+ "name": "",
340
+ "type": "address"
341
+ }
342
+ ],
343
+ "stateMutability": "view",
344
+ "type": "function"
345
+ },
346
+ {
347
+ "inputs": [
348
+ {
349
+ "name": "_vaultToken",
350
+ "type": "address"
351
+ },
352
+ {
353
+ "name": "_vaultTokenAmount",
354
+ "type": "uint256"
355
+ }
356
+ ],
357
+ "name": "getUnderlyingAmount",
358
+ "outputs": [
359
+ {
360
+ "name": "",
361
+ "type": "uint256"
362
+ }
363
+ ],
364
+ "stateMutability": "view",
365
+ "type": "function"
366
+ },
367
+ {
368
+ "inputs": [
369
+ {
370
+ "name": "_asset",
371
+ "type": "address"
372
+ },
373
+ {
374
+ "name": "_assetAmount",
375
+ "type": "uint256"
376
+ },
377
+ {
378
+ "name": "_vaultToken",
379
+ "type": "address"
380
+ }
381
+ ],
382
+ "name": "getVaultTokenAmount",
383
+ "outputs": [
384
+ {
385
+ "name": "",
386
+ "type": "uint256"
387
+ }
388
+ ],
389
+ "stateMutability": "view",
390
+ "type": "function"
391
+ },
392
+ {
393
+ "inputs": [
394
+ {
395
+ "name": "_vaultToken",
396
+ "type": "address"
397
+ },
398
+ {
399
+ "name": "_vaultTokenAmount",
400
+ "type": "uint256"
401
+ }
402
+ ],
403
+ "name": "getUsdValueOfVaultToken",
404
+ "outputs": [
405
+ {
406
+ "name": "",
407
+ "type": "uint256"
408
+ }
409
+ ],
410
+ "stateMutability": "view",
411
+ "type": "function"
412
+ },
413
+ {
414
+ "inputs": [
415
+ {
416
+ "name": "_vaultToken",
417
+ "type": "address"
418
+ },
419
+ {
420
+ "name": "_vaultTokenAmount",
421
+ "type": "uint256"
422
+ },
423
+ {
424
+ "name": "_oracleRegistry",
425
+ "type": "address"
426
+ }
427
+ ],
428
+ "name": "getUsdValueOfVaultToken",
429
+ "outputs": [
430
+ {
431
+ "name": "",
432
+ "type": "uint256"
433
+ }
434
+ ],
435
+ "stateMutability": "view",
436
+ "type": "function"
437
+ },
438
+ {
439
+ "inputs": [
440
+ {
441
+ "name": "_vaultToken",
442
+ "type": "address"
443
+ },
444
+ {
445
+ "name": "_vaultTokenAmount",
446
+ "type": "uint256"
447
+ }
448
+ ],
449
+ "name": "getUnderlyingData",
450
+ "outputs": [
451
+ {
452
+ "name": "",
453
+ "type": "address"
454
+ },
455
+ {
456
+ "name": "",
457
+ "type": "uint256"
458
+ },
459
+ {
460
+ "name": "",
461
+ "type": "uint256"
462
+ }
463
+ ],
464
+ "stateMutability": "view",
465
+ "type": "function"
466
+ },
467
+ {
468
+ "inputs": [
469
+ {
470
+ "name": "_vaultToken",
471
+ "type": "address"
472
+ },
473
+ {
474
+ "name": "_vaultTokenAmount",
475
+ "type": "uint256"
476
+ },
477
+ {
478
+ "name": "_oracleRegistry",
479
+ "type": "address"
480
+ }
481
+ ],
482
+ "name": "getUnderlyingData",
483
+ "outputs": [
484
+ {
485
+ "name": "",
486
+ "type": "address"
487
+ },
488
+ {
489
+ "name": "",
490
+ "type": "uint256"
491
+ },
492
+ {
493
+ "name": "",
494
+ "type": "uint256"
495
+ }
496
+ ],
497
+ "stateMutability": "view",
498
+ "type": "function"
499
+ },
500
+ {
501
+ "inputs": [
502
+ {
503
+ "name": "_vaultToken",
504
+ "type": "address"
505
+ }
506
+ ],
507
+ "name": "totalAssets",
508
+ "outputs": [
509
+ {
510
+ "name": "",
511
+ "type": "uint256"
512
+ }
513
+ ],
514
+ "stateMutability": "view",
515
+ "type": "function"
516
+ },
517
+ {
518
+ "inputs": [
519
+ {
520
+ "name": "_vaultToken",
521
+ "type": "address"
522
+ }
523
+ ],
524
+ "name": "totalBorrows",
525
+ "outputs": [
526
+ {
527
+ "name": "",
528
+ "type": "uint256"
529
+ }
530
+ ],
531
+ "stateMutability": "view",
532
+ "type": "function"
533
+ },
534
+ {
535
+ "inputs": [
536
+ {
537
+ "name": "_asset",
538
+ "type": "address"
539
+ },
540
+ {
541
+ "name": "_amount",
542
+ "type": "uint256"
543
+ },
544
+ {
545
+ "name": "_vault",
546
+ "type": "address"
547
+ },
548
+ {
549
+ "name": "_recipient",
550
+ "type": "address"
551
+ }
552
+ ],
553
+ "name": "depositTokens",
554
+ "outputs": [
555
+ {
556
+ "name": "",
557
+ "type": "uint256"
558
+ },
559
+ {
560
+ "name": "",
561
+ "type": "address"
562
+ },
563
+ {
564
+ "name": "",
565
+ "type": "uint256"
566
+ },
567
+ {
568
+ "name": "",
569
+ "type": "uint256"
570
+ },
571
+ {
572
+ "name": "",
573
+ "type": "uint256"
574
+ }
575
+ ],
576
+ "stateMutability": "nonpayable",
577
+ "type": "function"
578
+ },
579
+ {
580
+ "inputs": [
581
+ {
582
+ "name": "_asset",
583
+ "type": "address"
584
+ },
585
+ {
586
+ "name": "_amount",
587
+ "type": "uint256"
588
+ },
589
+ {
590
+ "name": "_vault",
591
+ "type": "address"
592
+ },
593
+ {
594
+ "name": "_recipient",
595
+ "type": "address"
596
+ },
597
+ {
598
+ "name": "_oracleRegistry",
599
+ "type": "address"
600
+ }
601
+ ],
602
+ "name": "depositTokens",
603
+ "outputs": [
604
+ {
605
+ "name": "",
606
+ "type": "uint256"
607
+ },
608
+ {
609
+ "name": "",
610
+ "type": "address"
611
+ },
612
+ {
613
+ "name": "",
614
+ "type": "uint256"
615
+ },
616
+ {
617
+ "name": "",
618
+ "type": "uint256"
619
+ },
620
+ {
621
+ "name": "",
622
+ "type": "uint256"
623
+ }
624
+ ],
625
+ "stateMutability": "nonpayable",
626
+ "type": "function"
627
+ },
628
+ {
629
+ "inputs": [
630
+ {
631
+ "name": "_asset",
632
+ "type": "address"
633
+ },
634
+ {
635
+ "name": "_amount",
636
+ "type": "uint256"
637
+ },
638
+ {
639
+ "name": "_vaultToken",
640
+ "type": "address"
641
+ },
642
+ {
643
+ "name": "_recipient",
644
+ "type": "address"
645
+ }
646
+ ],
647
+ "name": "withdrawTokens",
648
+ "outputs": [
649
+ {
650
+ "name": "",
651
+ "type": "uint256"
652
+ },
653
+ {
654
+ "name": "",
655
+ "type": "uint256"
656
+ },
657
+ {
658
+ "name": "",
659
+ "type": "uint256"
660
+ },
661
+ {
662
+ "name": "",
663
+ "type": "uint256"
664
+ }
665
+ ],
666
+ "stateMutability": "nonpayable",
667
+ "type": "function"
668
+ },
669
+ {
670
+ "inputs": [
671
+ {
672
+ "name": "_asset",
673
+ "type": "address"
674
+ },
675
+ {
676
+ "name": "_amount",
677
+ "type": "uint256"
678
+ },
679
+ {
680
+ "name": "_vaultToken",
681
+ "type": "address"
682
+ },
683
+ {
684
+ "name": "_recipient",
685
+ "type": "address"
686
+ },
687
+ {
688
+ "name": "_oracleRegistry",
689
+ "type": "address"
690
+ }
691
+ ],
692
+ "name": "withdrawTokens",
693
+ "outputs": [
694
+ {
695
+ "name": "",
696
+ "type": "uint256"
697
+ },
698
+ {
699
+ "name": "",
700
+ "type": "uint256"
701
+ },
702
+ {
703
+ "name": "",
704
+ "type": "uint256"
705
+ },
706
+ {
707
+ "name": "",
708
+ "type": "uint256"
709
+ }
710
+ ],
711
+ "stateMutability": "nonpayable",
712
+ "type": "function"
713
+ },
714
+ {
715
+ "inputs": [
716
+ {
717
+ "name": "_user",
718
+ "type": "address"
719
+ },
720
+ {
721
+ "name": "_market",
722
+ "type": "address"
723
+ },
724
+ {
725
+ "name": "_rewardToken",
726
+ "type": "address"
727
+ },
728
+ {
729
+ "name": "_rewardAmount",
730
+ "type": "uint256"
731
+ },
732
+ {
733
+ "name": "_proof",
734
+ "type": "bytes32"
735
+ }
736
+ ],
737
+ "name": "claimRewards",
738
+ "outputs": [],
739
+ "stateMutability": "nonpayable",
740
+ "type": "function"
741
+ },
742
+ {
743
+ "inputs": [
744
+ {
745
+ "name": "_user",
746
+ "type": "address"
747
+ }
748
+ ],
749
+ "name": "hasClaimableRewards",
750
+ "outputs": [
751
+ {
752
+ "name": "",
753
+ "type": "bool"
754
+ }
755
+ ],
756
+ "stateMutability": "view",
757
+ "type": "function"
758
+ },
759
+ {
760
+ "inputs": [
761
+ {
762
+ "name": "_asset",
763
+ "type": "address"
764
+ },
765
+ {
766
+ "name": "_recipient",
767
+ "type": "address"
768
+ }
769
+ ],
770
+ "name": "recoverFunds",
771
+ "outputs": [
772
+ {
773
+ "name": "",
774
+ "type": "bool"
775
+ }
776
+ ],
777
+ "stateMutability": "nonpayable",
778
+ "type": "function"
779
+ },
780
+ {
781
+ "inputs": [
782
+ {
783
+ "name": "_legoId",
784
+ "type": "uint256"
785
+ }
786
+ ],
787
+ "name": "setLegoId",
788
+ "outputs": [
789
+ {
790
+ "name": "",
791
+ "type": "bool"
792
+ }
793
+ ],
794
+ "stateMutability": "nonpayable",
795
+ "type": "function"
796
+ },
797
+ {
798
+ "inputs": [
799
+ {
800
+ "name": "_shouldActivate",
801
+ "type": "bool"
802
+ }
803
+ ],
804
+ "name": "activate",
805
+ "outputs": [],
806
+ "stateMutability": "nonpayable",
807
+ "type": "function"
808
+ },
809
+ {
810
+ "inputs": [],
811
+ "name": "usdc",
812
+ "outputs": [
813
+ {
814
+ "name": "",
815
+ "type": "address"
816
+ }
817
+ ],
818
+ "stateMutability": "view",
819
+ "type": "function"
820
+ },
821
+ {
822
+ "inputs": [],
823
+ "name": "usds",
824
+ "outputs": [
825
+ {
826
+ "name": "",
827
+ "type": "address"
828
+ }
829
+ ],
830
+ "stateMutability": "view",
831
+ "type": "function"
832
+ },
833
+ {
834
+ "inputs": [],
835
+ "name": "susds",
836
+ "outputs": [
837
+ {
838
+ "name": "",
839
+ "type": "address"
840
+ }
841
+ ],
842
+ "stateMutability": "view",
843
+ "type": "function"
844
+ },
845
+ {
846
+ "inputs": [],
847
+ "name": "SKY_PSM",
848
+ "outputs": [
849
+ {
850
+ "name": "",
851
+ "type": "address"
852
+ }
853
+ ],
854
+ "stateMutability": "view",
855
+ "type": "function"
856
+ },
857
+ {
858
+ "inputs": [],
859
+ "name": "legoId",
860
+ "outputs": [
861
+ {
862
+ "name": "",
863
+ "type": "uint256"
864
+ }
865
+ ],
866
+ "stateMutability": "view",
867
+ "type": "function"
868
+ },
869
+ {
870
+ "inputs": [],
871
+ "name": "isActivated",
872
+ "outputs": [
873
+ {
874
+ "name": "",
875
+ "type": "bool"
876
+ }
877
+ ],
878
+ "stateMutability": "view",
879
+ "type": "function"
880
+ },
881
+ {
882
+ "inputs": [],
883
+ "name": "ADDY_REGISTRY",
884
+ "outputs": [
885
+ {
886
+ "name": "",
887
+ "type": "address"
888
+ }
889
+ ],
890
+ "stateMutability": "view",
891
+ "type": "function"
892
+ },
893
+ {
894
+ "inputs": [
895
+ {
896
+ "name": "_skyPsm",
897
+ "type": "address"
898
+ },
899
+ {
900
+ "name": "_addyRegistry",
901
+ "type": "address"
902
+ }
903
+ ],
904
+ "outputs": [],
905
+ "stateMutability": "nonpayable",
906
+ "type": "constructor"
907
+ }
908
+ ];
909
+ export const deployAddress = undefined;
910
+ function getRequest(method, args, contractAddressOrOptions) {
911
+ const address = typeof contractAddressOrOptions === 'string' ? contractAddressOrOptions : contractAddressOrOptions?.contractAddress;
912
+ const defaultValue = typeof contractAddressOrOptions === 'string' ? undefined : contractAddressOrOptions?.defaultValue;
913
+ const call = {
914
+ contractName: 'LegoSky',
915
+ method,
916
+ args,
917
+ address,
918
+ deployAddress,
919
+ defaultValue,
920
+ getAbi: () => abi,
921
+ with: (options) => {
922
+ call.address = options.contractAddress;
923
+ call.defaultValue = options.defaultValue;
924
+ return call;
925
+ },
926
+ defaultTo: (defaultValue) => {
927
+ call.defaultValue = defaultValue;
928
+ return call;
929
+ },
930
+ at: (address) => {
931
+ call.address = address;
932
+ return call;
933
+ },
934
+ };
935
+ return call;
936
+ }
937
+ export const call = {
938
+ isGovernor: (...args) => getRequest('isGovernor', args),
939
+ isValidLocalGovernor: (...args) => getRequest('isValidLocalGovernor', args),
940
+ localGovernor: (...args) => getRequest('localGovernor', args),
941
+ getRegistries: (...args) => getRequest('getRegistries', args),
942
+ getAccessForLego: (...args) => getRequest('getAccessForLego', args),
943
+ getAssetOpportunities: (...args) => getRequest('getAssetOpportunities', args),
944
+ getAssets: (...args) => getRequest('getAssets', args),
945
+ isVaultToken: (...args) => getRequest('isVaultToken', args),
946
+ getUnderlyingAsset: (...args) => getRequest('getUnderlyingAsset', args),
947
+ getUnderlyingAmount: (...args) => getRequest('getUnderlyingAmount', args),
948
+ getVaultTokenAmount: (...args) => getRequest('getVaultTokenAmount', args),
949
+ getUsdValueOfVaultToken: (...args) => getRequest('getUsdValueOfVaultToken', args),
950
+ getUnderlyingData: (...args) => getRequest('getUnderlyingData', args),
951
+ totalAssets: (...args) => getRequest('totalAssets', args),
952
+ totalBorrows: (...args) => getRequest('totalBorrows', args),
953
+ hasClaimableRewards: (...args) => getRequest('hasClaimableRewards', args),
954
+ usdc: (...args) => getRequest('usdc', args),
955
+ usds: (...args) => getRequest('usds', args),
956
+ susds: (...args) => getRequest('susds', args),
957
+ SKY_PSM: (...args) => getRequest('SKY_PSM', args),
958
+ legoId: (...args) => getRequest('legoId', args),
959
+ isActivated: (...args) => getRequest('isActivated', args),
960
+ ADDY_REGISTRY: (...args) => getRequest('ADDY_REGISTRY', args),
961
+ };
962
+ function getMutation(functionName) {
963
+ return {
964
+ contractName: 'LegoSky',
965
+ functionName,
966
+ deployAddress,
967
+ argsType: undefined,
968
+ getAbi: () => abi,
969
+ };
970
+ }
971
+ export const mutation = {
972
+ setLocalGovernor: getMutation('setLocalGovernor'),
973
+ depositTokens: getMutation('depositTokens'),
974
+ withdrawTokens: getMutation('withdrawTokens'),
975
+ claimRewards: getMutation('claimRewards'),
976
+ recoverFunds: getMutation('recoverFunds'),
977
+ setLegoId: getMutation('setLegoId'),
978
+ activate: getMutation('activate'),
979
+ };
980
+ export function toSdk(publicClient, walletClient) {
981
+ return {
982
+ // Queries
983
+ isGovernor: (...args) => singleQuery(publicClient, call.isGovernor(...args)),
984
+ isValidLocalGovernor: (...args) => singleQuery(publicClient, call.isValidLocalGovernor(...args)),
985
+ localGovernor: (...args) => singleQuery(publicClient, call.localGovernor(...args)),
986
+ getRegistries: (...args) => singleQuery(publicClient, call.getRegistries(...args)),
987
+ getAccessForLego: (...args) => singleQuery(publicClient, call.getAccessForLego(...args)),
988
+ getAssetOpportunities: (...args) => singleQuery(publicClient, call.getAssetOpportunities(...args)),
989
+ getAssets: (...args) => singleQuery(publicClient, call.getAssets(...args)),
990
+ isVaultToken: (...args) => singleQuery(publicClient, call.isVaultToken(...args)),
991
+ getUnderlyingAsset: (...args) => singleQuery(publicClient, call.getUnderlyingAsset(...args)),
992
+ getUnderlyingAmount: (...args) => singleQuery(publicClient, call.getUnderlyingAmount(...args)),
993
+ getVaultTokenAmount: (...args) => singleQuery(publicClient, call.getVaultTokenAmount(...args)),
994
+ getUsdValueOfVaultToken: (...args) => singleQuery(publicClient, call.getUsdValueOfVaultToken(...args)),
995
+ getUnderlyingData: (...args) => singleQuery(publicClient, call.getUnderlyingData(...args)),
996
+ totalAssets: (...args) => singleQuery(publicClient, call.totalAssets(...args)),
997
+ totalBorrows: (...args) => singleQuery(publicClient, call.totalBorrows(...args)),
998
+ hasClaimableRewards: (...args) => singleQuery(publicClient, call.hasClaimableRewards(...args)),
999
+ usdc: (...args) => singleQuery(publicClient, call.usdc(...args)),
1000
+ usds: (...args) => singleQuery(publicClient, call.usds(...args)),
1001
+ susds: (...args) => singleQuery(publicClient, call.susds(...args)),
1002
+ SKY_PSM: (...args) => singleQuery(publicClient, call.SKY_PSM(...args)),
1003
+ legoId: (...args) => singleQuery(publicClient, call.legoId(...args)),
1004
+ isActivated: (...args) => singleQuery(publicClient, call.isActivated(...args)),
1005
+ ADDY_REGISTRY: (...args) => singleQuery(publicClient, call.ADDY_REGISTRY(...args)),
1006
+ // Mutations
1007
+ setLocalGovernor: (...args) => mutate(walletClient, mutation.setLocalGovernor)(...args),
1008
+ depositTokens: (...args) => mutate(walletClient, mutation.depositTokens)(...args),
1009
+ withdrawTokens: (...args) => mutate(walletClient, mutation.withdrawTokens)(...args),
1010
+ claimRewards: (...args) => mutate(walletClient, mutation.claimRewards)(...args),
1011
+ recoverFunds: (...args) => mutate(walletClient, mutation.recoverFunds)(...args),
1012
+ setLegoId: (...args) => mutate(walletClient, mutation.setLegoId)(...args),
1013
+ activate: (...args) => mutate(walletClient, mutation.activate)(...args),
1014
+ };
1015
+ }