@meterio/sumer-js 0.1.30 → 0.1.31

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 (43) hide show
  1. package/dist/browser/sumer.min.js +6 -6
  2. package/dist/nodejs/abi.js +275 -25
  3. package/dist/nodejs/abi.js.map +1 -1
  4. package/dist/nodejs/errors.d.ts +16 -0
  5. package/dist/nodejs/errors.js +16 -0
  6. package/dist/nodejs/errors.js.map +1 -1
  7. package/dist/nodejs/index.d.ts +16 -0
  8. package/dist/nodejs/typechain/contracts/Comptroller/RedemptionManager.d.ts +54 -18
  9. package/dist/nodejs/typechain/contracts/Interfaces/IRedemptionManager.d.ts +27 -9
  10. package/dist/nodejs/typechain/factories/contracts/CToken/CErc20__factory.d.ts +17 -1
  11. package/dist/nodejs/typechain/factories/contracts/CToken/CErc20__factory.js +21 -1
  12. package/dist/nodejs/typechain/factories/contracts/CToken/CErc20__factory.js.map +1 -1
  13. package/dist/nodejs/typechain/factories/contracts/CToken/CEther__factory.d.ts +17 -1
  14. package/dist/nodejs/typechain/factories/contracts/CToken/CEther__factory.js +21 -1
  15. package/dist/nodejs/typechain/factories/contracts/CToken/CEther__factory.js.map +1 -1
  16. package/dist/nodejs/typechain/factories/contracts/CToken/CToken__factory.d.ts +16 -0
  17. package/dist/nodejs/typechain/factories/contracts/CToken/CToken__factory.js +20 -0
  18. package/dist/nodejs/typechain/factories/contracts/CToken/CToken__factory.js.map +1 -1
  19. package/dist/nodejs/typechain/factories/contracts/CToken/SuErc20__factory.d.ts +17 -1
  20. package/dist/nodejs/typechain/factories/contracts/CToken/SuErc20__factory.js +21 -1
  21. package/dist/nodejs/typechain/factories/contracts/CToken/SuErc20__factory.js.map +1 -1
  22. package/dist/nodejs/typechain/factories/contracts/Comptroller/AccountLiquidity__factory.d.ts +1 -1
  23. package/dist/nodejs/typechain/factories/contracts/Comptroller/AccountLiquidity__factory.js +1 -1
  24. package/dist/nodejs/typechain/factories/contracts/Comptroller/AccountLiquidity__factory.js.map +1 -1
  25. package/dist/nodejs/typechain/factories/contracts/Comptroller/CompoundLens__factory.d.ts +17 -1
  26. package/dist/nodejs/typechain/factories/contracts/Comptroller/CompoundLens__factory.js +21 -1
  27. package/dist/nodejs/typechain/factories/contracts/Comptroller/CompoundLens__factory.js.map +1 -1
  28. package/dist/nodejs/typechain/factories/contracts/Comptroller/Comptroller__factory.d.ts +17 -1
  29. package/dist/nodejs/typechain/factories/contracts/Comptroller/Comptroller__factory.js +21 -1
  30. package/dist/nodejs/typechain/factories/contracts/Comptroller/Comptroller__factory.js.map +1 -1
  31. package/dist/nodejs/typechain/factories/contracts/Comptroller/RedemptionManager__factory.d.ts +75 -13
  32. package/dist/nodejs/typechain/factories/contracts/Comptroller/RedemptionManager__factory.js +97 -14
  33. package/dist/nodejs/typechain/factories/contracts/Comptroller/RedemptionManager__factory.js.map +1 -1
  34. package/dist/nodejs/typechain/factories/contracts/Interfaces/IRedemptionManager__factory.d.ts +31 -11
  35. package/dist/nodejs/typechain/factories/contracts/Interfaces/IRedemptionManager__factory.js +39 -12
  36. package/dist/nodejs/typechain/factories/contracts/Interfaces/IRedemptionManager__factory.js.map +1 -1
  37. package/dist/nodejs/typechain/factories/contracts/SumerErrors__factory.d.ts +17 -1
  38. package/dist/nodejs/typechain/factories/contracts/SumerErrors__factory.js +21 -1
  39. package/dist/nodejs/typechain/factories/contracts/SumerErrors__factory.js.map +1 -1
  40. package/dist/nodejs/typechain/factories/contracts/stake/VeSumer.sol/VeSumer__factory.d.ts +1 -1
  41. package/dist/nodejs/typechain/factories/contracts/stake/VeSumer.sol/VeSumer__factory.js +1 -1
  42. package/dist/nodejs/typechain/factories/contracts/stake/VeSumer.sol/VeSumer__factory.js.map +1 -1
  43. package/package.json +1 -1
@@ -357,11 +357,21 @@ exports.abi = {
357
357
  "name": "BorrowValueMustBeLargerThanThreshold",
358
358
  "type": "error"
359
359
  },
360
+ {
361
+ "inputs": [],
362
+ "name": "CantExitMarketWithNonZeroBorrowBalance",
363
+ "type": "error"
364
+ },
360
365
  {
361
366
  "inputs": [],
362
367
  "name": "CantSweepUnderlying",
363
368
  "type": "error"
364
369
  },
370
+ {
371
+ "inputs": [],
372
+ "name": "GroupIdMismatch",
373
+ "type": "error"
374
+ },
365
375
  {
366
376
  "inputs": [],
367
377
  "name": "InsufficientCollateral",
@@ -382,6 +392,11 @@ exports.abi = {
382
392
  "name": "InvalidAmount",
383
393
  "type": "error"
384
394
  },
395
+ {
396
+ "inputs": [],
397
+ "name": "InvalidCloseFactor",
398
+ "type": "error"
399
+ },
385
400
  {
386
401
  "inputs": [],
387
402
  "name": "InvalidComptroller",
@@ -397,6 +412,11 @@ exports.abi = {
397
412
  "name": "InvalidExchangeRate",
398
413
  "type": "error"
399
414
  },
415
+ {
416
+ "inputs": [],
417
+ "name": "InvalidGroupId",
418
+ "type": "error"
419
+ },
400
420
  {
401
421
  "inputs": [],
402
422
  "name": "InvalidInterestRateModel",
@@ -2873,11 +2893,21 @@ exports.abi = {
2873
2893
  "name": "BorrowValueMustBeLargerThanThreshold",
2874
2894
  "type": "error"
2875
2895
  },
2896
+ {
2897
+ "inputs": [],
2898
+ "name": "CantExitMarketWithNonZeroBorrowBalance",
2899
+ "type": "error"
2900
+ },
2876
2901
  {
2877
2902
  "inputs": [],
2878
2903
  "name": "CantSweepUnderlying",
2879
2904
  "type": "error"
2880
2905
  },
2906
+ {
2907
+ "inputs": [],
2908
+ "name": "GroupIdMismatch",
2909
+ "type": "error"
2910
+ },
2881
2911
  {
2882
2912
  "inputs": [],
2883
2913
  "name": "InsufficientCollateral",
@@ -2898,6 +2928,11 @@ exports.abi = {
2898
2928
  "name": "InvalidAmount",
2899
2929
  "type": "error"
2900
2930
  },
2931
+ {
2932
+ "inputs": [],
2933
+ "name": "InvalidCloseFactor",
2934
+ "type": "error"
2935
+ },
2901
2936
  {
2902
2937
  "inputs": [],
2903
2938
  "name": "InvalidComptroller",
@@ -2913,6 +2948,11 @@ exports.abi = {
2913
2948
  "name": "InvalidExchangeRate",
2914
2949
  "type": "error"
2915
2950
  },
2951
+ {
2952
+ "inputs": [],
2953
+ "name": "InvalidGroupId",
2954
+ "type": "error"
2955
+ },
2916
2956
  {
2917
2957
  "inputs": [],
2918
2958
  "name": "InvalidInterestRateModel",
@@ -4726,11 +4766,21 @@ exports.abi = {
4726
4766
  "name": "BorrowValueMustBeLargerThanThreshold",
4727
4767
  "type": "error"
4728
4768
  },
4769
+ {
4770
+ "inputs": [],
4771
+ "name": "CantExitMarketWithNonZeroBorrowBalance",
4772
+ "type": "error"
4773
+ },
4729
4774
  {
4730
4775
  "inputs": [],
4731
4776
  "name": "CantSweepUnderlying",
4732
4777
  "type": "error"
4733
4778
  },
4779
+ {
4780
+ "inputs": [],
4781
+ "name": "GroupIdMismatch",
4782
+ "type": "error"
4783
+ },
4734
4784
  {
4735
4785
  "inputs": [],
4736
4786
  "name": "InsufficientCollateral",
@@ -4751,6 +4801,11 @@ exports.abi = {
4751
4801
  "name": "InvalidAmount",
4752
4802
  "type": "error"
4753
4803
  },
4804
+ {
4805
+ "inputs": [],
4806
+ "name": "InvalidCloseFactor",
4807
+ "type": "error"
4808
+ },
4754
4809
  {
4755
4810
  "inputs": [],
4756
4811
  "name": "InvalidComptroller",
@@ -4766,6 +4821,11 @@ exports.abi = {
4766
4821
  "name": "InvalidExchangeRate",
4767
4822
  "type": "error"
4768
4823
  },
4824
+ {
4825
+ "inputs": [],
4826
+ "name": "InvalidGroupId",
4827
+ "type": "error"
4828
+ },
4769
4829
  {
4770
4830
  "inputs": [],
4771
4831
  "name": "InvalidInterestRateModel",
@@ -6455,11 +6515,21 @@ exports.abi = {
6455
6515
  "name": "BorrowValueMustBeLargerThanThreshold",
6456
6516
  "type": "error"
6457
6517
  },
6518
+ {
6519
+ "inputs": [],
6520
+ "name": "CantExitMarketWithNonZeroBorrowBalance",
6521
+ "type": "error"
6522
+ },
6458
6523
  {
6459
6524
  "inputs": [],
6460
6525
  "name": "CantSweepUnderlying",
6461
6526
  "type": "error"
6462
6527
  },
6528
+ {
6529
+ "inputs": [],
6530
+ "name": "GroupIdMismatch",
6531
+ "type": "error"
6532
+ },
6463
6533
  {
6464
6534
  "inputs": [],
6465
6535
  "name": "InsufficientCollateral",
@@ -6480,6 +6550,11 @@ exports.abi = {
6480
6550
  "name": "InvalidAmount",
6481
6551
  "type": "error"
6482
6552
  },
6553
+ {
6554
+ "inputs": [],
6555
+ "name": "InvalidCloseFactor",
6556
+ "type": "error"
6557
+ },
6483
6558
  {
6484
6559
  "inputs": [],
6485
6560
  "name": "InvalidComptroller",
@@ -6495,6 +6570,11 @@ exports.abi = {
6495
6570
  "name": "InvalidExchangeRate",
6496
6571
  "type": "error"
6497
6572
  },
6573
+ {
6574
+ "inputs": [],
6575
+ "name": "InvalidGroupId",
6576
+ "type": "error"
6577
+ },
6498
6578
  {
6499
6579
  "inputs": [],
6500
6580
  "name": "InvalidInterestRateModel",
@@ -9154,11 +9234,21 @@ exports.abi = {
9154
9234
  "name": "BorrowValueMustBeLargerThanThreshold",
9155
9235
  "type": "error"
9156
9236
  },
9237
+ {
9238
+ "inputs": [],
9239
+ "name": "CantExitMarketWithNonZeroBorrowBalance",
9240
+ "type": "error"
9241
+ },
9157
9242
  {
9158
9243
  "inputs": [],
9159
9244
  "name": "CantSweepUnderlying",
9160
9245
  "type": "error"
9161
9246
  },
9247
+ {
9248
+ "inputs": [],
9249
+ "name": "GroupIdMismatch",
9250
+ "type": "error"
9251
+ },
9162
9252
  {
9163
9253
  "inputs": [],
9164
9254
  "name": "InsufficientCollateral",
@@ -9179,6 +9269,11 @@ exports.abi = {
9179
9269
  "name": "InvalidAmount",
9180
9270
  "type": "error"
9181
9271
  },
9272
+ {
9273
+ "inputs": [],
9274
+ "name": "InvalidCloseFactor",
9275
+ "type": "error"
9276
+ },
9182
9277
  {
9183
9278
  "inputs": [],
9184
9279
  "name": "InvalidComptroller",
@@ -9194,6 +9289,11 @@ exports.abi = {
9194
9289
  "name": "InvalidExchangeRate",
9195
9290
  "type": "error"
9196
9291
  },
9292
+ {
9293
+ "inputs": [],
9294
+ "name": "InvalidGroupId",
9295
+ "type": "error"
9296
+ },
9197
9297
  {
9198
9298
  "inputs": [],
9199
9299
  "name": "InvalidInterestRateModel",
@@ -12405,11 +12505,21 @@ exports.abi = {
12405
12505
  "name": "BorrowValueMustBeLargerThanThreshold",
12406
12506
  "type": "error"
12407
12507
  },
12508
+ {
12509
+ "inputs": [],
12510
+ "name": "CantExitMarketWithNonZeroBorrowBalance",
12511
+ "type": "error"
12512
+ },
12408
12513
  {
12409
12514
  "inputs": [],
12410
12515
  "name": "CantSweepUnderlying",
12411
12516
  "type": "error"
12412
12517
  },
12518
+ {
12519
+ "inputs": [],
12520
+ "name": "GroupIdMismatch",
12521
+ "type": "error"
12522
+ },
12413
12523
  {
12414
12524
  "inputs": [],
12415
12525
  "name": "InsufficientCollateral",
@@ -12430,6 +12540,11 @@ exports.abi = {
12430
12540
  "name": "InvalidAmount",
12431
12541
  "type": "error"
12432
12542
  },
12543
+ {
12544
+ "inputs": [],
12545
+ "name": "InvalidCloseFactor",
12546
+ "type": "error"
12547
+ },
12433
12548
  {
12434
12549
  "inputs": [],
12435
12550
  "name": "InvalidComptroller",
@@ -12445,6 +12560,11 @@ exports.abi = {
12445
12560
  "name": "InvalidExchangeRate",
12446
12561
  "type": "error"
12447
12562
  },
12563
+ {
12564
+ "inputs": [],
12565
+ "name": "InvalidGroupId",
12566
+ "type": "error"
12567
+ },
12448
12568
  {
12449
12569
  "inputs": [],
12450
12570
  "name": "InvalidInterestRateModel",
@@ -13706,11 +13826,21 @@ exports.abi = {
13706
13826
  "name": "BorrowValueMustBeLargerThanThreshold",
13707
13827
  "type": "error"
13708
13828
  },
13829
+ {
13830
+ "inputs": [],
13831
+ "name": "CantExitMarketWithNonZeroBorrowBalance",
13832
+ "type": "error"
13833
+ },
13709
13834
  {
13710
13835
  "inputs": [],
13711
13836
  "name": "CantSweepUnderlying",
13712
13837
  "type": "error"
13713
13838
  },
13839
+ {
13840
+ "inputs": [],
13841
+ "name": "GroupIdMismatch",
13842
+ "type": "error"
13843
+ },
13714
13844
  {
13715
13845
  "inputs": [],
13716
13846
  "name": "InsufficientCollateral",
@@ -13731,6 +13861,11 @@ exports.abi = {
13731
13861
  "name": "InvalidAmount",
13732
13862
  "type": "error"
13733
13863
  },
13864
+ {
13865
+ "inputs": [],
13866
+ "name": "InvalidCloseFactor",
13867
+ "type": "error"
13868
+ },
13734
13869
  {
13735
13870
  "inputs": [],
13736
13871
  "name": "InvalidComptroller",
@@ -13746,6 +13881,11 @@ exports.abi = {
13746
13881
  "name": "InvalidExchangeRate",
13747
13882
  "type": "error"
13748
13883
  },
13884
+ {
13885
+ "inputs": [],
13886
+ "name": "InvalidGroupId",
13887
+ "type": "error"
13888
+ },
13749
13889
  {
13750
13890
  "inputs": [],
13751
13891
  "name": "InvalidInterestRateModel",
@@ -17054,6 +17194,12 @@ exports.abi = {
17054
17194
  {
17055
17195
  "anonymous": false,
17056
17196
  "inputs": [
17197
+ {
17198
+ "indexed": false,
17199
+ "internalType": "address",
17200
+ "name": "asset",
17201
+ "type": "address"
17202
+ },
17057
17203
  {
17058
17204
  "indexed": false,
17059
17205
  "internalType": "uint256",
@@ -17080,6 +17226,12 @@ exports.abi = {
17080
17226
  {
17081
17227
  "anonymous": false,
17082
17228
  "inputs": [
17229
+ {
17230
+ "indexed": false,
17231
+ "internalType": "address",
17232
+ "name": "asset",
17233
+ "type": "address"
17234
+ },
17083
17235
  {
17084
17236
  "indexed": false,
17085
17237
  "internalType": "uint256",
@@ -17269,6 +17421,25 @@ exports.abi = {
17269
17421
  "stateMutability": "view",
17270
17422
  "type": "function"
17271
17423
  },
17424
+ {
17425
+ "inputs": [
17426
+ {
17427
+ "internalType": "address",
17428
+ "name": "",
17429
+ "type": "address"
17430
+ }
17431
+ ],
17432
+ "name": "baseRateMap",
17433
+ "outputs": [
17434
+ {
17435
+ "internalType": "uint256",
17436
+ "name": "",
17437
+ "type": "uint256"
17438
+ }
17439
+ ],
17440
+ "stateMutability": "view",
17441
+ "type": "function"
17442
+ },
17272
17443
  {
17273
17444
  "inputs": [
17274
17445
  {
@@ -17337,12 +17508,47 @@ exports.abi = {
17337
17508
  "type": "function"
17338
17509
  },
17339
17510
  {
17340
- "inputs": [],
17511
+ "inputs": [
17512
+ {
17513
+ "internalType": "address",
17514
+ "name": "asset",
17515
+ "type": "address"
17516
+ }
17517
+ ],
17341
17518
  "name": "decayBaseRateFromBorrowing",
17342
17519
  "outputs": [],
17343
17520
  "stateMutability": "nonpayable",
17344
17521
  "type": "function"
17345
17522
  },
17523
+ {
17524
+ "inputs": [
17525
+ {
17526
+ "internalType": "address",
17527
+ "name": "asset",
17528
+ "type": "address"
17529
+ },
17530
+ {
17531
+ "internalType": "uint256",
17532
+ "name": "redeemAmount",
17533
+ "type": "uint256"
17534
+ },
17535
+ {
17536
+ "internalType": "uint256",
17537
+ "name": "_totalSupply",
17538
+ "type": "uint256"
17539
+ }
17540
+ ],
17541
+ "name": "getCurrentRedemptionRate",
17542
+ "outputs": [
17543
+ {
17544
+ "internalType": "uint256",
17545
+ "name": "",
17546
+ "type": "uint256"
17547
+ }
17548
+ ],
17549
+ "stateMutability": "view",
17550
+ "type": "function"
17551
+ },
17346
17552
  {
17347
17553
  "inputs": [
17348
17554
  {
@@ -17387,21 +17593,14 @@ exports.abi = {
17387
17593
  "type": "function"
17388
17594
  },
17389
17595
  {
17390
- "inputs": [],
17391
- "name": "getRedemptionRate",
17392
- "outputs": [
17596
+ "inputs": [
17393
17597
  {
17394
- "internalType": "uint256",
17395
- "name": "",
17396
- "type": "uint256"
17598
+ "internalType": "address",
17599
+ "name": "asset",
17600
+ "type": "address"
17397
17601
  }
17398
17602
  ],
17399
- "stateMutability": "view",
17400
- "type": "function"
17401
- },
17402
- {
17403
- "inputs": [],
17404
- "name": "getRedemptionRateWithDecay",
17603
+ "name": "getRedemptionRate",
17405
17604
  "outputs": [
17406
17605
  {
17407
17606
  "internalType": "uint256",
@@ -17566,6 +17765,25 @@ exports.abi = {
17566
17765
  "stateMutability": "view",
17567
17766
  "type": "function"
17568
17767
  },
17768
+ {
17769
+ "inputs": [
17770
+ {
17771
+ "internalType": "address",
17772
+ "name": "",
17773
+ "type": "address"
17774
+ }
17775
+ ],
17776
+ "name": "lastFeeOperationTimeMap",
17777
+ "outputs": [
17778
+ {
17779
+ "internalType": "uint256",
17780
+ "name": "",
17781
+ "type": "uint256"
17782
+ }
17783
+ ],
17784
+ "stateMutability": "view",
17785
+ "type": "function"
17786
+ },
17569
17787
  {
17570
17788
  "inputs": [
17571
17789
  {
@@ -17662,6 +17880,11 @@ exports.abi = {
17662
17880
  },
17663
17881
  {
17664
17882
  "inputs": [
17883
+ {
17884
+ "internalType": "address",
17885
+ "name": "asset",
17886
+ "type": "address"
17887
+ },
17665
17888
  {
17666
17889
  "internalType": "uint256",
17667
17890
  "name": "redeemAmount",
@@ -23143,6 +23366,35 @@ exports.abi = {
23143
23366
  "stateMutability": "nonpayable",
23144
23367
  "type": "function"
23145
23368
  },
23369
+ {
23370
+ "inputs": [
23371
+ {
23372
+ "internalType": "address",
23373
+ "name": "asset",
23374
+ "type": "address"
23375
+ },
23376
+ {
23377
+ "internalType": "uint256",
23378
+ "name": "redeemAmount",
23379
+ "type": "uint256"
23380
+ },
23381
+ {
23382
+ "internalType": "uint256",
23383
+ "name": "_totalSupply",
23384
+ "type": "uint256"
23385
+ }
23386
+ ],
23387
+ "name": "getCurrentRedemptionRate",
23388
+ "outputs": [
23389
+ {
23390
+ "internalType": "uint256",
23391
+ "name": "",
23392
+ "type": "uint256"
23393
+ }
23394
+ ],
23395
+ "stateMutability": "nonpayable",
23396
+ "type": "function"
23397
+ },
23146
23398
  {
23147
23399
  "inputs": [
23148
23400
  {
@@ -23187,21 +23439,14 @@ exports.abi = {
23187
23439
  "type": "function"
23188
23440
  },
23189
23441
  {
23190
- "inputs": [],
23191
- "name": "getRedemptionRate",
23192
- "outputs": [
23442
+ "inputs": [
23193
23443
  {
23194
- "internalType": "uint256",
23195
- "name": "",
23196
- "type": "uint256"
23444
+ "internalType": "address",
23445
+ "name": "asset",
23446
+ "type": "address"
23197
23447
  }
23198
23448
  ],
23199
- "stateMutability": "view",
23200
- "type": "function"
23201
- },
23202
- {
23203
- "inputs": [],
23204
- "name": "getRedemptionRateWithDecay",
23449
+ "name": "getRedemptionRate",
23205
23450
  "outputs": [
23206
23451
  {
23207
23452
  "internalType": "uint256",
@@ -23233,6 +23478,11 @@ exports.abi = {
23233
23478
  },
23234
23479
  {
23235
23480
  "inputs": [
23481
+ {
23482
+ "internalType": "address",
23483
+ "name": "asset",
23484
+ "type": "address"
23485
+ },
23236
23486
  {
23237
23487
  "internalType": "uint256",
23238
23488
  "name": "redeemAmount",