@defisaver/positions-sdk 0.0.198 → 0.0.199-dev-2

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 (133) hide show
  1. package/.mocharc.json +4 -4
  2. package/.nvmrc +1 -1
  3. package/README.md +69 -69
  4. package/cjs/config/contracts.d.ts +126 -4
  5. package/cjs/config/contracts.js +14 -0
  6. package/cjs/contracts.d.ts +1 -0
  7. package/cjs/contracts.js +2 -1
  8. package/cjs/helpers/index.d.ts +1 -0
  9. package/cjs/helpers/index.js +2 -1
  10. package/cjs/helpers/liquityV2Helpers/index.d.ts +12 -0
  11. package/cjs/helpers/liquityV2Helpers/index.js +63 -0
  12. package/cjs/helpers/morphoBlueHelpers/index.js +66 -66
  13. package/cjs/index.d.ts +2 -1
  14. package/cjs/index.js +3 -1
  15. package/cjs/liquityV2/index.d.ts +18 -0
  16. package/cjs/liquityV2/index.js +184 -0
  17. package/cjs/markets/aave/marketAssets.js +2 -4
  18. package/cjs/markets/index.d.ts +1 -0
  19. package/cjs/markets/index.js +3 -1
  20. package/cjs/markets/liquityV2/index.d.ts +10 -0
  21. package/cjs/markets/liquityV2/index.js +47 -0
  22. package/cjs/moneymarket/moneymarketCommonService.js +1 -1
  23. package/cjs/types/contracts/generated/LiquityV2CollSurplusPool.d.ts +64 -0
  24. package/cjs/types/contracts/generated/LiquityV2CollSurplusPool.js +5 -0
  25. package/cjs/types/contracts/generated/LiquityV2TroveNFT.d.ts +73 -0
  26. package/cjs/types/contracts/generated/LiquityV2TroveNFT.js +5 -0
  27. package/cjs/types/contracts/generated/LiquityV2View.d.ts +244 -0
  28. package/cjs/types/contracts/generated/LiquityV2View.js +5 -0
  29. package/cjs/types/contracts/generated/index.d.ts +3 -0
  30. package/cjs/types/index.d.ts +1 -0
  31. package/cjs/types/index.js +1 -0
  32. package/cjs/types/liquityV2.d.ts +111 -0
  33. package/cjs/types/liquityV2.js +24 -0
  34. package/esm/config/contracts.d.ts +126 -4
  35. package/esm/config/contracts.js +14 -0
  36. package/esm/contracts.d.ts +1 -0
  37. package/esm/contracts.js +1 -0
  38. package/esm/helpers/index.d.ts +1 -0
  39. package/esm/helpers/index.js +1 -0
  40. package/esm/helpers/liquityV2Helpers/index.d.ts +12 -0
  41. package/esm/helpers/liquityV2Helpers/index.js +55 -0
  42. package/esm/helpers/morphoBlueHelpers/index.js +66 -66
  43. package/esm/index.d.ts +2 -1
  44. package/esm/index.js +2 -1
  45. package/esm/liquityV2/index.d.ts +18 -0
  46. package/esm/liquityV2/index.js +173 -0
  47. package/esm/markets/aave/marketAssets.js +2 -4
  48. package/esm/markets/index.d.ts +1 -0
  49. package/esm/markets/index.js +1 -0
  50. package/esm/markets/liquityV2/index.d.ts +10 -0
  51. package/esm/markets/liquityV2/index.js +40 -0
  52. package/esm/moneymarket/moneymarketCommonService.js +1 -1
  53. package/esm/types/contracts/generated/LiquityV2CollSurplusPool.d.ts +64 -0
  54. package/esm/types/contracts/generated/LiquityV2CollSurplusPool.js +4 -0
  55. package/esm/types/contracts/generated/LiquityV2TroveNFT.d.ts +73 -0
  56. package/esm/types/contracts/generated/LiquityV2TroveNFT.js +4 -0
  57. package/esm/types/contracts/generated/LiquityV2View.d.ts +244 -0
  58. package/esm/types/contracts/generated/LiquityV2View.js +4 -0
  59. package/esm/types/contracts/generated/index.d.ts +3 -0
  60. package/esm/types/index.d.ts +1 -0
  61. package/esm/types/index.js +1 -0
  62. package/esm/types/liquityV2.d.ts +111 -0
  63. package/esm/types/liquityV2.js +21 -0
  64. package/package.json +49 -49
  65. package/src/aaveV2/index.ts +227 -227
  66. package/src/aaveV3/index.ts +625 -625
  67. package/src/assets/index.ts +60 -60
  68. package/src/chickenBonds/index.ts +123 -123
  69. package/src/compoundV2/index.ts +220 -220
  70. package/src/compoundV3/index.ts +291 -291
  71. package/src/config/contracts.js +1109 -1095
  72. package/src/constants/index.ts +6 -6
  73. package/src/contracts.ts +133 -132
  74. package/src/curveUsd/index.ts +229 -229
  75. package/src/eulerV2/index.ts +303 -303
  76. package/src/exchange/index.ts +17 -17
  77. package/src/helpers/aaveHelpers/index.ts +198 -198
  78. package/src/helpers/chickenBondsHelpers/index.ts +23 -23
  79. package/src/helpers/compoundHelpers/index.ts +246 -246
  80. package/src/helpers/curveUsdHelpers/index.ts +40 -40
  81. package/src/helpers/eulerHelpers/index.ts +232 -232
  82. package/src/helpers/index.ts +10 -9
  83. package/src/helpers/liquityV2Helpers/index.ts +80 -0
  84. package/src/helpers/llamaLendHelpers/index.ts +53 -53
  85. package/src/helpers/makerHelpers/index.ts +94 -94
  86. package/src/helpers/morphoBlueHelpers/index.ts +365 -365
  87. package/src/helpers/sparkHelpers/index.ts +150 -150
  88. package/src/index.ts +50 -48
  89. package/src/liquity/index.ts +116 -116
  90. package/src/liquityV2/index.ts +220 -0
  91. package/src/llamaLend/index.ts +275 -275
  92. package/src/maker/index.ts +117 -117
  93. package/src/markets/aave/index.ts +152 -152
  94. package/src/markets/aave/marketAssets.ts +44 -46
  95. package/src/markets/compound/index.ts +213 -213
  96. package/src/markets/compound/marketsAssets.ts +82 -82
  97. package/src/markets/curveUsd/index.ts +69 -69
  98. package/src/markets/euler/index.ts +26 -26
  99. package/src/markets/index.ts +24 -24
  100. package/src/markets/liquityV2/index.ts +44 -0
  101. package/src/markets/llamaLend/contractAddresses.ts +141 -141
  102. package/src/markets/llamaLend/index.ts +235 -235
  103. package/src/markets/morphoBlue/index.ts +895 -895
  104. package/src/markets/spark/index.ts +29 -29
  105. package/src/markets/spark/marketAssets.ts +10 -10
  106. package/src/moneymarket/moneymarketCommonService.ts +80 -80
  107. package/src/morphoAaveV2/index.ts +256 -256
  108. package/src/morphoAaveV3/index.ts +631 -631
  109. package/src/morphoBlue/index.ts +204 -204
  110. package/src/multicall/index.ts +22 -22
  111. package/src/services/dsrService.ts +15 -15
  112. package/src/services/priceService.ts +62 -62
  113. package/src/services/utils.ts +56 -56
  114. package/src/setup.ts +8 -8
  115. package/src/spark/index.ts +461 -461
  116. package/src/staking/staking.ts +220 -220
  117. package/src/types/aave.ts +271 -271
  118. package/src/types/chickenBonds.ts +45 -45
  119. package/src/types/common.ts +84 -84
  120. package/src/types/compound.ts +131 -131
  121. package/src/types/contracts/generated/LiquityV2CollSurplusPool.ts +130 -0
  122. package/src/types/contracts/generated/LiquityV2TroveNFT.ts +150 -0
  123. package/src/types/contracts/generated/LiquityV2View.ts +315 -0
  124. package/src/types/contracts/generated/index.ts +3 -0
  125. package/src/types/curveUsd.ts +118 -118
  126. package/src/types/euler.ts +171 -171
  127. package/src/types/index.ts +10 -9
  128. package/src/types/liquity.ts +30 -30
  129. package/src/types/liquityV2.ts +119 -0
  130. package/src/types/llamaLend.ts +155 -155
  131. package/src/types/maker.ts +50 -50
  132. package/src/types/morphoBlue.ts +192 -192
  133. package/src/types/spark.ts +131 -131
@@ -1,84 +1,84 @@
1
- // General
2
- export type EthAddress = string;
3
- export type Blockish = number | 'latest';
4
- export type AssetSymbol = string;
5
- export type Amount = string | number;
6
-
7
- export enum NetworkNumber {
8
- Eth = 1,
9
- Opt = 10,
10
- Arb = 42161,
11
- Base = 8453,
12
- }
13
- export type Networkish = string | NetworkNumber;
14
-
15
- // Common
16
- export interface MMAssetData {
17
- symbol: string,
18
- supplyRate: string,
19
- borrowRate: string,
20
- price: string,
21
- collateralFactor: string,
22
- underlyingTokenAddress: string,
23
- marketLiquidity: string,
24
- utilization: string,
25
- borrowCap: string,
26
- totalSupply: string,
27
- canBeBorrowed: boolean,
28
- canBeSupplied: boolean,
29
- totalBorrow: string,
30
- incentiveBorrowApy?: string,
31
- incentiveBorrowToken?: string,
32
- incentiveSupplyApy?: string,
33
- incentiveSupplyToken?: string,
34
- borrowRateP2P?: string,
35
- supplyRateP2P?: string,
36
- }
37
-
38
- export interface MMAssetsData {
39
- [token: string]: MMAssetData,
40
- }
41
- export interface MMMarketData {
42
- assetsData: MMAssetData[],
43
- }
44
- export interface MMUsedAsset {
45
- symbol: string,
46
- supplied: string,
47
- suppliedUsd: string,
48
- isSupplied: boolean,
49
- borrowed: string,
50
- borrowedUsd: string,
51
- isBorrowed: boolean,
52
- debt?: string,
53
- supplyRate?: string,
54
- borrowRate?: string,
55
- discountedBorrowRate?: string,
56
- stableBorrowRate?: string,
57
- interestMode?: string,
58
- collateral?: boolean,
59
- }
60
- export interface MMUsedAssets {
61
- [token: string]: MMUsedAsset,
62
- }
63
- export interface MMUsedAssetWStableB extends MMUsedAsset {
64
- stableBorrowRate: string,
65
- borrowedStable: string,
66
- borrowedVariable: string,
67
- borrowedUsdStable: string,
68
- borrowedUsdVariable: string,
69
- interestMode: string,
70
- }
71
- export interface MMPositionData {
72
- usedAssets: any,
73
- netApy: string,
74
- lastUpdated: number,
75
- // ...
76
- }
77
-
78
- export type Balances = Record<AssetSymbol, Amount>;
79
- export interface PositionBalances {
80
- collateral?: Balances,
81
- debt?: Balances,
82
- selling?: Balances,
83
- deposited?: Balances,
84
- }
1
+ // General
2
+ export type EthAddress = string;
3
+ export type Blockish = number | 'latest';
4
+ export type AssetSymbol = string;
5
+ export type Amount = string | number;
6
+
7
+ export enum NetworkNumber {
8
+ Eth = 1,
9
+ Opt = 10,
10
+ Arb = 42161,
11
+ Base = 8453,
12
+ }
13
+ export type Networkish = string | NetworkNumber;
14
+
15
+ // Common
16
+ export interface MMAssetData {
17
+ symbol: string,
18
+ supplyRate: string,
19
+ borrowRate: string,
20
+ price: string,
21
+ collateralFactor: string,
22
+ underlyingTokenAddress: string,
23
+ marketLiquidity: string,
24
+ utilization: string,
25
+ borrowCap: string,
26
+ totalSupply: string,
27
+ canBeBorrowed: boolean,
28
+ canBeSupplied: boolean,
29
+ totalBorrow: string,
30
+ incentiveBorrowApy?: string,
31
+ incentiveBorrowToken?: string,
32
+ incentiveSupplyApy?: string,
33
+ incentiveSupplyToken?: string,
34
+ borrowRateP2P?: string,
35
+ supplyRateP2P?: string,
36
+ }
37
+
38
+ export interface MMAssetsData {
39
+ [token: string]: MMAssetData,
40
+ }
41
+ export interface MMMarketData {
42
+ assetsData: MMAssetData[],
43
+ }
44
+ export interface MMUsedAsset {
45
+ symbol: string,
46
+ supplied: string,
47
+ suppliedUsd: string,
48
+ isSupplied: boolean,
49
+ borrowed: string,
50
+ borrowedUsd: string,
51
+ isBorrowed: boolean,
52
+ debt?: string,
53
+ supplyRate?: string,
54
+ borrowRate?: string,
55
+ discountedBorrowRate?: string,
56
+ stableBorrowRate?: string,
57
+ interestMode?: string,
58
+ collateral?: boolean,
59
+ }
60
+ export interface MMUsedAssets {
61
+ [token: string]: MMUsedAsset,
62
+ }
63
+ export interface MMUsedAssetWStableB extends MMUsedAsset {
64
+ stableBorrowRate: string,
65
+ borrowedStable: string,
66
+ borrowedVariable: string,
67
+ borrowedUsdStable: string,
68
+ borrowedUsdVariable: string,
69
+ interestMode: string,
70
+ }
71
+ export interface MMPositionData {
72
+ usedAssets: any,
73
+ netApy: string,
74
+ lastUpdated: number,
75
+ // ...
76
+ }
77
+
78
+ export type Balances = Record<AssetSymbol, Amount>;
79
+ export interface PositionBalances {
80
+ collateral?: Balances,
81
+ debt?: Balances,
82
+ selling?: Balances,
83
+ deposited?: Balances,
84
+ }
@@ -1,132 +1,132 @@
1
- import {
2
- MMAssetData, MMPositionData, MMUsedAsset, NetworkNumber,
3
- } from './common';
4
-
5
- export enum CompoundVersions {
6
- 'CompoundV2' = 'v2',
7
- 'CompoundV3USDC' = 'v3-USDC',
8
- 'CompoundV3USDCe' = 'v3-USDC.e',
9
- 'CompoundV3ETH' = 'v3-ETH',
10
- 'CompoundV3USDbC' = 'v3-USDbC',
11
- 'CompoundV3USDT' = 'v3-USDT',
12
- 'CompoundV3USDS' = 'v3-USDS',
13
- 'CompoundV3wstETH' = 'v3-wstETH',
14
- }
15
-
16
- export interface CompoundBulkerOptions {
17
- supply: number | string,
18
- withdraw: number | string,
19
- }
20
-
21
- export interface CompoundMarketData {
22
- chainIds: NetworkNumber[],
23
- label: string,
24
- shortLabel: string,
25
- value: CompoundVersions,
26
- baseAsset: string,
27
- collAssets: readonly string[],
28
- baseMarket: string,
29
- baseMarketAddress: string,
30
- secondLabel: string,
31
- bulkerName: string,
32
- bulkerAddress: string,
33
- bulkerOptions: CompoundBulkerOptions,
34
- // icon: Function,
35
- }
36
-
37
- export interface CompoundUsedAsset extends MMUsedAsset {
38
- collateral: boolean,
39
- limit?: string,
40
- }
41
-
42
- export interface CompoundV2UsedAsset extends CompoundUsedAsset {
43
- }
44
- export interface CompoundV3UsedAsset extends CompoundUsedAsset {
45
- }
46
-
47
- export interface CompoundUsedAssets<T> {
48
- [token: string]: T,
49
- }
50
-
51
- export type CompoundV2UsedAssets = CompoundUsedAssets<CompoundV2UsedAsset>;
52
- export type CompoundV3UsedAssets = CompoundUsedAssets<CompoundV3UsedAsset>;
53
-
54
- export interface CompoundAssetData extends MMAssetData {
55
- supplyCapAlternative?: string,
56
- totalSupplyAlternative?: string,
57
- priceAlternative?: string,
58
- sortIndex?: number,
59
- }
60
-
61
- export interface CompoundV2AssetData extends CompoundAssetData {
62
- }
63
- export interface CompoundV3AssetData extends CompoundAssetData {
64
- borrowCollateralFactor: string,
65
- liquidateCollateralFactor: string,
66
- minDebt: string,
67
- liquidationRatio: string,
68
- supplyCap: string,
69
- priceInBaseAsset: string,
70
- }
71
-
72
- export interface CompoundAssetsData<T> {
73
- [token: string]: T
74
- }
75
- export type CompoundV2AssetsData = CompoundAssetsData<CompoundV2AssetData>;
76
- export type CompoundV3AssetsData = CompoundAssetsData<CompoundV3AssetData>;
77
-
78
- export type CompoundMarketsData<T> = { assetsData: T };
79
- export type CompoundV2MarketsData = CompoundMarketsData<CompoundV2AssetsData>;
80
- export type CompoundV3MarketsData = CompoundMarketsData<CompoundV3AssetsData>;
81
-
82
- export interface BaseAdditionalAssetData {
83
- totalBorrow: string,
84
- utilization: string,
85
- marketLiquidity: string,
86
- rewardSupplySpeed: string,
87
- rewardBorrowSpeed: string,
88
- minDebt: string,
89
- isBase: boolean,
90
- }
91
-
92
- export interface CompoundAggregatedPositionData {
93
- suppliedUsd: string,
94
- suppliedCollateralUsd: string,
95
- borrowedUsd: string,
96
- borrowLimitUsd: string,
97
- liquidationLimitUsd: string,
98
- leftToBorrowUsd: string,
99
- ratio: string,
100
- collRatio: string,
101
- netApy: string,
102
- incentiveUsd: string,
103
- totalInterestUsd: string,
104
- liqRatio: string,
105
- liqPercent: string,
106
- leveragedType: string,
107
- leveragedAsset?: string,
108
- leveragedLsdAssetRatio?: string,
109
- liquidationPrice?: string,
110
- minRatio: string,
111
- debtTooLow: boolean,
112
- minDebt: string,
113
- }
114
-
115
- export interface CompoundPositionData extends MMPositionData {
116
- ratio: string,
117
- minRatio: string,
118
- borrowedUsd: string,
119
- borrowLimitUsd: string,
120
- incentiveUsd: string,
121
- totalInterestUsd: string,
122
- isSubscribedToAutomation?: boolean,
123
- automationResubscribeRequired?: boolean,
124
- }
125
-
126
- export interface CompoundV2PositionData extends CompoundPositionData {
127
- usedAssets: CompoundV2UsedAssets,
128
- }
129
-
130
- export interface CompoundV3PositionData extends CompoundPositionData {
131
- usedAssets: CompoundV3UsedAssets,
1
+ import {
2
+ MMAssetData, MMPositionData, MMUsedAsset, NetworkNumber,
3
+ } from './common';
4
+
5
+ export enum CompoundVersions {
6
+ 'CompoundV2' = 'v2',
7
+ 'CompoundV3USDC' = 'v3-USDC',
8
+ 'CompoundV3USDCe' = 'v3-USDC.e',
9
+ 'CompoundV3ETH' = 'v3-ETH',
10
+ 'CompoundV3USDbC' = 'v3-USDbC',
11
+ 'CompoundV3USDT' = 'v3-USDT',
12
+ 'CompoundV3USDS' = 'v3-USDS',
13
+ 'CompoundV3wstETH' = 'v3-wstETH',
14
+ }
15
+
16
+ export interface CompoundBulkerOptions {
17
+ supply: number | string,
18
+ withdraw: number | string,
19
+ }
20
+
21
+ export interface CompoundMarketData {
22
+ chainIds: NetworkNumber[],
23
+ label: string,
24
+ shortLabel: string,
25
+ value: CompoundVersions,
26
+ baseAsset: string,
27
+ collAssets: readonly string[],
28
+ baseMarket: string,
29
+ baseMarketAddress: string,
30
+ secondLabel: string,
31
+ bulkerName: string,
32
+ bulkerAddress: string,
33
+ bulkerOptions: CompoundBulkerOptions,
34
+ // icon: Function,
35
+ }
36
+
37
+ export interface CompoundUsedAsset extends MMUsedAsset {
38
+ collateral: boolean,
39
+ limit?: string,
40
+ }
41
+
42
+ export interface CompoundV2UsedAsset extends CompoundUsedAsset {
43
+ }
44
+ export interface CompoundV3UsedAsset extends CompoundUsedAsset {
45
+ }
46
+
47
+ export interface CompoundUsedAssets<T> {
48
+ [token: string]: T,
49
+ }
50
+
51
+ export type CompoundV2UsedAssets = CompoundUsedAssets<CompoundV2UsedAsset>;
52
+ export type CompoundV3UsedAssets = CompoundUsedAssets<CompoundV3UsedAsset>;
53
+
54
+ export interface CompoundAssetData extends MMAssetData {
55
+ supplyCapAlternative?: string,
56
+ totalSupplyAlternative?: string,
57
+ priceAlternative?: string,
58
+ sortIndex?: number,
59
+ }
60
+
61
+ export interface CompoundV2AssetData extends CompoundAssetData {
62
+ }
63
+ export interface CompoundV3AssetData extends CompoundAssetData {
64
+ borrowCollateralFactor: string,
65
+ liquidateCollateralFactor: string,
66
+ minDebt: string,
67
+ liquidationRatio: string,
68
+ supplyCap: string,
69
+ priceInBaseAsset: string,
70
+ }
71
+
72
+ export interface CompoundAssetsData<T> {
73
+ [token: string]: T
74
+ }
75
+ export type CompoundV2AssetsData = CompoundAssetsData<CompoundV2AssetData>;
76
+ export type CompoundV3AssetsData = CompoundAssetsData<CompoundV3AssetData>;
77
+
78
+ export type CompoundMarketsData<T> = { assetsData: T };
79
+ export type CompoundV2MarketsData = CompoundMarketsData<CompoundV2AssetsData>;
80
+ export type CompoundV3MarketsData = CompoundMarketsData<CompoundV3AssetsData>;
81
+
82
+ export interface BaseAdditionalAssetData {
83
+ totalBorrow: string,
84
+ utilization: string,
85
+ marketLiquidity: string,
86
+ rewardSupplySpeed: string,
87
+ rewardBorrowSpeed: string,
88
+ minDebt: string,
89
+ isBase: boolean,
90
+ }
91
+
92
+ export interface CompoundAggregatedPositionData {
93
+ suppliedUsd: string,
94
+ suppliedCollateralUsd: string,
95
+ borrowedUsd: string,
96
+ borrowLimitUsd: string,
97
+ liquidationLimitUsd: string,
98
+ leftToBorrowUsd: string,
99
+ ratio: string,
100
+ collRatio: string,
101
+ netApy: string,
102
+ incentiveUsd: string,
103
+ totalInterestUsd: string,
104
+ liqRatio: string,
105
+ liqPercent: string,
106
+ leveragedType: string,
107
+ leveragedAsset?: string,
108
+ leveragedLsdAssetRatio?: string,
109
+ liquidationPrice?: string,
110
+ minRatio: string,
111
+ debtTooLow: boolean,
112
+ minDebt: string,
113
+ }
114
+
115
+ export interface CompoundPositionData extends MMPositionData {
116
+ ratio: string,
117
+ minRatio: string,
118
+ borrowedUsd: string,
119
+ borrowLimitUsd: string,
120
+ incentiveUsd: string,
121
+ totalInterestUsd: string,
122
+ isSubscribedToAutomation?: boolean,
123
+ automationResubscribeRequired?: boolean,
124
+ }
125
+
126
+ export interface CompoundV2PositionData extends CompoundPositionData {
127
+ usedAssets: CompoundV2UsedAssets,
128
+ }
129
+
130
+ export interface CompoundV3PositionData extends CompoundPositionData {
131
+ usedAssets: CompoundV3UsedAssets,
132
132
  }
@@ -0,0 +1,130 @@
1
+ /* Autogenerated file. Do not edit manually. */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ import type BN from "bn.js";
6
+ import type { ContractOptions } from "web3-eth-contract";
7
+ import type { EventLog } from "web3-core";
8
+ import type { EventEmitter } from "events";
9
+ import type {
10
+ Callback,
11
+ PayableTransactionObject,
12
+ NonPayableTransactionObject,
13
+ BlockType,
14
+ ContractEventLog,
15
+ BaseContract,
16
+ } from "./types";
17
+
18
+ export interface EventOptions {
19
+ filter?: object;
20
+ fromBlock?: BlockType;
21
+ topics?: string[];
22
+ }
23
+
24
+ export type BorrowerOperationsAddressChanged = ContractEventLog<{
25
+ _newBorrowerOperationsAddress: string;
26
+ 0: string;
27
+ }>;
28
+ export type CollBalanceUpdated = ContractEventLog<{
29
+ _account: string;
30
+ _newBalance: string;
31
+ 0: string;
32
+ 1: string;
33
+ }>;
34
+ export type CollSent = ContractEventLog<{
35
+ _to: string;
36
+ _amount: string;
37
+ 0: string;
38
+ 1: string;
39
+ }>;
40
+ export type TroveManagerAddressChanged = ContractEventLog<{
41
+ _newTroveManagerAddress: string;
42
+ 0: string;
43
+ }>;
44
+
45
+ export interface LiquityV2CollSurplusPool extends BaseContract {
46
+ constructor(
47
+ jsonInterface: any[],
48
+ address?: string,
49
+ options?: ContractOptions
50
+ ): LiquityV2CollSurplusPool;
51
+ clone(): LiquityV2CollSurplusPool;
52
+ methods: {
53
+ NAME(): NonPayableTransactionObject<string>;
54
+
55
+ accountSurplus(
56
+ _account: string,
57
+ _amount: number | string | BN
58
+ ): NonPayableTransactionObject<void>;
59
+
60
+ borrowerOperationsAddress(): NonPayableTransactionObject<string>;
61
+
62
+ claimColl(_account: string): NonPayableTransactionObject<void>;
63
+
64
+ collToken(): NonPayableTransactionObject<string>;
65
+
66
+ getCollBalance(): NonPayableTransactionObject<string>;
67
+
68
+ getCollateral(_account: string): NonPayableTransactionObject<string>;
69
+
70
+ troveManagerAddress(): NonPayableTransactionObject<string>;
71
+ };
72
+ events: {
73
+ BorrowerOperationsAddressChanged(
74
+ cb?: Callback<BorrowerOperationsAddressChanged>
75
+ ): EventEmitter;
76
+ BorrowerOperationsAddressChanged(
77
+ options?: EventOptions,
78
+ cb?: Callback<BorrowerOperationsAddressChanged>
79
+ ): EventEmitter;
80
+
81
+ CollBalanceUpdated(cb?: Callback<CollBalanceUpdated>): EventEmitter;
82
+ CollBalanceUpdated(
83
+ options?: EventOptions,
84
+ cb?: Callback<CollBalanceUpdated>
85
+ ): EventEmitter;
86
+
87
+ CollSent(cb?: Callback<CollSent>): EventEmitter;
88
+ CollSent(options?: EventOptions, cb?: Callback<CollSent>): EventEmitter;
89
+
90
+ TroveManagerAddressChanged(
91
+ cb?: Callback<TroveManagerAddressChanged>
92
+ ): EventEmitter;
93
+ TroveManagerAddressChanged(
94
+ options?: EventOptions,
95
+ cb?: Callback<TroveManagerAddressChanged>
96
+ ): EventEmitter;
97
+
98
+ allEvents(options?: EventOptions, cb?: Callback<EventLog>): EventEmitter;
99
+ };
100
+
101
+ once(
102
+ event: "BorrowerOperationsAddressChanged",
103
+ cb: Callback<BorrowerOperationsAddressChanged>
104
+ ): void;
105
+ once(
106
+ event: "BorrowerOperationsAddressChanged",
107
+ options: EventOptions,
108
+ cb: Callback<BorrowerOperationsAddressChanged>
109
+ ): void;
110
+
111
+ once(event: "CollBalanceUpdated", cb: Callback<CollBalanceUpdated>): void;
112
+ once(
113
+ event: "CollBalanceUpdated",
114
+ options: EventOptions,
115
+ cb: Callback<CollBalanceUpdated>
116
+ ): void;
117
+
118
+ once(event: "CollSent", cb: Callback<CollSent>): void;
119
+ once(event: "CollSent", options: EventOptions, cb: Callback<CollSent>): void;
120
+
121
+ once(
122
+ event: "TroveManagerAddressChanged",
123
+ cb: Callback<TroveManagerAddressChanged>
124
+ ): void;
125
+ once(
126
+ event: "TroveManagerAddressChanged",
127
+ options: EventOptions,
128
+ cb: Callback<TroveManagerAddressChanged>
129
+ ): void;
130
+ }