@meterio/sumer-js 0.2.40 → 0.2.41

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 (44) hide show
  1. package/dist/browser/sumer.min.js +10 -10
  2. package/dist/nodejs/abi.d.ts +18 -8
  3. package/dist/nodejs/abi.js +127 -0
  4. package/dist/nodejs/abi.js.map +1 -1
  5. package/dist/nodejs/constants/metertest.js +1 -1
  6. package/dist/nodejs/index.d.ts +18 -8
  7. package/dist/nodejs/typechain/contracts/Comptroller/CompLogic.d.ts +57 -1
  8. package/dist/nodejs/typechain/contracts/Comptroller/Comptroller.d.ts +15 -5
  9. package/dist/nodejs/typechain/contracts/Comptroller/ComptrollerStorage.d.ts +4 -0
  10. package/dist/nodejs/typechain/contracts/Interfaces/IComptroller.d.ts +4 -1
  11. package/dist/nodejs/typechain/factories/contracts/CToken/CErc20__factory.d.ts +1 -1
  12. package/dist/nodejs/typechain/factories/contracts/CToken/CErc20__factory.js +1 -1
  13. package/dist/nodejs/typechain/factories/contracts/CToken/CErc20__factory.js.map +1 -1
  14. package/dist/nodejs/typechain/factories/contracts/CToken/CEther__factory.d.ts +1 -1
  15. package/dist/nodejs/typechain/factories/contracts/CToken/CEther__factory.js +1 -1
  16. package/dist/nodejs/typechain/factories/contracts/CToken/CEther__factory.js.map +1 -1
  17. package/dist/nodejs/typechain/factories/contracts/CToken/SuErc20__factory.d.ts +1 -1
  18. package/dist/nodejs/typechain/factories/contracts/CToken/SuErc20__factory.js +1 -1
  19. package/dist/nodejs/typechain/factories/contracts/CToken/SuErc20__factory.js.map +1 -1
  20. package/dist/nodejs/typechain/factories/contracts/Comptroller/CompLogic__factory.d.ts +80 -1
  21. package/dist/nodejs/typechain/factories/contracts/Comptroller/CompLogic__factory.js +102 -1
  22. package/dist/nodejs/typechain/factories/contracts/Comptroller/CompLogic__factory.js.map +1 -1
  23. package/dist/nodejs/typechain/factories/contracts/Comptroller/CompoundLens__factory.d.ts +1 -1
  24. package/dist/nodejs/typechain/factories/contracts/Comptroller/CompoundLens__factory.js +1 -1
  25. package/dist/nodejs/typechain/factories/contracts/Comptroller/CompoundLens__factory.js.map +1 -1
  26. package/dist/nodejs/typechain/factories/contracts/Comptroller/ComptrollerStorage__factory.d.ts +5 -1
  27. package/dist/nodejs/typechain/factories/contracts/Comptroller/ComptrollerStorage__factory.js +6 -1
  28. package/dist/nodejs/typechain/factories/contracts/Comptroller/ComptrollerStorage__factory.js.map +1 -1
  29. package/dist/nodejs/typechain/factories/contracts/Comptroller/Comptroller__factory.d.ts +14 -1
  30. package/dist/nodejs/typechain/factories/contracts/Comptroller/Comptroller__factory.js +17 -1
  31. package/dist/nodejs/typechain/factories/contracts/Comptroller/Comptroller__factory.js.map +1 -1
  32. package/dist/nodejs/typechain/factories/contracts/Comptroller/RedemptionManager__factory.d.ts +1 -1
  33. package/dist/nodejs/typechain/factories/contracts/Comptroller/RedemptionManager__factory.js +1 -1
  34. package/dist/nodejs/typechain/factories/contracts/Comptroller/RedemptionManager__factory.js.map +1 -1
  35. package/dist/nodejs/typechain/factories/contracts/Comptroller/SortedBorrows__factory.d.ts +1 -1
  36. package/dist/nodejs/typechain/factories/contracts/Comptroller/SortedBorrows__factory.js +1 -1
  37. package/dist/nodejs/typechain/factories/contracts/Comptroller/SortedBorrows__factory.js.map +1 -1
  38. package/dist/nodejs/typechain/factories/contracts/Interfaces/IComptroller__factory.d.ts +4 -0
  39. package/dist/nodejs/typechain/factories/contracts/Interfaces/IComptroller__factory.js +5 -0
  40. package/dist/nodejs/typechain/factories/contracts/Interfaces/IComptroller__factory.js.map +1 -1
  41. package/dist/nodejs/typechain/factories/contracts/Timelock__factory.d.ts +1 -1
  42. package/dist/nodejs/typechain/factories/contracts/Timelock__factory.js +1 -1
  43. package/dist/nodejs/typechain/factories/contracts/Timelock__factory.js.map +1 -1
  44. package/package.json +1 -1
@@ -8,7 +8,7 @@ exports.metertest = {
8
8
  "Multicall2": "0xcA11bde05977b3631167028862bE2a173976CA11",
9
9
  "Sumer": "0x264b7316b535515db9759a77dc4041c0c2263527",
10
10
  "SUMER": "0x264b7316b535515db9759a77dc4041c0c2263527",
11
- "CompoundLens": "0x73926C89F62992dc2E5d28798C7d7eB2Ab59D88F",
11
+ "CompoundLens": "0x1A9cFE6754807bD1f2BD63380c99F160c73CD97b",
12
12
  "FeedPriceOracle": "0xb37DAdCdAE2Ba0921D5472356c9b378DdC8e20C1",
13
13
  "CompLogic": "0xF01883F9846117795a1de3484aBE40640BBaAA56",
14
14
  "RedemptionManager": "0xE353980ca3de5d6f98B8641AaD92b01C8effdD39",
@@ -536,22 +536,34 @@ declare const Sumer: {
536
536
  stateMutability?: undefined;
537
537
  outputs?: undefined;
538
538
  } | {
539
- inputs: {
539
+ inputs: ({
540
540
  internalType: string;
541
541
  name: string;
542
542
  type: string;
543
- }[];
544
- name: string;
545
- outputs: {
543
+ components?: undefined;
544
+ } | {
545
+ components: {
546
+ internalType: string;
547
+ name: string;
548
+ type: string;
549
+ }[];
546
550
  internalType: string;
547
551
  name: string;
548
552
  type: string;
549
- }[];
553
+ })[];
554
+ name: string;
555
+ outputs: any[];
550
556
  stateMutability: string;
551
557
  type: string;
552
558
  anonymous?: undefined;
553
559
  } | {
554
- inputs: ({
560
+ inputs: {
561
+ internalType: string;
562
+ name: string;
563
+ type: string;
564
+ }[];
565
+ name: string;
566
+ outputs: ({
555
567
  internalType: string;
556
568
  name: string;
557
569
  type: string;
@@ -566,8 +578,6 @@ declare const Sumer: {
566
578
  name: string;
567
579
  type: string;
568
580
  })[];
569
- name: string;
570
- outputs: any[];
571
581
  stateMutability: string;
572
582
  type: string;
573
583
  anonymous?: undefined;
@@ -1,5 +1,43 @@
1
1
  import type { BaseContract, BigNumberish, BytesLike, FunctionFragment, Result, Interface, EventFragment, AddressLike, ContractRunner, ContractMethod, Listener } from "ethers";
2
2
  import type { TypedContractEvent, TypedDeferredTopicFilter, TypedEventLog, TypedLogDescription, TypedListener, TypedContractMethod } from "../../common";
3
+ export type GroupVarStruct = {
4
+ groupId: BigNumberish;
5
+ cDepositVal: BigNumberish;
6
+ cBorrowVal: BigNumberish;
7
+ suDepositVal: BigNumberish;
8
+ suBorrowVal: BigNumberish;
9
+ intraCRateMantissa: BigNumberish;
10
+ intraMintRateMantissa: BigNumberish;
11
+ intraSuRateMantissa: BigNumberish;
12
+ interCRateMantissa: BigNumberish;
13
+ interSuRateMantissa: BigNumberish;
14
+ interMintRateMantissa: BigNumberish;
15
+ };
16
+ export type GroupVarStructOutput = [
17
+ groupId: bigint,
18
+ cDepositVal: bigint,
19
+ cBorrowVal: bigint,
20
+ suDepositVal: bigint,
21
+ suBorrowVal: bigint,
22
+ intraCRateMantissa: bigint,
23
+ intraMintRateMantissa: bigint,
24
+ intraSuRateMantissa: bigint,
25
+ interCRateMantissa: bigint,
26
+ interSuRateMantissa: bigint,
27
+ interMintRateMantissa: bigint
28
+ ] & {
29
+ groupId: bigint;
30
+ cDepositVal: bigint;
31
+ cBorrowVal: bigint;
32
+ suDepositVal: bigint;
33
+ suBorrowVal: bigint;
34
+ intraCRateMantissa: bigint;
35
+ intraMintRateMantissa: bigint;
36
+ intraSuRateMantissa: bigint;
37
+ interCRateMantissa: bigint;
38
+ interSuRateMantissa: bigint;
39
+ interMintRateMantissa: bigint;
40
+ };
3
41
  export declare namespace ExponentialNoErrorNew {
4
42
  type ExpStruct = {
5
43
  mantissa: BigNumberish;
@@ -9,7 +47,7 @@ export declare namespace ExponentialNoErrorNew {
9
47
  };
10
48
  }
11
49
  export interface CompLogicInterface extends Interface {
12
- getFunction(nameOrSignature: "DEFAULT_ADMIN_ROLE" | "_grantComp" | "_setCompSpeeds" | "_setContributorCompSpeed" | "calculateComp" | "claimSumer(address[],address[],bool,bool)" | "claimSumer(address)" | "claimSumer(address,address[])" | "comp" | "compAccrued" | "compBorrowSpeeds" | "compBorrowState" | "compBorrowerIndex" | "compContributorSpeeds" | "compInitialIndex" | "compSupplierIndex" | "compSupplySpeeds" | "compSupplyState" | "comptroller" | "distributeBorrowerComp" | "distributeSupplierComp" | "getHypotheticalSafeLimit" | "getRoleAdmin" | "getRoleMember" | "getRoleMemberCount" | "grantRole" | "hasRole" | "initialize" | "initializeMarket" | "lastContributorBlock" | "percentScale" | "renounceRole" | "revokeRole" | "setCompSpeed" | "setComptroller" | "supportsInterface" | "updateCompBorrowIndex" | "updateCompSupplyIndex" | "updateContributorRewards"): FunctionFragment;
50
+ getFunction(nameOrSignature: "DEFAULT_ADMIN_ROLE" | "_grantComp" | "_setCompSpeeds" | "_setContributorCompSpeed" | "calculateComp" | "claimSumer(address[],address[],bool,bool)" | "claimSumer(address)" | "claimSumer(address,address[])" | "comp" | "compAccrued" | "compBorrowSpeeds" | "compBorrowState" | "compBorrowerIndex" | "compContributorSpeeds" | "compInitialIndex" | "compSupplierIndex" | "compSupplySpeeds" | "compSupplyState" | "comptroller" | "distributeBorrowerComp" | "distributeSupplierComp" | "getGroupSummary" | "getHypotheticalSafeLimit" | "getRoleAdmin" | "getRoleMember" | "getRoleMemberCount" | "grantRole" | "hasRole" | "initialize" | "initializeMarket" | "lastContributorBlock" | "percentScale" | "renounceRole" | "revokeRole" | "setCompSpeed" | "setComptroller" | "supportsInterface" | "updateCompBorrowIndex" | "updateCompSupplyIndex" | "updateContributorRewards"): FunctionFragment;
13
51
  getEvent(nameOrSignatureOrTopic: "CompBorrowSpeedUpdated" | "CompGranted" | "CompSupplySpeedUpdated" | "ContributorCompSpeedUpdated" | "DistributedBorrowerComp" | "DistributedSupplierComp" | "Initialized" | "RoleAdminChanged" | "RoleGranted" | "RoleRevoked" | "SetComptroller"): EventFragment;
14
52
  encodeFunctionData(functionFragment: "DEFAULT_ADMIN_ROLE", values?: undefined): string;
15
53
  encodeFunctionData(functionFragment: "_grantComp", values: [AddressLike, BigNumberish]): string;
@@ -32,6 +70,7 @@ export interface CompLogicInterface extends Interface {
32
70
  encodeFunctionData(functionFragment: "comptroller", values?: undefined): string;
33
71
  encodeFunctionData(functionFragment: "distributeBorrowerComp", values: [AddressLike, AddressLike, ExponentialNoErrorNew.ExpStruct]): string;
34
72
  encodeFunctionData(functionFragment: "distributeSupplierComp", values: [AddressLike, AddressLike]): string;
73
+ encodeFunctionData(functionFragment: "getGroupSummary", values: [AddressLike, AddressLike, BigNumberish, BigNumberish]): string;
35
74
  encodeFunctionData(functionFragment: "getHypotheticalSafeLimit", values: [AddressLike, AddressLike, BigNumberish, BigNumberish]): string;
36
75
  encodeFunctionData(functionFragment: "getRoleAdmin", values: [BytesLike]): string;
37
76
  encodeFunctionData(functionFragment: "getRoleMember", values: [BytesLike, BigNumberish]): string;
@@ -71,6 +110,7 @@ export interface CompLogicInterface extends Interface {
71
110
  decodeFunctionResult(functionFragment: "comptroller", data: BytesLike): Result;
72
111
  decodeFunctionResult(functionFragment: "distributeBorrowerComp", data: BytesLike): Result;
73
112
  decodeFunctionResult(functionFragment: "distributeSupplierComp", data: BytesLike): Result;
113
+ decodeFunctionResult(functionFragment: "getGroupSummary", data: BytesLike): Result;
74
114
  decodeFunctionResult(functionFragment: "getHypotheticalSafeLimit", data: BytesLike): Result;
75
115
  decodeFunctionResult(functionFragment: "getRoleAdmin", data: BytesLike): Result;
76
116
  decodeFunctionResult(functionFragment: "getRoleMember", data: BytesLike): Result;
@@ -368,6 +408,14 @@ export interface CompLogic extends BaseContract {
368
408
  ], [
369
409
  void
370
410
  ], "nonpayable">;
411
+ getGroupSummary: TypedContractMethod<[
412
+ account: AddressLike,
413
+ cTokenModify: AddressLike,
414
+ redeemTokens: BigNumberish,
415
+ borrowAmount: BigNumberish
416
+ ], [
417
+ [bigint, bigint, GroupVarStructOutput]
418
+ ], "view">;
371
419
  getHypotheticalSafeLimit: TypedContractMethod<[
372
420
  account: AddressLike,
373
421
  cTokenModify: AddressLike,
@@ -544,6 +592,14 @@ export interface CompLogic extends BaseContract {
544
592
  ], [
545
593
  void
546
594
  ], "nonpayable">;
595
+ getFunction(nameOrSignature: "getGroupSummary"): TypedContractMethod<[
596
+ account: AddressLike,
597
+ cTokenModify: AddressLike,
598
+ redeemTokens: BigNumberish,
599
+ borrowAmount: BigNumberish
600
+ ], [
601
+ [bigint, bigint, GroupVarStructOutput]
602
+ ], "view">;
547
603
  getFunction(nameOrSignature: "getHypotheticalSafeLimit"): TypedContractMethod<[
548
604
  account: AddressLike,
549
605
  cTokenModify: AddressLike,
@@ -97,6 +97,7 @@ export interface ComptrollerInterface extends Interface {
97
97
  BigNumberish,
98
98
  BigNumberish,
99
99
  BigNumberish,
100
+ BigNumberish,
100
101
  BigNumberish
101
102
  ]): string;
102
103
  encodeFunctionData(functionFragment: "supportsInterface", values: [BytesLike]): string;
@@ -209,7 +210,8 @@ export declare namespace NewAssetGroupEvent {
209
210
  intraMintRatePercent: BigNumberish,
210
211
  intraSuRatePercent: BigNumberish,
211
212
  interCRatePercent: BigNumberish,
212
- interSuRatePercent: BigNumberish
213
+ interSuRatePercent: BigNumberish,
214
+ interMintRatePercent: BigNumberish
213
215
  ];
214
216
  type OutputTuple = [
215
217
  groupId: bigint,
@@ -217,7 +219,8 @@ export declare namespace NewAssetGroupEvent {
217
219
  intraMintRatePercent: bigint,
218
220
  intraSuRatePercent: bigint,
219
221
  interCRatePercent: bigint,
220
- interSuRatePercent: bigint
222
+ interSuRatePercent: bigint,
223
+ interMintRatePercent: bigint
221
224
  ];
222
225
  interface OutputObject {
223
226
  groupId: bigint;
@@ -226,6 +229,7 @@ export declare namespace NewAssetGroupEvent {
226
229
  intraSuRatePercent: bigint;
227
230
  interCRatePercent: bigint;
228
231
  interSuRatePercent: bigint;
232
+ interMintRatePercent: bigint;
229
233
  }
230
234
  type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
231
235
  type Filter = TypedDeferredTopicFilter<Event>;
@@ -534,6 +538,7 @@ export interface Comptroller extends BaseContract {
534
538
  bigint,
535
539
  bigint,
536
540
  bigint,
541
+ bigint,
537
542
  bigint
538
543
  ] & {
539
544
  groupId: bigint;
@@ -542,6 +547,7 @@ export interface Comptroller extends BaseContract {
542
547
  intraSuRatePercent: bigint;
543
548
  interCRatePercent: bigint;
544
549
  interSuRatePercent: bigint;
550
+ interMintRatePercent: bigint;
545
551
  }
546
552
  ], "view">;
547
553
  borrowAllowed: TypedContractMethod<[
@@ -744,7 +750,8 @@ export interface Comptroller extends BaseContract {
744
750
  intraMintRatePercent: BigNumberish,
745
751
  intraSuRatePercent: BigNumberish,
746
752
  interCRatePercent: BigNumberish,
747
- interSuRatePercent: BigNumberish
753
+ interSuRatePercent: BigNumberish,
754
+ interMintRatePercent: BigNumberish
748
755
  ], [
749
756
  void
750
757
  ], "nonpayable">;
@@ -820,6 +827,7 @@ export interface Comptroller extends BaseContract {
820
827
  bigint,
821
828
  bigint,
822
829
  bigint,
830
+ bigint,
823
831
  bigint
824
832
  ] & {
825
833
  groupId: bigint;
@@ -828,6 +836,7 @@ export interface Comptroller extends BaseContract {
828
836
  intraSuRatePercent: bigint;
829
837
  interCRatePercent: bigint;
830
838
  interSuRatePercent: bigint;
839
+ interMintRatePercent: bigint;
831
840
  }
832
841
  ], "view">;
833
842
  getFunction(nameOrSignature: "borrowAllowed"): TypedContractMethod<[
@@ -1014,7 +1023,8 @@ export interface Comptroller extends BaseContract {
1014
1023
  intraMintRatePercent: BigNumberish,
1015
1024
  intraSuRatePercent: BigNumberish,
1016
1025
  interCRatePercent: BigNumberish,
1017
- interSuRatePercent: BigNumberish
1026
+ interSuRatePercent: BigNumberish,
1027
+ interMintRatePercent: BigNumberish
1018
1028
  ], [
1019
1029
  void
1020
1030
  ], "nonpayable">;
@@ -1055,7 +1065,7 @@ export interface Comptroller extends BaseContract {
1055
1065
  MarketExited: TypedContractEvent<MarketExitedEvent.InputTuple, MarketExitedEvent.OutputTuple, MarketExitedEvent.OutputObject>;
1056
1066
  "MarketListed(address)": TypedContractEvent<MarketListedEvent.InputTuple, MarketListedEvent.OutputTuple, MarketListedEvent.OutputObject>;
1057
1067
  MarketListed: TypedContractEvent<MarketListedEvent.InputTuple, MarketListedEvent.OutputTuple, MarketListedEvent.OutputObject>;
1058
- "NewAssetGroup(uint8,uint16,uint16,uint16,uint16,uint16)": TypedContractEvent<NewAssetGroupEvent.InputTuple, NewAssetGroupEvent.OutputTuple, NewAssetGroupEvent.OutputObject>;
1068
+ "NewAssetGroup(uint8,uint16,uint16,uint16,uint16,uint16,uint16)": TypedContractEvent<NewAssetGroupEvent.InputTuple, NewAssetGroupEvent.OutputTuple, NewAssetGroupEvent.OutputObject>;
1059
1069
  NewAssetGroup: TypedContractEvent<NewAssetGroupEvent.InputTuple, NewAssetGroupEvent.OutputTuple, NewAssetGroupEvent.OutputObject>;
1060
1070
  "NewCap(address,uint120,uint120)": TypedContractEvent<NewCapEvent.InputTuple, NewCapEvent.OutputTuple, NewCapEvent.OutputObject>;
1061
1071
  NewCap: TypedContractEvent<NewCapEvent.InputTuple, NewCapEvent.OutputTuple, NewCapEvent.OutputObject>;
@@ -65,6 +65,7 @@ export interface ComptrollerStorage extends BaseContract {
65
65
  bigint,
66
66
  bigint,
67
67
  bigint,
68
+ bigint,
68
69
  bigint
69
70
  ] & {
70
71
  groupId: bigint;
@@ -73,6 +74,7 @@ export interface ComptrollerStorage extends BaseContract {
73
74
  intraSuRatePercent: bigint;
74
75
  interCRatePercent: bigint;
75
76
  interSuRatePercent: bigint;
77
+ interMintRatePercent: bigint;
76
78
  }
77
79
  ], "view">;
78
80
  compLogic: TypedContractMethod<[], [string], "view">;
@@ -161,6 +163,7 @@ export interface ComptrollerStorage extends BaseContract {
161
163
  bigint,
162
164
  bigint,
163
165
  bigint,
166
+ bigint,
164
167
  bigint
165
168
  ] & {
166
169
  groupId: bigint;
@@ -169,6 +172,7 @@ export interface ComptrollerStorage extends BaseContract {
169
172
  intraSuRatePercent: bigint;
170
173
  interCRatePercent: bigint;
171
174
  interSuRatePercent: bigint;
175
+ interMintRatePercent: bigint;
172
176
  }
173
177
  ], "view">;
174
178
  getFunction(nameOrSignature: "compLogic"): TypedContractMethod<[], [string], "view">;
@@ -7,6 +7,7 @@ export type CompactAssetGroupStruct = {
7
7
  intraSuRatePercent: BigNumberish;
8
8
  interCRatePercent: BigNumberish;
9
9
  interSuRatePercent: BigNumberish;
10
+ interMintRatePercent: BigNumberish;
10
11
  };
11
12
  export type CompactAssetGroupStructOutput = [
12
13
  groupId: bigint,
@@ -14,7 +15,8 @@ export type CompactAssetGroupStructOutput = [
14
15
  intraMintRatePercent: bigint,
15
16
  intraSuRatePercent: bigint,
16
17
  interCRatePercent: bigint,
17
- interSuRatePercent: bigint
18
+ interSuRatePercent: bigint,
19
+ interMintRatePercent: bigint
18
20
  ] & {
19
21
  groupId: bigint;
20
22
  intraCRatePercent: bigint;
@@ -22,6 +24,7 @@ export type CompactAssetGroupStructOutput = [
22
24
  intraSuRatePercent: bigint;
23
25
  interCRatePercent: bigint;
24
26
  interSuRatePercent: bigint;
27
+ interMintRatePercent: bigint;
25
28
  };
26
29
  export type GlobalConfigStruct = {
27
30
  closeFactorPercent: BigNumberish;