@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,1218 @@
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": "EulerDeposit",
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": "EulerWithdrawal",
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": "recipient",
102
+ "type": "address"
103
+ },
104
+ {
105
+ "indexed": false,
106
+ "name": "amount",
107
+ "type": "uint256"
108
+ }
109
+ ],
110
+ "name": "EulerFundsRecovered",
111
+ "type": "event"
112
+ },
113
+ {
114
+ "anonymous": false,
115
+ "inputs": [
116
+ {
117
+ "indexed": false,
118
+ "name": "addr",
119
+ "type": "address"
120
+ }
121
+ ],
122
+ "name": "EulerRewardsAddrSet",
123
+ "type": "event"
124
+ },
125
+ {
126
+ "anonymous": false,
127
+ "inputs": [
128
+ {
129
+ "indexed": false,
130
+ "name": "legoId",
131
+ "type": "uint256"
132
+ }
133
+ ],
134
+ "name": "EulerLegoIdSet",
135
+ "type": "event"
136
+ },
137
+ {
138
+ "anonymous": false,
139
+ "inputs": [
140
+ {
141
+ "indexed": false,
142
+ "name": "isActivated",
143
+ "type": "bool"
144
+ }
145
+ ],
146
+ "name": "EulerActivated",
147
+ "type": "event"
148
+ },
149
+ {
150
+ "anonymous": false,
151
+ "inputs": [
152
+ {
153
+ "indexed": true,
154
+ "name": "addr",
155
+ "type": "address"
156
+ }
157
+ ],
158
+ "name": "LocalGovernorSet",
159
+ "type": "event"
160
+ },
161
+ {
162
+ "anonymous": false,
163
+ "inputs": [
164
+ {
165
+ "indexed": true,
166
+ "name": "asset",
167
+ "type": "address"
168
+ },
169
+ {
170
+ "indexed": true,
171
+ "name": "vaultToken",
172
+ "type": "address"
173
+ }
174
+ ],
175
+ "name": "AssetOpportunityAdded",
176
+ "type": "event"
177
+ },
178
+ {
179
+ "anonymous": false,
180
+ "inputs": [
181
+ {
182
+ "indexed": true,
183
+ "name": "asset",
184
+ "type": "address"
185
+ },
186
+ {
187
+ "indexed": true,
188
+ "name": "vaultToken",
189
+ "type": "address"
190
+ }
191
+ ],
192
+ "name": "AssetOpportunityRemoved",
193
+ "type": "event"
194
+ },
195
+ {
196
+ "inputs": [
197
+ {
198
+ "name": "_asset",
199
+ "type": "address"
200
+ }
201
+ ],
202
+ "name": "getAssetOpportunities",
203
+ "outputs": [
204
+ {
205
+ "name": "",
206
+ "type": "address[]"
207
+ }
208
+ ],
209
+ "stateMutability": "view",
210
+ "type": "function"
211
+ },
212
+ {
213
+ "inputs": [],
214
+ "name": "getAssets",
215
+ "outputs": [
216
+ {
217
+ "name": "",
218
+ "type": "address[]"
219
+ }
220
+ ],
221
+ "stateMutability": "view",
222
+ "type": "function"
223
+ },
224
+ {
225
+ "inputs": [
226
+ {
227
+ "name": "arg0",
228
+ "type": "address"
229
+ },
230
+ {
231
+ "name": "arg1",
232
+ "type": "uint256"
233
+ }
234
+ ],
235
+ "name": "assetOpportunities",
236
+ "outputs": [
237
+ {
238
+ "name": "",
239
+ "type": "address"
240
+ }
241
+ ],
242
+ "stateMutability": "view",
243
+ "type": "function"
244
+ },
245
+ {
246
+ "inputs": [
247
+ {
248
+ "name": "arg0",
249
+ "type": "address"
250
+ },
251
+ {
252
+ "name": "arg1",
253
+ "type": "address"
254
+ }
255
+ ],
256
+ "name": "indexOfAssetOpportunity",
257
+ "outputs": [
258
+ {
259
+ "name": "",
260
+ "type": "uint256"
261
+ }
262
+ ],
263
+ "stateMutability": "view",
264
+ "type": "function"
265
+ },
266
+ {
267
+ "inputs": [
268
+ {
269
+ "name": "arg0",
270
+ "type": "address"
271
+ }
272
+ ],
273
+ "name": "numAssetOpportunities",
274
+ "outputs": [
275
+ {
276
+ "name": "",
277
+ "type": "uint256"
278
+ }
279
+ ],
280
+ "stateMutability": "view",
281
+ "type": "function"
282
+ },
283
+ {
284
+ "inputs": [
285
+ {
286
+ "name": "arg0",
287
+ "type": "address"
288
+ }
289
+ ],
290
+ "name": "vaultToAsset",
291
+ "outputs": [
292
+ {
293
+ "name": "",
294
+ "type": "address"
295
+ }
296
+ ],
297
+ "stateMutability": "view",
298
+ "type": "function"
299
+ },
300
+ {
301
+ "inputs": [
302
+ {
303
+ "name": "arg0",
304
+ "type": "uint256"
305
+ }
306
+ ],
307
+ "name": "assets",
308
+ "outputs": [
309
+ {
310
+ "name": "",
311
+ "type": "address"
312
+ }
313
+ ],
314
+ "stateMutability": "view",
315
+ "type": "function"
316
+ },
317
+ {
318
+ "inputs": [
319
+ {
320
+ "name": "arg0",
321
+ "type": "address"
322
+ }
323
+ ],
324
+ "name": "indexOfAsset",
325
+ "outputs": [
326
+ {
327
+ "name": "",
328
+ "type": "uint256"
329
+ }
330
+ ],
331
+ "stateMutability": "view",
332
+ "type": "function"
333
+ },
334
+ {
335
+ "inputs": [],
336
+ "name": "numAssets",
337
+ "outputs": [
338
+ {
339
+ "name": "",
340
+ "type": "uint256"
341
+ }
342
+ ],
343
+ "stateMutability": "view",
344
+ "type": "function"
345
+ },
346
+ {
347
+ "inputs": [
348
+ {
349
+ "name": "_address",
350
+ "type": "address"
351
+ }
352
+ ],
353
+ "name": "isGovernor",
354
+ "outputs": [
355
+ {
356
+ "name": "",
357
+ "type": "bool"
358
+ }
359
+ ],
360
+ "stateMutability": "view",
361
+ "type": "function"
362
+ },
363
+ {
364
+ "inputs": [
365
+ {
366
+ "name": "_newGovernor",
367
+ "type": "address"
368
+ }
369
+ ],
370
+ "name": "isValidLocalGovernor",
371
+ "outputs": [
372
+ {
373
+ "name": "",
374
+ "type": "bool"
375
+ }
376
+ ],
377
+ "stateMutability": "view",
378
+ "type": "function"
379
+ },
380
+ {
381
+ "inputs": [
382
+ {
383
+ "name": "_newGovernor",
384
+ "type": "address"
385
+ }
386
+ ],
387
+ "name": "setLocalGovernor",
388
+ "outputs": [
389
+ {
390
+ "name": "",
391
+ "type": "bool"
392
+ }
393
+ ],
394
+ "stateMutability": "nonpayable",
395
+ "type": "function"
396
+ },
397
+ {
398
+ "inputs": [],
399
+ "name": "localGovernor",
400
+ "outputs": [
401
+ {
402
+ "name": "",
403
+ "type": "address"
404
+ }
405
+ ],
406
+ "stateMutability": "view",
407
+ "type": "function"
408
+ },
409
+ {
410
+ "inputs": [],
411
+ "name": "getRegistries",
412
+ "outputs": [
413
+ {
414
+ "name": "",
415
+ "type": "address[]"
416
+ }
417
+ ],
418
+ "stateMutability": "view",
419
+ "type": "function"
420
+ },
421
+ {
422
+ "inputs": [
423
+ {
424
+ "name": "_user",
425
+ "type": "address"
426
+ }
427
+ ],
428
+ "name": "getAccessForLego",
429
+ "outputs": [
430
+ {
431
+ "name": "",
432
+ "type": "address"
433
+ },
434
+ {
435
+ "name": "",
436
+ "type": "string"
437
+ },
438
+ {
439
+ "name": "",
440
+ "type": "uint256"
441
+ }
442
+ ],
443
+ "stateMutability": "view",
444
+ "type": "function"
445
+ },
446
+ {
447
+ "inputs": [
448
+ {
449
+ "name": "_vaultToken",
450
+ "type": "address"
451
+ }
452
+ ],
453
+ "name": "isVaultToken",
454
+ "outputs": [
455
+ {
456
+ "name": "",
457
+ "type": "bool"
458
+ }
459
+ ],
460
+ "stateMutability": "view",
461
+ "type": "function"
462
+ },
463
+ {
464
+ "inputs": [
465
+ {
466
+ "name": "_vaultToken",
467
+ "type": "address"
468
+ }
469
+ ],
470
+ "name": "getUnderlyingAsset",
471
+ "outputs": [
472
+ {
473
+ "name": "",
474
+ "type": "address"
475
+ }
476
+ ],
477
+ "stateMutability": "view",
478
+ "type": "function"
479
+ },
480
+ {
481
+ "inputs": [
482
+ {
483
+ "name": "_vaultToken",
484
+ "type": "address"
485
+ },
486
+ {
487
+ "name": "_vaultTokenAmount",
488
+ "type": "uint256"
489
+ }
490
+ ],
491
+ "name": "getUnderlyingAmount",
492
+ "outputs": [
493
+ {
494
+ "name": "",
495
+ "type": "uint256"
496
+ }
497
+ ],
498
+ "stateMutability": "view",
499
+ "type": "function"
500
+ },
501
+ {
502
+ "inputs": [
503
+ {
504
+ "name": "_asset",
505
+ "type": "address"
506
+ },
507
+ {
508
+ "name": "_assetAmount",
509
+ "type": "uint256"
510
+ },
511
+ {
512
+ "name": "_vaultToken",
513
+ "type": "address"
514
+ }
515
+ ],
516
+ "name": "getVaultTokenAmount",
517
+ "outputs": [
518
+ {
519
+ "name": "",
520
+ "type": "uint256"
521
+ }
522
+ ],
523
+ "stateMutability": "view",
524
+ "type": "function"
525
+ },
526
+ {
527
+ "inputs": [
528
+ {
529
+ "name": "_vaultToken",
530
+ "type": "address"
531
+ },
532
+ {
533
+ "name": "_vaultTokenAmount",
534
+ "type": "uint256"
535
+ }
536
+ ],
537
+ "name": "getUsdValueOfVaultToken",
538
+ "outputs": [
539
+ {
540
+ "name": "",
541
+ "type": "uint256"
542
+ }
543
+ ],
544
+ "stateMutability": "view",
545
+ "type": "function"
546
+ },
547
+ {
548
+ "inputs": [
549
+ {
550
+ "name": "_vaultToken",
551
+ "type": "address"
552
+ },
553
+ {
554
+ "name": "_vaultTokenAmount",
555
+ "type": "uint256"
556
+ },
557
+ {
558
+ "name": "_oracleRegistry",
559
+ "type": "address"
560
+ }
561
+ ],
562
+ "name": "getUsdValueOfVaultToken",
563
+ "outputs": [
564
+ {
565
+ "name": "",
566
+ "type": "uint256"
567
+ }
568
+ ],
569
+ "stateMutability": "view",
570
+ "type": "function"
571
+ },
572
+ {
573
+ "inputs": [
574
+ {
575
+ "name": "_vaultToken",
576
+ "type": "address"
577
+ },
578
+ {
579
+ "name": "_vaultTokenAmount",
580
+ "type": "uint256"
581
+ }
582
+ ],
583
+ "name": "getUnderlyingData",
584
+ "outputs": [
585
+ {
586
+ "name": "",
587
+ "type": "address"
588
+ },
589
+ {
590
+ "name": "",
591
+ "type": "uint256"
592
+ },
593
+ {
594
+ "name": "",
595
+ "type": "uint256"
596
+ }
597
+ ],
598
+ "stateMutability": "view",
599
+ "type": "function"
600
+ },
601
+ {
602
+ "inputs": [
603
+ {
604
+ "name": "_vaultToken",
605
+ "type": "address"
606
+ },
607
+ {
608
+ "name": "_vaultTokenAmount",
609
+ "type": "uint256"
610
+ },
611
+ {
612
+ "name": "_oracleRegistry",
613
+ "type": "address"
614
+ }
615
+ ],
616
+ "name": "getUnderlyingData",
617
+ "outputs": [
618
+ {
619
+ "name": "",
620
+ "type": "address"
621
+ },
622
+ {
623
+ "name": "",
624
+ "type": "uint256"
625
+ },
626
+ {
627
+ "name": "",
628
+ "type": "uint256"
629
+ }
630
+ ],
631
+ "stateMutability": "view",
632
+ "type": "function"
633
+ },
634
+ {
635
+ "inputs": [
636
+ {
637
+ "name": "_vaultToken",
638
+ "type": "address"
639
+ }
640
+ ],
641
+ "name": "totalAssets",
642
+ "outputs": [
643
+ {
644
+ "name": "",
645
+ "type": "uint256"
646
+ }
647
+ ],
648
+ "stateMutability": "view",
649
+ "type": "function"
650
+ },
651
+ {
652
+ "inputs": [
653
+ {
654
+ "name": "_vaultToken",
655
+ "type": "address"
656
+ }
657
+ ],
658
+ "name": "totalBorrows",
659
+ "outputs": [
660
+ {
661
+ "name": "",
662
+ "type": "uint256"
663
+ }
664
+ ],
665
+ "stateMutability": "view",
666
+ "type": "function"
667
+ },
668
+ {
669
+ "inputs": [
670
+ {
671
+ "name": "_asset",
672
+ "type": "address"
673
+ },
674
+ {
675
+ "name": "_amount",
676
+ "type": "uint256"
677
+ },
678
+ {
679
+ "name": "_vault",
680
+ "type": "address"
681
+ },
682
+ {
683
+ "name": "_recipient",
684
+ "type": "address"
685
+ }
686
+ ],
687
+ "name": "depositTokens",
688
+ "outputs": [
689
+ {
690
+ "name": "",
691
+ "type": "uint256"
692
+ },
693
+ {
694
+ "name": "",
695
+ "type": "address"
696
+ },
697
+ {
698
+ "name": "",
699
+ "type": "uint256"
700
+ },
701
+ {
702
+ "name": "",
703
+ "type": "uint256"
704
+ },
705
+ {
706
+ "name": "",
707
+ "type": "uint256"
708
+ }
709
+ ],
710
+ "stateMutability": "nonpayable",
711
+ "type": "function"
712
+ },
713
+ {
714
+ "inputs": [
715
+ {
716
+ "name": "_asset",
717
+ "type": "address"
718
+ },
719
+ {
720
+ "name": "_amount",
721
+ "type": "uint256"
722
+ },
723
+ {
724
+ "name": "_vault",
725
+ "type": "address"
726
+ },
727
+ {
728
+ "name": "_recipient",
729
+ "type": "address"
730
+ },
731
+ {
732
+ "name": "_oracleRegistry",
733
+ "type": "address"
734
+ }
735
+ ],
736
+ "name": "depositTokens",
737
+ "outputs": [
738
+ {
739
+ "name": "",
740
+ "type": "uint256"
741
+ },
742
+ {
743
+ "name": "",
744
+ "type": "address"
745
+ },
746
+ {
747
+ "name": "",
748
+ "type": "uint256"
749
+ },
750
+ {
751
+ "name": "",
752
+ "type": "uint256"
753
+ },
754
+ {
755
+ "name": "",
756
+ "type": "uint256"
757
+ }
758
+ ],
759
+ "stateMutability": "nonpayable",
760
+ "type": "function"
761
+ },
762
+ {
763
+ "inputs": [
764
+ {
765
+ "name": "_asset",
766
+ "type": "address"
767
+ },
768
+ {
769
+ "name": "_amount",
770
+ "type": "uint256"
771
+ },
772
+ {
773
+ "name": "_vaultToken",
774
+ "type": "address"
775
+ },
776
+ {
777
+ "name": "_recipient",
778
+ "type": "address"
779
+ }
780
+ ],
781
+ "name": "withdrawTokens",
782
+ "outputs": [
783
+ {
784
+ "name": "",
785
+ "type": "uint256"
786
+ },
787
+ {
788
+ "name": "",
789
+ "type": "uint256"
790
+ },
791
+ {
792
+ "name": "",
793
+ "type": "uint256"
794
+ },
795
+ {
796
+ "name": "",
797
+ "type": "uint256"
798
+ }
799
+ ],
800
+ "stateMutability": "nonpayable",
801
+ "type": "function"
802
+ },
803
+ {
804
+ "inputs": [
805
+ {
806
+ "name": "_asset",
807
+ "type": "address"
808
+ },
809
+ {
810
+ "name": "_amount",
811
+ "type": "uint256"
812
+ },
813
+ {
814
+ "name": "_vaultToken",
815
+ "type": "address"
816
+ },
817
+ {
818
+ "name": "_recipient",
819
+ "type": "address"
820
+ },
821
+ {
822
+ "name": "_oracleRegistry",
823
+ "type": "address"
824
+ }
825
+ ],
826
+ "name": "withdrawTokens",
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
+ "name": "",
842
+ "type": "uint256"
843
+ }
844
+ ],
845
+ "stateMutability": "nonpayable",
846
+ "type": "function"
847
+ },
848
+ {
849
+ "inputs": [
850
+ {
851
+ "name": "_user",
852
+ "type": "address"
853
+ },
854
+ {
855
+ "name": "_market",
856
+ "type": "address"
857
+ },
858
+ {
859
+ "name": "_rewardToken",
860
+ "type": "address"
861
+ },
862
+ {
863
+ "name": "_rewardAmount",
864
+ "type": "uint256"
865
+ },
866
+ {
867
+ "name": "_proof",
868
+ "type": "bytes32"
869
+ }
870
+ ],
871
+ "name": "claimRewards",
872
+ "outputs": [],
873
+ "stateMutability": "nonpayable",
874
+ "type": "function"
875
+ },
876
+ {
877
+ "inputs": [
878
+ {
879
+ "name": "_user",
880
+ "type": "address"
881
+ }
882
+ ],
883
+ "name": "hasClaimableRewards",
884
+ "outputs": [
885
+ {
886
+ "name": "",
887
+ "type": "bool"
888
+ }
889
+ ],
890
+ "stateMutability": "view",
891
+ "type": "function"
892
+ },
893
+ {
894
+ "inputs": [
895
+ {
896
+ "name": "_addr",
897
+ "type": "address"
898
+ }
899
+ ],
900
+ "name": "setEulerRewardsAddr",
901
+ "outputs": [
902
+ {
903
+ "name": "",
904
+ "type": "bool"
905
+ }
906
+ ],
907
+ "stateMutability": "nonpayable",
908
+ "type": "function"
909
+ },
910
+ {
911
+ "inputs": [
912
+ {
913
+ "name": "_asset",
914
+ "type": "address"
915
+ },
916
+ {
917
+ "name": "_vault",
918
+ "type": "address"
919
+ }
920
+ ],
921
+ "name": "addAssetOpportunity",
922
+ "outputs": [
923
+ {
924
+ "name": "",
925
+ "type": "bool"
926
+ }
927
+ ],
928
+ "stateMutability": "nonpayable",
929
+ "type": "function"
930
+ },
931
+ {
932
+ "inputs": [
933
+ {
934
+ "name": "_asset",
935
+ "type": "address"
936
+ },
937
+ {
938
+ "name": "_vault",
939
+ "type": "address"
940
+ }
941
+ ],
942
+ "name": "removeAssetOpportunity",
943
+ "outputs": [
944
+ {
945
+ "name": "",
946
+ "type": "bool"
947
+ }
948
+ ],
949
+ "stateMutability": "nonpayable",
950
+ "type": "function"
951
+ },
952
+ {
953
+ "inputs": [
954
+ {
955
+ "name": "_asset",
956
+ "type": "address"
957
+ },
958
+ {
959
+ "name": "_recipient",
960
+ "type": "address"
961
+ }
962
+ ],
963
+ "name": "recoverFunds",
964
+ "outputs": [
965
+ {
966
+ "name": "",
967
+ "type": "bool"
968
+ }
969
+ ],
970
+ "stateMutability": "nonpayable",
971
+ "type": "function"
972
+ },
973
+ {
974
+ "inputs": [
975
+ {
976
+ "name": "_legoId",
977
+ "type": "uint256"
978
+ }
979
+ ],
980
+ "name": "setLegoId",
981
+ "outputs": [
982
+ {
983
+ "name": "",
984
+ "type": "bool"
985
+ }
986
+ ],
987
+ "stateMutability": "nonpayable",
988
+ "type": "function"
989
+ },
990
+ {
991
+ "inputs": [
992
+ {
993
+ "name": "_shouldActivate",
994
+ "type": "bool"
995
+ }
996
+ ],
997
+ "name": "activate",
998
+ "outputs": [],
999
+ "stateMutability": "nonpayable",
1000
+ "type": "function"
1001
+ },
1002
+ {
1003
+ "inputs": [],
1004
+ "name": "eulerRewards",
1005
+ "outputs": [
1006
+ {
1007
+ "name": "",
1008
+ "type": "address"
1009
+ }
1010
+ ],
1011
+ "stateMutability": "view",
1012
+ "type": "function"
1013
+ },
1014
+ {
1015
+ "inputs": [],
1016
+ "name": "EULER_EVAULT_FACTORY",
1017
+ "outputs": [
1018
+ {
1019
+ "name": "",
1020
+ "type": "address"
1021
+ }
1022
+ ],
1023
+ "stateMutability": "view",
1024
+ "type": "function"
1025
+ },
1026
+ {
1027
+ "inputs": [],
1028
+ "name": "EULER_EARN_FACTORY",
1029
+ "outputs": [
1030
+ {
1031
+ "name": "",
1032
+ "type": "address"
1033
+ }
1034
+ ],
1035
+ "stateMutability": "view",
1036
+ "type": "function"
1037
+ },
1038
+ {
1039
+ "inputs": [],
1040
+ "name": "legoId",
1041
+ "outputs": [
1042
+ {
1043
+ "name": "",
1044
+ "type": "uint256"
1045
+ }
1046
+ ],
1047
+ "stateMutability": "view",
1048
+ "type": "function"
1049
+ },
1050
+ {
1051
+ "inputs": [],
1052
+ "name": "isActivated",
1053
+ "outputs": [
1054
+ {
1055
+ "name": "",
1056
+ "type": "bool"
1057
+ }
1058
+ ],
1059
+ "stateMutability": "view",
1060
+ "type": "function"
1061
+ },
1062
+ {
1063
+ "inputs": [],
1064
+ "name": "ADDY_REGISTRY",
1065
+ "outputs": [
1066
+ {
1067
+ "name": "",
1068
+ "type": "address"
1069
+ }
1070
+ ],
1071
+ "stateMutability": "view",
1072
+ "type": "function"
1073
+ },
1074
+ {
1075
+ "inputs": [
1076
+ {
1077
+ "name": "_evaultFactory",
1078
+ "type": "address"
1079
+ },
1080
+ {
1081
+ "name": "_earnFactory",
1082
+ "type": "address"
1083
+ },
1084
+ {
1085
+ "name": "_addyRegistry",
1086
+ "type": "address"
1087
+ }
1088
+ ],
1089
+ "outputs": [],
1090
+ "stateMutability": "nonpayable",
1091
+ "type": "constructor"
1092
+ }
1093
+ ];
1094
+ export const deployAddress = undefined;
1095
+ function getRequest(method, args, contractAddressOrOptions) {
1096
+ const address = typeof contractAddressOrOptions === 'string' ? contractAddressOrOptions : contractAddressOrOptions?.contractAddress;
1097
+ const defaultValue = typeof contractAddressOrOptions === 'string' ? undefined : contractAddressOrOptions?.defaultValue;
1098
+ const call = {
1099
+ contractName: 'LegoEuler',
1100
+ method,
1101
+ args,
1102
+ address,
1103
+ deployAddress,
1104
+ defaultValue,
1105
+ getAbi: () => abi,
1106
+ with: (options) => {
1107
+ call.address = options.contractAddress;
1108
+ call.defaultValue = options.defaultValue;
1109
+ return call;
1110
+ },
1111
+ defaultTo: (defaultValue) => {
1112
+ call.defaultValue = defaultValue;
1113
+ return call;
1114
+ },
1115
+ at: (address) => {
1116
+ call.address = address;
1117
+ return call;
1118
+ },
1119
+ };
1120
+ return call;
1121
+ }
1122
+ export const call = {
1123
+ getAssetOpportunities: (...args) => getRequest('getAssetOpportunities', args),
1124
+ getAssets: (...args) => getRequest('getAssets', args),
1125
+ assetOpportunities: (...args) => getRequest('assetOpportunities', args),
1126
+ indexOfAssetOpportunity: (...args) => getRequest('indexOfAssetOpportunity', args),
1127
+ numAssetOpportunities: (...args) => getRequest('numAssetOpportunities', args),
1128
+ vaultToAsset: (...args) => getRequest('vaultToAsset', args),
1129
+ assets: (...args) => getRequest('assets', args),
1130
+ indexOfAsset: (...args) => getRequest('indexOfAsset', args),
1131
+ numAssets: (...args) => getRequest('numAssets', args),
1132
+ isGovernor: (...args) => getRequest('isGovernor', args),
1133
+ isValidLocalGovernor: (...args) => getRequest('isValidLocalGovernor', args),
1134
+ localGovernor: (...args) => getRequest('localGovernor', args),
1135
+ getRegistries: (...args) => getRequest('getRegistries', args),
1136
+ getAccessForLego: (...args) => getRequest('getAccessForLego', args),
1137
+ isVaultToken: (...args) => getRequest('isVaultToken', args),
1138
+ getUnderlyingAsset: (...args) => getRequest('getUnderlyingAsset', args),
1139
+ getUnderlyingAmount: (...args) => getRequest('getUnderlyingAmount', args),
1140
+ getVaultTokenAmount: (...args) => getRequest('getVaultTokenAmount', args),
1141
+ getUsdValueOfVaultToken: (...args) => getRequest('getUsdValueOfVaultToken', args),
1142
+ getUnderlyingData: (...args) => getRequest('getUnderlyingData', args),
1143
+ totalAssets: (...args) => getRequest('totalAssets', args),
1144
+ totalBorrows: (...args) => getRequest('totalBorrows', args),
1145
+ hasClaimableRewards: (...args) => getRequest('hasClaimableRewards', args),
1146
+ eulerRewards: (...args) => getRequest('eulerRewards', args),
1147
+ EULER_EVAULT_FACTORY: (...args) => getRequest('EULER_EVAULT_FACTORY', args),
1148
+ EULER_EARN_FACTORY: (...args) => getRequest('EULER_EARN_FACTORY', args),
1149
+ legoId: (...args) => getRequest('legoId', args),
1150
+ isActivated: (...args) => getRequest('isActivated', args),
1151
+ ADDY_REGISTRY: (...args) => getRequest('ADDY_REGISTRY', args),
1152
+ };
1153
+ function getMutation(functionName) {
1154
+ return {
1155
+ contractName: 'LegoEuler',
1156
+ functionName,
1157
+ deployAddress,
1158
+ argsType: undefined,
1159
+ getAbi: () => abi,
1160
+ };
1161
+ }
1162
+ export const mutation = {
1163
+ setLocalGovernor: getMutation('setLocalGovernor'),
1164
+ depositTokens: getMutation('depositTokens'),
1165
+ withdrawTokens: getMutation('withdrawTokens'),
1166
+ claimRewards: getMutation('claimRewards'),
1167
+ setEulerRewardsAddr: getMutation('setEulerRewardsAddr'),
1168
+ addAssetOpportunity: getMutation('addAssetOpportunity'),
1169
+ removeAssetOpportunity: getMutation('removeAssetOpportunity'),
1170
+ recoverFunds: getMutation('recoverFunds'),
1171
+ setLegoId: getMutation('setLegoId'),
1172
+ activate: getMutation('activate'),
1173
+ };
1174
+ export function toSdk(publicClient, walletClient) {
1175
+ return {
1176
+ // Queries
1177
+ getAssetOpportunities: (...args) => singleQuery(publicClient, call.getAssetOpportunities(...args)),
1178
+ getAssets: (...args) => singleQuery(publicClient, call.getAssets(...args)),
1179
+ assetOpportunities: (...args) => singleQuery(publicClient, call.assetOpportunities(...args)),
1180
+ indexOfAssetOpportunity: (...args) => singleQuery(publicClient, call.indexOfAssetOpportunity(...args)),
1181
+ numAssetOpportunities: (...args) => singleQuery(publicClient, call.numAssetOpportunities(...args)),
1182
+ vaultToAsset: (...args) => singleQuery(publicClient, call.vaultToAsset(...args)),
1183
+ assets: (...args) => singleQuery(publicClient, call.assets(...args)),
1184
+ indexOfAsset: (...args) => singleQuery(publicClient, call.indexOfAsset(...args)),
1185
+ numAssets: (...args) => singleQuery(publicClient, call.numAssets(...args)),
1186
+ isGovernor: (...args) => singleQuery(publicClient, call.isGovernor(...args)),
1187
+ isValidLocalGovernor: (...args) => singleQuery(publicClient, call.isValidLocalGovernor(...args)),
1188
+ localGovernor: (...args) => singleQuery(publicClient, call.localGovernor(...args)),
1189
+ getRegistries: (...args) => singleQuery(publicClient, call.getRegistries(...args)),
1190
+ getAccessForLego: (...args) => singleQuery(publicClient, call.getAccessForLego(...args)),
1191
+ isVaultToken: (...args) => singleQuery(publicClient, call.isVaultToken(...args)),
1192
+ getUnderlyingAsset: (...args) => singleQuery(publicClient, call.getUnderlyingAsset(...args)),
1193
+ getUnderlyingAmount: (...args) => singleQuery(publicClient, call.getUnderlyingAmount(...args)),
1194
+ getVaultTokenAmount: (...args) => singleQuery(publicClient, call.getVaultTokenAmount(...args)),
1195
+ getUsdValueOfVaultToken: (...args) => singleQuery(publicClient, call.getUsdValueOfVaultToken(...args)),
1196
+ getUnderlyingData: (...args) => singleQuery(publicClient, call.getUnderlyingData(...args)),
1197
+ totalAssets: (...args) => singleQuery(publicClient, call.totalAssets(...args)),
1198
+ totalBorrows: (...args) => singleQuery(publicClient, call.totalBorrows(...args)),
1199
+ hasClaimableRewards: (...args) => singleQuery(publicClient, call.hasClaimableRewards(...args)),
1200
+ eulerRewards: (...args) => singleQuery(publicClient, call.eulerRewards(...args)),
1201
+ EULER_EVAULT_FACTORY: (...args) => singleQuery(publicClient, call.EULER_EVAULT_FACTORY(...args)),
1202
+ EULER_EARN_FACTORY: (...args) => singleQuery(publicClient, call.EULER_EARN_FACTORY(...args)),
1203
+ legoId: (...args) => singleQuery(publicClient, call.legoId(...args)),
1204
+ isActivated: (...args) => singleQuery(publicClient, call.isActivated(...args)),
1205
+ ADDY_REGISTRY: (...args) => singleQuery(publicClient, call.ADDY_REGISTRY(...args)),
1206
+ // Mutations
1207
+ setLocalGovernor: (...args) => mutate(walletClient, mutation.setLocalGovernor)(...args),
1208
+ depositTokens: (...args) => mutate(walletClient, mutation.depositTokens)(...args),
1209
+ withdrawTokens: (...args) => mutate(walletClient, mutation.withdrawTokens)(...args),
1210
+ claimRewards: (...args) => mutate(walletClient, mutation.claimRewards)(...args),
1211
+ setEulerRewardsAddr: (...args) => mutate(walletClient, mutation.setEulerRewardsAddr)(...args),
1212
+ addAssetOpportunity: (...args) => mutate(walletClient, mutation.addAssetOpportunity)(...args),
1213
+ removeAssetOpportunity: (...args) => mutate(walletClient, mutation.removeAssetOpportunity)(...args),
1214
+ recoverFunds: (...args) => mutate(walletClient, mutation.recoverFunds)(...args),
1215
+ setLegoId: (...args) => mutate(walletClient, mutation.setLegoId)(...args),
1216
+ activate: (...args) => mutate(walletClient, mutation.activate)(...args),
1217
+ };
1218
+ }