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