curvance 1.0.13 → 1.0.15

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 (47) hide show
  1. package/README.md +2 -0
  2. package/dist/abis/ProtocolReader.json +54 -10
  3. package/dist/abis/RedstoneCoreAdaptor.json +798 -0
  4. package/dist/chains/index.d.ts +0 -37
  5. package/dist/chains/index.d.ts.map +1 -1
  6. package/dist/chains/index.js +1 -2
  7. package/dist/chains/index.js.map +1 -1
  8. package/dist/chains/monad-testnet.json +65 -101
  9. package/dist/classes/CToken.d.ts +34 -17
  10. package/dist/classes/CToken.d.ts.map +1 -1
  11. package/dist/classes/CToken.js +86 -44
  12. package/dist/classes/CToken.js.map +1 -1
  13. package/dist/classes/ERC20.d.ts +5 -5
  14. package/dist/classes/ERC20.d.ts.map +1 -1
  15. package/dist/classes/ERC20.js +4 -4
  16. package/dist/classes/ERC20.js.map +1 -1
  17. package/dist/classes/Faucet.d.ts +4 -4
  18. package/dist/classes/Faucet.d.ts.map +1 -1
  19. package/dist/classes/Faucet.js +11 -6
  20. package/dist/classes/Faucet.js.map +1 -1
  21. package/dist/classes/Market.d.ts +47 -7
  22. package/dist/classes/Market.d.ts.map +1 -1
  23. package/dist/classes/Market.js +109 -16
  24. package/dist/classes/Market.js.map +1 -1
  25. package/dist/classes/OracleManager.d.ts +3 -3
  26. package/dist/classes/OracleManager.d.ts.map +1 -1
  27. package/dist/classes/OracleManager.js +4 -4
  28. package/dist/classes/OracleManager.js.map +1 -1
  29. package/dist/classes/ProtocolReader.d.ts +20 -10
  30. package/dist/classes/ProtocolReader.d.ts.map +1 -1
  31. package/dist/classes/ProtocolReader.js +23 -12
  32. package/dist/classes/ProtocolReader.js.map +1 -1
  33. package/dist/classes/Redstone.d.ts +14 -0
  34. package/dist/classes/Redstone.d.ts.map +1 -0
  35. package/dist/classes/Redstone.js +57 -0
  36. package/dist/classes/Redstone.js.map +1 -0
  37. package/dist/helpers.d.ts +34 -49
  38. package/dist/helpers.d.ts.map +1 -1
  39. package/dist/helpers.js +104 -18
  40. package/dist/helpers.js.map +1 -1
  41. package/dist/setup.d.ts +5 -3
  42. package/dist/setup.d.ts.map +1 -1
  43. package/dist/setup.js +16 -8
  44. package/dist/setup.js.map +1 -1
  45. package/dist/types.d.ts +4 -1
  46. package/dist/types.d.ts.map +1 -1
  47. package/package.json +5 -3
@@ -0,0 +1,798 @@
1
+ [
2
+ {
3
+ "type": "constructor",
4
+ "inputs": [
5
+ {
6
+ "name": "cr",
7
+ "type": "address",
8
+ "internalType": "contract ICentralRegistry"
9
+ },
10
+ {
11
+ "name": "signers",
12
+ "type": "address[]",
13
+ "internalType": "address[]"
14
+ },
15
+ {
16
+ "name": "uniqueSignersThreshold_",
17
+ "type": "uint256",
18
+ "internalType": "uint256"
19
+ },
20
+ {
21
+ "name": "nativeSymbol",
22
+ "type": "string",
23
+ "internalType": "string"
24
+ }
25
+ ],
26
+ "stateMutability": "nonpayable"
27
+ },
28
+ {
29
+ "type": "function",
30
+ "name": "DEFAULT_HEART_BEAT",
31
+ "inputs": [],
32
+ "outputs": [
33
+ {
34
+ "name": "",
35
+ "type": "uint256",
36
+ "internalType": "uint256"
37
+ }
38
+ ],
39
+ "stateMutability": "view"
40
+ },
41
+ {
42
+ "type": "function",
43
+ "name": "MAXIMUM_SIGNERS_ALLOWED",
44
+ "inputs": [],
45
+ "outputs": [
46
+ {
47
+ "name": "",
48
+ "type": "uint256",
49
+ "internalType": "uint256"
50
+ }
51
+ ],
52
+ "stateMutability": "view"
53
+ },
54
+ {
55
+ "type": "function",
56
+ "name": "MINIMUM_SIGNERS_THRESHOLD_ALLOWED",
57
+ "inputs": [],
58
+ "outputs": [
59
+ {
60
+ "name": "",
61
+ "type": "uint256",
62
+ "internalType": "uint256"
63
+ }
64
+ ],
65
+ "stateMutability": "view"
66
+ },
67
+ {
68
+ "type": "function",
69
+ "name": "adaptorType",
70
+ "inputs": [],
71
+ "outputs": [
72
+ {
73
+ "name": "",
74
+ "type": "uint256",
75
+ "internalType": "uint256"
76
+ }
77
+ ],
78
+ "stateMutability": "pure"
79
+ },
80
+ {
81
+ "type": "function",
82
+ "name": "addAsset",
83
+ "inputs": [
84
+ {
85
+ "name": "asset",
86
+ "type": "address",
87
+ "internalType": "address"
88
+ },
89
+ {
90
+ "name": "inUSD",
91
+ "type": "bool",
92
+ "internalType": "bool"
93
+ },
94
+ {
95
+ "name": "decimals",
96
+ "type": "uint8",
97
+ "internalType": "uint8"
98
+ },
99
+ {
100
+ "name": "heartbeat",
101
+ "type": "uint256",
102
+ "internalType": "uint256"
103
+ }
104
+ ],
105
+ "outputs": [],
106
+ "stateMutability": "nonpayable"
107
+ },
108
+ {
109
+ "type": "function",
110
+ "name": "addSigner",
111
+ "inputs": [
112
+ {
113
+ "name": "newSigner",
114
+ "type": "address",
115
+ "internalType": "address"
116
+ },
117
+ {
118
+ "name": "incrementSignerThreshold",
119
+ "type": "bool",
120
+ "internalType": "bool"
121
+ }
122
+ ],
123
+ "outputs": [],
124
+ "stateMutability": "nonpayable"
125
+ },
126
+ {
127
+ "type": "function",
128
+ "name": "aggregateValues",
129
+ "inputs": [
130
+ {
131
+ "name": "values",
132
+ "type": "uint256[]",
133
+ "internalType": "uint256[]"
134
+ }
135
+ ],
136
+ "outputs": [
137
+ {
138
+ "name": "",
139
+ "type": "uint256",
140
+ "internalType": "uint256"
141
+ }
142
+ ],
143
+ "stateMutability": "view"
144
+ },
145
+ {
146
+ "type": "function",
147
+ "name": "assetConfig",
148
+ "inputs": [
149
+ {
150
+ "name": "",
151
+ "type": "address",
152
+ "internalType": "address"
153
+ },
154
+ {
155
+ "name": "",
156
+ "type": "bool",
157
+ "internalType": "bool"
158
+ }
159
+ ],
160
+ "outputs": [
161
+ {
162
+ "name": "isConfigured",
163
+ "type": "bool",
164
+ "internalType": "bool"
165
+ },
166
+ {
167
+ "name": "decimals",
168
+ "type": "uint8",
169
+ "internalType": "uint8"
170
+ },
171
+ {
172
+ "name": "heartbeat",
173
+ "type": "uint24",
174
+ "internalType": "uint24"
175
+ },
176
+ {
177
+ "name": "symbolHash",
178
+ "type": "bytes32",
179
+ "internalType": "bytes32"
180
+ }
181
+ ],
182
+ "stateMutability": "view"
183
+ },
184
+ {
185
+ "type": "function",
186
+ "name": "authorisedSigners",
187
+ "inputs": [
188
+ {
189
+ "name": "",
190
+ "type": "uint256",
191
+ "internalType": "uint256"
192
+ }
193
+ ],
194
+ "outputs": [
195
+ {
196
+ "name": "",
197
+ "type": "address",
198
+ "internalType": "address"
199
+ }
200
+ ],
201
+ "stateMutability": "view"
202
+ },
203
+ {
204
+ "type": "function",
205
+ "name": "centralRegistry",
206
+ "inputs": [],
207
+ "outputs": [
208
+ {
209
+ "name": "",
210
+ "type": "address",
211
+ "internalType": "contract ICentralRegistry"
212
+ }
213
+ ],
214
+ "stateMutability": "view"
215
+ },
216
+ {
217
+ "type": "function",
218
+ "name": "disableGuardedPriceConfig",
219
+ "inputs": [
220
+ {
221
+ "name": "asset",
222
+ "type": "address",
223
+ "internalType": "address"
224
+ },
225
+ {
226
+ "name": "inUSD",
227
+ "type": "bool",
228
+ "internalType": "bool"
229
+ }
230
+ ],
231
+ "outputs": [],
232
+ "stateMutability": "nonpayable"
233
+ },
234
+ {
235
+ "type": "function",
236
+ "name": "extractTimestampsAndAssertAllAreEqual",
237
+ "inputs": [],
238
+ "outputs": [
239
+ {
240
+ "name": "extractedTimestamp",
241
+ "type": "uint256",
242
+ "internalType": "uint256"
243
+ }
244
+ ],
245
+ "stateMutability": "pure"
246
+ },
247
+ {
248
+ "type": "function",
249
+ "name": "getAuthorisedSignerIndex",
250
+ "inputs": [
251
+ {
252
+ "name": "signerAddress",
253
+ "type": "address",
254
+ "internalType": "address"
255
+ }
256
+ ],
257
+ "outputs": [
258
+ {
259
+ "name": "",
260
+ "type": "uint8",
261
+ "internalType": "uint8"
262
+ }
263
+ ],
264
+ "stateMutability": "view"
265
+ },
266
+ {
267
+ "type": "function",
268
+ "name": "getDataServiceId",
269
+ "inputs": [],
270
+ "outputs": [
271
+ {
272
+ "name": "",
273
+ "type": "string",
274
+ "internalType": "string"
275
+ }
276
+ ],
277
+ "stateMutability": "view"
278
+ },
279
+ {
280
+ "type": "function",
281
+ "name": "getPrice",
282
+ "inputs": [
283
+ {
284
+ "name": "asset",
285
+ "type": "address",
286
+ "internalType": "address"
287
+ },
288
+ {
289
+ "name": "inUSD",
290
+ "type": "bool",
291
+ "internalType": "bool"
292
+ },
293
+ {
294
+ "name": "",
295
+ "type": "bool",
296
+ "internalType": "bool"
297
+ }
298
+ ],
299
+ "outputs": [
300
+ {
301
+ "name": "result",
302
+ "type": "tuple",
303
+ "internalType": "struct IOracleAdaptor.PricingResult",
304
+ "components": [
305
+ {
306
+ "name": "price",
307
+ "type": "uint240",
308
+ "internalType": "uint240"
309
+ },
310
+ {
311
+ "name": "inUSD",
312
+ "type": "bool",
313
+ "internalType": "bool"
314
+ },
315
+ {
316
+ "name": "hadError",
317
+ "type": "bool",
318
+ "internalType": "bool"
319
+ }
320
+ ]
321
+ }
322
+ ],
323
+ "stateMutability": "view"
324
+ },
325
+ {
326
+ "type": "function",
327
+ "name": "getPriceGuard",
328
+ "inputs": [
329
+ {
330
+ "name": "asset",
331
+ "type": "address",
332
+ "internalType": "address"
333
+ },
334
+ {
335
+ "name": "inUSD",
336
+ "type": "bool",
337
+ "internalType": "bool"
338
+ }
339
+ ],
340
+ "outputs": [
341
+ {
342
+ "name": "",
343
+ "type": "tuple",
344
+ "internalType": "struct IOracleAdaptor.PriceGuard",
345
+ "components": [
346
+ {
347
+ "name": "timestampStart",
348
+ "type": "uint40",
349
+ "internalType": "uint40"
350
+ },
351
+ {
352
+ "name": "ips",
353
+ "type": "uint40",
354
+ "internalType": "uint40"
355
+ },
356
+ {
357
+ "name": "basePrice",
358
+ "type": "uint96",
359
+ "internalType": "uint96"
360
+ },
361
+ {
362
+ "name": "minPrice",
363
+ "type": "uint80",
364
+ "internalType": "uint80"
365
+ }
366
+ ]
367
+ }
368
+ ],
369
+ "stateMutability": "view"
370
+ },
371
+ {
372
+ "type": "function",
373
+ "name": "getUniqueSignersThreshold",
374
+ "inputs": [],
375
+ "outputs": [
376
+ {
377
+ "name": "",
378
+ "type": "uint8",
379
+ "internalType": "uint8"
380
+ }
381
+ ],
382
+ "stateMutability": "view"
383
+ },
384
+ {
385
+ "type": "function",
386
+ "name": "isSupportedAsset",
387
+ "inputs": [
388
+ {
389
+ "name": "",
390
+ "type": "address",
391
+ "internalType": "address"
392
+ }
393
+ ],
394
+ "outputs": [
395
+ {
396
+ "name": "",
397
+ "type": "bool",
398
+ "internalType": "bool"
399
+ }
400
+ ],
401
+ "stateMutability": "view"
402
+ },
403
+ {
404
+ "type": "function",
405
+ "name": "priceGuards",
406
+ "inputs": [
407
+ {
408
+ "name": "",
409
+ "type": "address",
410
+ "internalType": "address"
411
+ },
412
+ {
413
+ "name": "",
414
+ "type": "bool",
415
+ "internalType": "bool"
416
+ }
417
+ ],
418
+ "outputs": [
419
+ {
420
+ "name": "timestampStart",
421
+ "type": "uint40",
422
+ "internalType": "uint40"
423
+ },
424
+ {
425
+ "name": "ips",
426
+ "type": "uint40",
427
+ "internalType": "uint40"
428
+ },
429
+ {
430
+ "name": "basePrice",
431
+ "type": "uint96",
432
+ "internalType": "uint96"
433
+ },
434
+ {
435
+ "name": "minPrice",
436
+ "type": "uint80",
437
+ "internalType": "uint80"
438
+ }
439
+ ],
440
+ "stateMutability": "view"
441
+ },
442
+ {
443
+ "type": "function",
444
+ "name": "removeAsset",
445
+ "inputs": [
446
+ {
447
+ "name": "asset",
448
+ "type": "address",
449
+ "internalType": "address"
450
+ }
451
+ ],
452
+ "outputs": [],
453
+ "stateMutability": "nonpayable"
454
+ },
455
+ {
456
+ "type": "function",
457
+ "name": "removeSigner",
458
+ "inputs": [
459
+ {
460
+ "name": "currentSigner",
461
+ "type": "address",
462
+ "internalType": "address"
463
+ },
464
+ {
465
+ "name": "decrementSignerThreshold",
466
+ "type": "bool",
467
+ "internalType": "bool"
468
+ }
469
+ ],
470
+ "outputs": [],
471
+ "stateMutability": "nonpayable"
472
+ },
473
+ {
474
+ "type": "function",
475
+ "name": "setGuardedPriceConfig",
476
+ "inputs": [
477
+ {
478
+ "name": "asset",
479
+ "type": "address",
480
+ "internalType": "address"
481
+ },
482
+ {
483
+ "name": "inUSD",
484
+ "type": "bool",
485
+ "internalType": "bool"
486
+ },
487
+ {
488
+ "name": "guardType",
489
+ "type": "uint256",
490
+ "internalType": "uint256"
491
+ },
492
+ {
493
+ "name": "timestampStart",
494
+ "type": "uint256",
495
+ "internalType": "uint256"
496
+ },
497
+ {
498
+ "name": "ips",
499
+ "type": "uint256",
500
+ "internalType": "uint256"
501
+ },
502
+ {
503
+ "name": "basePrice",
504
+ "type": "uint256",
505
+ "internalType": "uint256"
506
+ },
507
+ {
508
+ "name": "minPrice",
509
+ "type": "uint256",
510
+ "internalType": "uint256"
511
+ }
512
+ ],
513
+ "outputs": [],
514
+ "stateMutability": "nonpayable"
515
+ },
516
+ {
517
+ "type": "function",
518
+ "name": "validateTimestamp",
519
+ "inputs": [
520
+ {
521
+ "name": "receivedTimestampMilliseconds",
522
+ "type": "uint256",
523
+ "internalType": "uint256"
524
+ }
525
+ ],
526
+ "outputs": [],
527
+ "stateMutability": "view"
528
+ },
529
+ {
530
+ "type": "function",
531
+ "name": "writePrice",
532
+ "inputs": [
533
+ {
534
+ "name": "asset",
535
+ "type": "address",
536
+ "internalType": "address"
537
+ },
538
+ {
539
+ "name": "inUSD",
540
+ "type": "bool",
541
+ "internalType": "bool"
542
+ },
543
+ {
544
+ "name": "redstoneTimestamp",
545
+ "type": "uint128",
546
+ "internalType": "uint128"
547
+ }
548
+ ],
549
+ "outputs": [],
550
+ "stateMutability": "nonpayable"
551
+ },
552
+ {
553
+ "type": "event",
554
+ "name": "AssetAdded",
555
+ "inputs": [
556
+ {
557
+ "name": "asset",
558
+ "type": "address",
559
+ "indexed": false,
560
+ "internalType": "address"
561
+ },
562
+ {
563
+ "name": "config",
564
+ "type": "tuple",
565
+ "indexed": false,
566
+ "internalType": "struct RedstoneCoreAdaptor.AssetConfig",
567
+ "components": [
568
+ {
569
+ "name": "isConfigured",
570
+ "type": "bool",
571
+ "internalType": "bool"
572
+ },
573
+ {
574
+ "name": "decimals",
575
+ "type": "uint8",
576
+ "internalType": "uint8"
577
+ },
578
+ {
579
+ "name": "heartbeat",
580
+ "type": "uint24",
581
+ "internalType": "uint24"
582
+ },
583
+ {
584
+ "name": "symbolHash",
585
+ "type": "bytes32",
586
+ "internalType": "bytes32"
587
+ }
588
+ ]
589
+ },
590
+ {
591
+ "name": "isUpdate",
592
+ "type": "bool",
593
+ "indexed": false,
594
+ "internalType": "bool"
595
+ }
596
+ ],
597
+ "anonymous": false
598
+ },
599
+ {
600
+ "type": "event",
601
+ "name": "AssetRemoved",
602
+ "inputs": [
603
+ {
604
+ "name": "asset",
605
+ "type": "address",
606
+ "indexed": false,
607
+ "internalType": "address"
608
+ }
609
+ ],
610
+ "anonymous": false
611
+ },
612
+ {
613
+ "type": "event",
614
+ "name": "PriceGuardUpdated",
615
+ "inputs": [
616
+ {
617
+ "name": "pg",
618
+ "type": "tuple",
619
+ "indexed": false,
620
+ "internalType": "struct IOracleAdaptor.PriceGuard",
621
+ "components": [
622
+ {
623
+ "name": "timestampStart",
624
+ "type": "uint40",
625
+ "internalType": "uint40"
626
+ },
627
+ {
628
+ "name": "ips",
629
+ "type": "uint40",
630
+ "internalType": "uint40"
631
+ },
632
+ {
633
+ "name": "basePrice",
634
+ "type": "uint96",
635
+ "internalType": "uint96"
636
+ },
637
+ {
638
+ "name": "minPrice",
639
+ "type": "uint80",
640
+ "internalType": "uint80"
641
+ }
642
+ ]
643
+ }
644
+ ],
645
+ "anonymous": false
646
+ },
647
+ {
648
+ "type": "event",
649
+ "name": "SignerUpdated",
650
+ "inputs": [
651
+ {
652
+ "name": "signer",
653
+ "type": "address",
654
+ "indexed": false,
655
+ "internalType": "address"
656
+ },
657
+ {
658
+ "name": "addPerms",
659
+ "type": "bool",
660
+ "indexed": false,
661
+ "internalType": "bool"
662
+ }
663
+ ],
664
+ "anonymous": false
665
+ },
666
+ {
667
+ "type": "error",
668
+ "name": "BaseOracleAdaptor__AssetIsNotSupported",
669
+ "inputs": []
670
+ },
671
+ {
672
+ "type": "error",
673
+ "name": "BaseOracleAdaptor__InvalidConfig",
674
+ "inputs": []
675
+ },
676
+ {
677
+ "type": "error",
678
+ "name": "BaseOracleAdaptor__NoPriceGuard",
679
+ "inputs": []
680
+ },
681
+ {
682
+ "type": "error",
683
+ "name": "BaseOracleAdaptor__Unauthorized",
684
+ "inputs": []
685
+ },
686
+ {
687
+ "type": "error",
688
+ "name": "Bytes32Helper__ZeroLengthString",
689
+ "inputs": []
690
+ },
691
+ {
692
+ "type": "error",
693
+ "name": "CalldataMustHaveValidPayload",
694
+ "inputs": []
695
+ },
696
+ {
697
+ "type": "error",
698
+ "name": "CalldataOverOrUnderFlow",
699
+ "inputs": []
700
+ },
701
+ {
702
+ "type": "error",
703
+ "name": "CanNotPickMedianOfEmptyArray",
704
+ "inputs": []
705
+ },
706
+ {
707
+ "type": "error",
708
+ "name": "CentralRegistryLib__InvalidCentralRegistry",
709
+ "inputs": []
710
+ },
711
+ {
712
+ "type": "error",
713
+ "name": "DataPackageTimestampMustNotBeZero",
714
+ "inputs": []
715
+ },
716
+ {
717
+ "type": "error",
718
+ "name": "DataPackageTimestampsMustBeEqual",
719
+ "inputs": []
720
+ },
721
+ {
722
+ "type": "error",
723
+ "name": "EachSignerMustProvideTheSameValue",
724
+ "inputs": []
725
+ },
726
+ {
727
+ "type": "error",
728
+ "name": "EmptyCalldataPointersArr",
729
+ "inputs": []
730
+ },
731
+ {
732
+ "type": "error",
733
+ "name": "GetDataServiceIdNotImplemented",
734
+ "inputs": []
735
+ },
736
+ {
737
+ "type": "error",
738
+ "name": "IncorrectUnsignedMetadataSize",
739
+ "inputs": []
740
+ },
741
+ {
742
+ "type": "error",
743
+ "name": "InsufficientNumberOfUniqueSigners",
744
+ "inputs": [
745
+ {
746
+ "name": "receivedSignersCount",
747
+ "type": "uint256",
748
+ "internalType": "uint256"
749
+ },
750
+ {
751
+ "name": "requiredSignersCount",
752
+ "type": "uint256",
753
+ "internalType": "uint256"
754
+ }
755
+ ]
756
+ },
757
+ {
758
+ "type": "error",
759
+ "name": "InvalidCalldataPointer",
760
+ "inputs": []
761
+ },
762
+ {
763
+ "type": "error",
764
+ "name": "RedstoneCoreAdaptor__AssetIsNotSupported",
765
+ "inputs": []
766
+ },
767
+ {
768
+ "type": "error",
769
+ "name": "RedstoneCoreAdaptor__InvalidConfiguration",
770
+ "inputs": []
771
+ },
772
+ {
773
+ "type": "error",
774
+ "name": "RedstoneCoreAdaptor__InvalidPrice",
775
+ "inputs": []
776
+ },
777
+ {
778
+ "type": "error",
779
+ "name": "RedstoneCoreAdaptor__StalePrice",
780
+ "inputs": []
781
+ },
782
+ {
783
+ "type": "error",
784
+ "name": "RedstonePayloadMustHaveAtLeastOneDataPackage",
785
+ "inputs": []
786
+ },
787
+ {
788
+ "type": "error",
789
+ "name": "SignerNotAuthorised",
790
+ "inputs": [
791
+ {
792
+ "name": "receivedSigner",
793
+ "type": "address",
794
+ "internalType": "address"
795
+ }
796
+ ]
797
+ }
798
+ ]