@defisaver/positions-sdk 0.0.80 → 0.0.83
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.
- package/cjs/aaveV3/index.js +4 -7
- package/cjs/markets/aave/marketAssets.js +1 -1
- package/cjs/spark/index.js +57 -48
- package/esm/aaveV3/index.js +4 -7
- package/esm/markets/aave/marketAssets.js +1 -1
- package/esm/spark/index.js +58 -49
- package/package.json +2 -2
- package/src/aaveV3/index.ts +5 -8
- package/src/markets/aave/marketAssets.ts +1 -1
- package/src/spark/index.ts +59 -48
- package/yarn-error.log +0 -64
package/cjs/aaveV3/index.js
CHANGED
|
@@ -139,13 +139,13 @@ function getAaveV3MarketData(web3, network, market, defaultWeb3) {
|
|
|
139
139
|
let discountRateOnBorrow = '0';
|
|
140
140
|
if (nativeAsset && facilitatorsList && discountRate && minDiscountTokenBalance && minGhoBalanceForDiscount && ghoDiscountedPerDiscountToken) {
|
|
141
141
|
const facilitatorBucket = yield ghoContract.methods.getFacilitatorBucket(facilitatorsList[0]).call();
|
|
142
|
-
const availableFacilitatorCap = (0, tokens_1.assetAmountInEth)(new decimal_js_1.default(facilitatorBucket[0]).sub(facilitatorBucket[1]).toString(), 'GHO');
|
|
143
142
|
borrowCap = decimal_js_1.default.min(borrowCap, (0, tokens_1.assetAmountInEth)(facilitatorBucket[0], 'GHO')).toString();
|
|
144
143
|
discountRateOnBorrow = (0, exports.aaveV3CalculateDiscountRate)(tokenMarket.totalBorrow.toString(), '3160881469228662060510133', // stkAAVE total supply
|
|
145
144
|
discountRate, minDiscountTokenBalance, minGhoBalanceForDiscount, ghoDiscountedPerDiscountToken);
|
|
146
145
|
}
|
|
147
|
-
|
|
148
|
-
|
|
146
|
+
const borrowCapInWei = new decimal_js_1.default((0, tokens_1.assetAmountInWei)(borrowCap.toString(), symbol));
|
|
147
|
+
let marketLiquidity = borrowCapInWei.lt(new decimal_js_1.default(tokenMarket.totalSupply)) || nativeAsset
|
|
148
|
+
? (0, tokens_1.assetAmountInEth)(borrowCapInWei
|
|
149
149
|
.sub(tokenMarket.totalBorrow.toString())
|
|
150
150
|
.toString(), symbol)
|
|
151
151
|
: (0, tokens_1.assetAmountInEth)(new decimal_js_1.default(tokenMarket.totalSupply.toString())
|
|
@@ -161,10 +161,7 @@ function getAaveV3MarketData(web3, network, market, defaultWeb3) {
|
|
|
161
161
|
minDiscountTokenBalance,
|
|
162
162
|
minGhoBalanceForDiscount,
|
|
163
163
|
},
|
|
164
|
-
})), { symbol, isIsolated: new decimal_js_1.default(tokenMarket.debtCeilingForIsolationMode).gt(0), debtCeilingForIsolationMode: new decimal_js_1.default(tokenMarket.debtCeilingForIsolationMode).div(100).toString(), isSiloed: tokenMarket.isSiloedForBorrowing, eModeCategory: +tokenMarket.emodeCategory, isolationModeTotalDebt: new decimal_js_1.default(tokenMarket.isolationModeTotalDebt).div(100).toString(), assetId: Number(tokenMarket.assetId), underlyingTokenAddress: tokenMarket.underlyingTokenAddress, supplyRate: new decimal_js_1.default(tokenMarket.supplyRate.toString()).div(1e25).toString(), borrowRate: new decimal_js_1.default(tokenMarket.borrowRateVariable.toString()).div(1e25).toString(), borrowRateDiscounted: nativeAsset ? new decimal_js_1.default(tokenMarket.borrowRateVariable.toString()).div(1e25).mul(1 - parseFloat(discountRateOnBorrow)).toString() : '0', borrowRateStable: new decimal_js_1.default(tokenMarket.borrowRateStable.toString()).div(1e25).toString(), collateralFactor: new decimal_js_1.default(tokenMarket.collateralFactor.toString()).div(10000).toString(), liquidationRatio: new decimal_js_1.default(tokenMarket.liquidationRatio.toString()).div(10000).toString(), marketLiquidity, utilization: new decimal_js_1.default(tokenMarket.totalBorrow.toString())
|
|
165
|
-
.div(new decimal_js_1.default(tokenMarket.totalSupply.toString()))
|
|
166
|
-
.times(100)
|
|
167
|
-
.toString(), usageAsCollateralEnabled: tokenMarket.usageAsCollateralEnabled, supplyCap: tokenMarket.supplyCap, borrowCap, totalSupply: (0, tokens_1.assetAmountInEth)(tokenMarket.totalSupply.toString(), symbol), isInactive: !tokenMarket.isActive, isFrozen: tokenMarket.isFrozen, isPaused: tokenMarket.isPaused, canBeBorrowed: tokenMarket.isActive && !tokenMarket.isPaused && !tokenMarket.isFrozen && tokenMarket.borrowingEnabled && isBorrowAllowed, canBeSupplied: !nativeAsset && tokenMarket.isActive && !tokenMarket.isPaused && !tokenMarket.isFrozen, canBeWithdrawn: tokenMarket.isActive && !tokenMarket.isPaused, canBePayBacked: tokenMarket.isActive && !tokenMarket.isPaused, disabledStableBorrowing: !tokenMarket.stableBorrowRateEnabled, totalBorrow: (0, tokens_1.assetAmountInEth)(tokenMarket.totalBorrow.toString(), symbol), totalBorrowVar: (0, tokens_1.assetAmountInEth)(tokenMarket.totalBorrowVar.toString(), symbol), price: new decimal_js_1.default(tokenMarket.price.toString()).div(1e8).toString(), isolationModeBorrowingEnabled: tokenMarket.isolationModeBorrowingEnabled, isFlashLoanEnabled: tokenMarket.isFlashLoanEnabled, eModeCategoryData: {
|
|
164
|
+
})), { symbol, isIsolated: new decimal_js_1.default(tokenMarket.debtCeilingForIsolationMode).gt(0), debtCeilingForIsolationMode: new decimal_js_1.default(tokenMarket.debtCeilingForIsolationMode).div(100).toString(), isSiloed: tokenMarket.isSiloedForBorrowing, eModeCategory: +tokenMarket.emodeCategory, isolationModeTotalDebt: new decimal_js_1.default(tokenMarket.isolationModeTotalDebt).div(100).toString(), assetId: Number(tokenMarket.assetId), underlyingTokenAddress: tokenMarket.underlyingTokenAddress, supplyRate: new decimal_js_1.default(tokenMarket.supplyRate.toString()).div(1e25).toString(), borrowRate: new decimal_js_1.default(tokenMarket.borrowRateVariable.toString()).div(1e25).toString(), borrowRateDiscounted: nativeAsset ? new decimal_js_1.default(tokenMarket.borrowRateVariable.toString()).div(1e25).mul(1 - parseFloat(discountRateOnBorrow)).toString() : '0', borrowRateStable: new decimal_js_1.default(tokenMarket.borrowRateStable.toString()).div(1e25).toString(), collateralFactor: new decimal_js_1.default(tokenMarket.collateralFactor.toString()).div(10000).toString(), liquidationRatio: new decimal_js_1.default(tokenMarket.liquidationRatio.toString()).div(10000).toString(), marketLiquidity, utilization: new decimal_js_1.default(tokenMarket.totalBorrow.toString()).times(100).div(new decimal_js_1.default(tokenMarket.totalSupply.toString())).toString(), usageAsCollateralEnabled: tokenMarket.usageAsCollateralEnabled, supplyCap: tokenMarket.supplyCap, borrowCap, totalSupply: (0, tokens_1.assetAmountInEth)(tokenMarket.totalSupply.toString(), symbol), isInactive: !tokenMarket.isActive, isFrozen: tokenMarket.isFrozen, isPaused: tokenMarket.isPaused, canBeBorrowed: tokenMarket.isActive && !tokenMarket.isPaused && !tokenMarket.isFrozen && tokenMarket.borrowingEnabled && isBorrowAllowed, canBeSupplied: !nativeAsset && tokenMarket.isActive && !tokenMarket.isPaused && !tokenMarket.isFrozen, canBeWithdrawn: tokenMarket.isActive && !tokenMarket.isPaused, canBePayBacked: tokenMarket.isActive && !tokenMarket.isPaused, disabledStableBorrowing: !tokenMarket.stableBorrowRateEnabled, totalBorrow: (0, tokens_1.assetAmountInEth)(tokenMarket.totalBorrow.toString(), symbol), totalBorrowVar: (0, tokens_1.assetAmountInEth)(tokenMarket.totalBorrowVar.toString(), symbol), price: new decimal_js_1.default(tokenMarket.price.toString()).div(1e8).toString(), isolationModeBorrowingEnabled: tokenMarket.isolationModeBorrowingEnabled, isFlashLoanEnabled: tokenMarket.isFlashLoanEnabled, eModeCategoryData: {
|
|
168
165
|
label: tokenMarket.label,
|
|
169
166
|
liquidationBonus: new decimal_js_1.default(tokenMarket.liquidationBonus).div(10000).toString(),
|
|
170
167
|
liquidationRatio: new decimal_js_1.default(tokenMarket.liquidationThreshold).div(10000).toString(),
|
|
@@ -14,7 +14,7 @@ exports.aaveV3AssetsDefaultMarketOpt = [
|
|
|
14
14
|
exports.aaveV3AssetsDefaultMarketArb = [
|
|
15
15
|
'ETH', 'DAI', 'EURS', 'USDC', 'USDT', 'AAVE', 'LINK', 'WBTC', 'wstETH', 'MAI', 'rETH', 'LUSD', 'USDC.e', 'FRAX', 'ARB', 'weETH',
|
|
16
16
|
];
|
|
17
|
-
exports.aaveV3AssetsDefaultMarketBase = ['ETH', 'cbETH', 'USDbC', 'wstETH', 'USDC'];
|
|
17
|
+
exports.aaveV3AssetsDefaultMarketBase = ['ETH', 'cbETH', 'USDbC', 'wstETH', 'USDC', 'weETH'];
|
|
18
18
|
// @dev Keep assets in array, do not assign directly, so we can parse it and edit it programmatically with `scripts/updateMarkets`
|
|
19
19
|
exports.aaveV3AssetsDefaultMarket = {
|
|
20
20
|
[common_1.NetworkNumber.Eth]: exports.aaveV3AssetsDefaultMarketEth,
|
package/cjs/spark/index.js
CHANGED
|
@@ -66,54 +66,63 @@ const getSparkMarketsData = (web3, network, selectedMarket, mainnetWeb3) => __aw
|
|
|
66
66
|
}
|
|
67
67
|
const loanInfoContract = (0, contracts_1.SparkViewContract)(web3, network);
|
|
68
68
|
const loanInfo = yield loanInfoContract.methods.getFullTokensInfo(marketAddress, selectedMarket.assets.map(a => (0, tokens_1.getAssetInfo)((0, utils_1.ethToWeth)(a)).address)).call();
|
|
69
|
-
const assetsData = loanInfo
|
|
70
|
-
.map((market, i) => ({
|
|
71
|
-
symbol
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
.
|
|
86
|
-
.
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
.
|
|
90
|
-
.
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
69
|
+
const assetsData = yield Promise.all(loanInfo
|
|
70
|
+
.map((market, i) => __awaiter(void 0, void 0, void 0, function* () {
|
|
71
|
+
const symbol = selectedMarket.assets[i];
|
|
72
|
+
const borrowCapInWei = new decimal_js_1.default((0, tokens_1.assetAmountInWei)(market.borrowCap.toString(), symbol));
|
|
73
|
+
let marketLiquidity = borrowCapInWei.lt(new decimal_js_1.default(market.totalSupply))
|
|
74
|
+
? (0, tokens_1.assetAmountInEth)(borrowCapInWei
|
|
75
|
+
.sub(market.totalBorrow.toString())
|
|
76
|
+
.toString(), symbol)
|
|
77
|
+
: (0, tokens_1.assetAmountInEth)(new decimal_js_1.default(market.totalSupply.toString())
|
|
78
|
+
.sub(market.totalBorrow.toString())
|
|
79
|
+
.toString(), symbol);
|
|
80
|
+
if (new decimal_js_1.default(marketLiquidity).lt(0)) {
|
|
81
|
+
marketLiquidity = '0';
|
|
82
|
+
}
|
|
83
|
+
return ({
|
|
84
|
+
symbol: selectedMarket.assets[i],
|
|
85
|
+
isIsolated: new decimal_js_1.default(market.debtCeilingForIsolationMode).gt(0),
|
|
86
|
+
debtCeilingForIsolationMode: new decimal_js_1.default(market.debtCeilingForIsolationMode).div(100).toString(),
|
|
87
|
+
isSiloed: market.isSiloedForBorrowing,
|
|
88
|
+
eModeCategory: +market.emodeCategory,
|
|
89
|
+
isolationModeTotalDebt: new decimal_js_1.default(market.isolationModeTotalDebt).div(100).toString(),
|
|
90
|
+
assetId: Number(market.assetId),
|
|
91
|
+
underlyingTokenAddress: market.underlyingTokenAddress,
|
|
92
|
+
supplyRate: new decimal_js_1.default(market.supplyRate.toString()).div(1e25).toString(),
|
|
93
|
+
borrowRate: new decimal_js_1.default(market.borrowRateVariable.toString()).div(1e25).toString(),
|
|
94
|
+
borrowRateStable: new decimal_js_1.default(market.borrowRateStable.toString()).div(1e25).toString(),
|
|
95
|
+
collateralFactor: new decimal_js_1.default(market.collateralFactor.toString()).div(10000).toString(),
|
|
96
|
+
liquidationRatio: new decimal_js_1.default(market.liquidationRatio.toString()).div(10000).toString(),
|
|
97
|
+
marketLiquidity,
|
|
98
|
+
utilization: new decimal_js_1.default(market.totalBorrow.toString()).times(100).div(new decimal_js_1.default(market.totalSupply.toString())).toString(),
|
|
99
|
+
usageAsCollateralEnabled: market.usageAsCollateralEnabled,
|
|
100
|
+
supplyCap: market.supplyCap,
|
|
101
|
+
borrowCap: market.borrowCap,
|
|
102
|
+
totalSupply: (0, tokens_1.assetAmountInEth)(market.totalSupply.toString(), selectedMarket.assets[i]),
|
|
103
|
+
isInactive: !market.isActive,
|
|
104
|
+
isFrozen: market.isFrozen,
|
|
105
|
+
isPaused: market.isPaused,
|
|
106
|
+
canBeBorrowed: market.isActive && !market.isPaused && !market.isFrozen && market.borrowingEnabled,
|
|
107
|
+
canBeSupplied: market.isActive && !market.isPaused && !market.isFrozen,
|
|
108
|
+
canBeWithdrawn: market.isActive && !market.isPaused,
|
|
109
|
+
canBePayBacked: market.isActive && !market.isPaused,
|
|
110
|
+
disabledStableBorrowing: !market.stableBorrowRateEnabled,
|
|
111
|
+
totalBorrow: (0, tokens_1.assetAmountInEth)(market.totalBorrow.toString(), selectedMarket.assets[i]),
|
|
112
|
+
totalBorrowVar: (0, tokens_1.assetAmountInEth)(market.totalBorrowVar.toString(), selectedMarket.assets[i]),
|
|
113
|
+
price: new decimal_js_1.default(market.price.toString()).div(1e8).toString(),
|
|
114
|
+
isolationModeBorrowingEnabled: market.isolationModeBorrowingEnabled,
|
|
115
|
+
isFlashLoanEnabled: market.isFlashLoanEnabled,
|
|
116
|
+
aTokenAddress: market.aTokenAddress,
|
|
117
|
+
eModeCategoryData: {
|
|
118
|
+
label: market.label,
|
|
119
|
+
liquidationBonus: new decimal_js_1.default(market.liquidationBonus).div(10000).toString(),
|
|
120
|
+
liquidationRatio: new decimal_js_1.default(market.liquidationThreshold).div(10000).toString(),
|
|
121
|
+
collateralFactor: new decimal_js_1.default(market.ltv).div(10000).toString(),
|
|
122
|
+
priceSource: market.priceSource,
|
|
123
|
+
},
|
|
124
|
+
});
|
|
125
|
+
})));
|
|
117
126
|
yield Promise.all(assetsData.map((market) => __awaiter(void 0, void 0, void 0, function* () {
|
|
118
127
|
/* eslint-disable no-param-reassign */
|
|
119
128
|
const rewardForMarket = rewardInfo[market.underlyingTokenAddress];
|
package/esm/aaveV3/index.js
CHANGED
|
@@ -130,13 +130,13 @@ export function getAaveV3MarketData(web3, network, market, defaultWeb3) {
|
|
|
130
130
|
let discountRateOnBorrow = '0';
|
|
131
131
|
if (nativeAsset && facilitatorsList && discountRate && minDiscountTokenBalance && minGhoBalanceForDiscount && ghoDiscountedPerDiscountToken) {
|
|
132
132
|
const facilitatorBucket = yield ghoContract.methods.getFacilitatorBucket(facilitatorsList[0]).call();
|
|
133
|
-
const availableFacilitatorCap = assetAmountInEth(new Dec(facilitatorBucket[0]).sub(facilitatorBucket[1]).toString(), 'GHO');
|
|
134
133
|
borrowCap = Dec.min(borrowCap, assetAmountInEth(facilitatorBucket[0], 'GHO')).toString();
|
|
135
134
|
discountRateOnBorrow = aaveV3CalculateDiscountRate(tokenMarket.totalBorrow.toString(), '3160881469228662060510133', // stkAAVE total supply
|
|
136
135
|
discountRate, minDiscountTokenBalance, minGhoBalanceForDiscount, ghoDiscountedPerDiscountToken);
|
|
137
136
|
}
|
|
138
|
-
|
|
139
|
-
|
|
137
|
+
const borrowCapInWei = new Dec(assetAmountInWei(borrowCap.toString(), symbol));
|
|
138
|
+
let marketLiquidity = borrowCapInWei.lt(new Dec(tokenMarket.totalSupply)) || nativeAsset
|
|
139
|
+
? assetAmountInEth(borrowCapInWei
|
|
140
140
|
.sub(tokenMarket.totalBorrow.toString())
|
|
141
141
|
.toString(), symbol)
|
|
142
142
|
: assetAmountInEth(new Dec(tokenMarket.totalSupply.toString())
|
|
@@ -152,10 +152,7 @@ export function getAaveV3MarketData(web3, network, market, defaultWeb3) {
|
|
|
152
152
|
minDiscountTokenBalance,
|
|
153
153
|
minGhoBalanceForDiscount,
|
|
154
154
|
},
|
|
155
|
-
})), { symbol, isIsolated: new Dec(tokenMarket.debtCeilingForIsolationMode).gt(0), debtCeilingForIsolationMode: new Dec(tokenMarket.debtCeilingForIsolationMode).div(100).toString(), isSiloed: tokenMarket.isSiloedForBorrowing, eModeCategory: +tokenMarket.emodeCategory, isolationModeTotalDebt: new Dec(tokenMarket.isolationModeTotalDebt).div(100).toString(), assetId: Number(tokenMarket.assetId), underlyingTokenAddress: tokenMarket.underlyingTokenAddress, supplyRate: new Dec(tokenMarket.supplyRate.toString()).div(1e25).toString(), borrowRate: new Dec(tokenMarket.borrowRateVariable.toString()).div(1e25).toString(), borrowRateDiscounted: nativeAsset ? new Dec(tokenMarket.borrowRateVariable.toString()).div(1e25).mul(1 - parseFloat(discountRateOnBorrow)).toString() : '0', borrowRateStable: new Dec(tokenMarket.borrowRateStable.toString()).div(1e25).toString(), collateralFactor: new Dec(tokenMarket.collateralFactor.toString()).div(10000).toString(), liquidationRatio: new Dec(tokenMarket.liquidationRatio.toString()).div(10000).toString(), marketLiquidity, utilization: new Dec(tokenMarket.totalBorrow.toString())
|
|
156
|
-
.div(new Dec(tokenMarket.totalSupply.toString()))
|
|
157
|
-
.times(100)
|
|
158
|
-
.toString(), usageAsCollateralEnabled: tokenMarket.usageAsCollateralEnabled, supplyCap: tokenMarket.supplyCap, borrowCap, totalSupply: assetAmountInEth(tokenMarket.totalSupply.toString(), symbol), isInactive: !tokenMarket.isActive, isFrozen: tokenMarket.isFrozen, isPaused: tokenMarket.isPaused, canBeBorrowed: tokenMarket.isActive && !tokenMarket.isPaused && !tokenMarket.isFrozen && tokenMarket.borrowingEnabled && isBorrowAllowed, canBeSupplied: !nativeAsset && tokenMarket.isActive && !tokenMarket.isPaused && !tokenMarket.isFrozen, canBeWithdrawn: tokenMarket.isActive && !tokenMarket.isPaused, canBePayBacked: tokenMarket.isActive && !tokenMarket.isPaused, disabledStableBorrowing: !tokenMarket.stableBorrowRateEnabled, totalBorrow: assetAmountInEth(tokenMarket.totalBorrow.toString(), symbol), totalBorrowVar: assetAmountInEth(tokenMarket.totalBorrowVar.toString(), symbol), price: new Dec(tokenMarket.price.toString()).div(1e8).toString(), isolationModeBorrowingEnabled: tokenMarket.isolationModeBorrowingEnabled, isFlashLoanEnabled: tokenMarket.isFlashLoanEnabled, eModeCategoryData: {
|
|
155
|
+
})), { symbol, isIsolated: new Dec(tokenMarket.debtCeilingForIsolationMode).gt(0), debtCeilingForIsolationMode: new Dec(tokenMarket.debtCeilingForIsolationMode).div(100).toString(), isSiloed: tokenMarket.isSiloedForBorrowing, eModeCategory: +tokenMarket.emodeCategory, isolationModeTotalDebt: new Dec(tokenMarket.isolationModeTotalDebt).div(100).toString(), assetId: Number(tokenMarket.assetId), underlyingTokenAddress: tokenMarket.underlyingTokenAddress, supplyRate: new Dec(tokenMarket.supplyRate.toString()).div(1e25).toString(), borrowRate: new Dec(tokenMarket.borrowRateVariable.toString()).div(1e25).toString(), borrowRateDiscounted: nativeAsset ? new Dec(tokenMarket.borrowRateVariable.toString()).div(1e25).mul(1 - parseFloat(discountRateOnBorrow)).toString() : '0', borrowRateStable: new Dec(tokenMarket.borrowRateStable.toString()).div(1e25).toString(), collateralFactor: new Dec(tokenMarket.collateralFactor.toString()).div(10000).toString(), liquidationRatio: new Dec(tokenMarket.liquidationRatio.toString()).div(10000).toString(), marketLiquidity, utilization: new Dec(tokenMarket.totalBorrow.toString()).times(100).div(new Dec(tokenMarket.totalSupply.toString())).toString(), usageAsCollateralEnabled: tokenMarket.usageAsCollateralEnabled, supplyCap: tokenMarket.supplyCap, borrowCap, totalSupply: assetAmountInEth(tokenMarket.totalSupply.toString(), symbol), isInactive: !tokenMarket.isActive, isFrozen: tokenMarket.isFrozen, isPaused: tokenMarket.isPaused, canBeBorrowed: tokenMarket.isActive && !tokenMarket.isPaused && !tokenMarket.isFrozen && tokenMarket.borrowingEnabled && isBorrowAllowed, canBeSupplied: !nativeAsset && tokenMarket.isActive && !tokenMarket.isPaused && !tokenMarket.isFrozen, canBeWithdrawn: tokenMarket.isActive && !tokenMarket.isPaused, canBePayBacked: tokenMarket.isActive && !tokenMarket.isPaused, disabledStableBorrowing: !tokenMarket.stableBorrowRateEnabled, totalBorrow: assetAmountInEth(tokenMarket.totalBorrow.toString(), symbol), totalBorrowVar: assetAmountInEth(tokenMarket.totalBorrowVar.toString(), symbol), price: new Dec(tokenMarket.price.toString()).div(1e8).toString(), isolationModeBorrowingEnabled: tokenMarket.isolationModeBorrowingEnabled, isFlashLoanEnabled: tokenMarket.isFlashLoanEnabled, eModeCategoryData: {
|
|
159
156
|
label: tokenMarket.label,
|
|
160
157
|
liquidationBonus: new Dec(tokenMarket.liquidationBonus).div(10000).toString(),
|
|
161
158
|
liquidationRatio: new Dec(tokenMarket.liquidationThreshold).div(10000).toString(),
|
|
@@ -11,7 +11,7 @@ export const aaveV3AssetsDefaultMarketOpt = [
|
|
|
11
11
|
export const aaveV3AssetsDefaultMarketArb = [
|
|
12
12
|
'ETH', 'DAI', 'EURS', 'USDC', 'USDT', 'AAVE', 'LINK', 'WBTC', 'wstETH', 'MAI', 'rETH', 'LUSD', 'USDC.e', 'FRAX', 'ARB', 'weETH',
|
|
13
13
|
];
|
|
14
|
-
export const aaveV3AssetsDefaultMarketBase = ['ETH', 'cbETH', 'USDbC', 'wstETH', 'USDC'];
|
|
14
|
+
export const aaveV3AssetsDefaultMarketBase = ['ETH', 'cbETH', 'USDbC', 'wstETH', 'USDC', 'weETH'];
|
|
15
15
|
// @dev Keep assets in array, do not assign directly, so we can parse it and edit it programmatically with `scripts/updateMarkets`
|
|
16
16
|
export const aaveV3AssetsDefaultMarket = {
|
|
17
17
|
[NetworkNumber.Eth]: aaveV3AssetsDefaultMarketEth,
|
package/esm/spark/index.js
CHANGED
|
@@ -8,7 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
import Dec from 'decimal.js';
|
|
11
|
-
import { assetAmountInEth, getAssetInfo } from '@defisaver/tokens';
|
|
11
|
+
import { assetAmountInEth, assetAmountInWei, getAssetInfo } from '@defisaver/tokens';
|
|
12
12
|
import { ethToWeth, getAbiItem, isLayer2Network, wethToEth, wethToEthByAddress, } from '../services/utils';
|
|
13
13
|
import { calculateNetApy, getCbETHApr, getREthApr, getStETHApr, } from '../staking';
|
|
14
14
|
import { getDsrApy } from '../services/dsrService';
|
|
@@ -59,54 +59,63 @@ export const getSparkMarketsData = (web3, network, selectedMarket, mainnetWeb3)
|
|
|
59
59
|
}
|
|
60
60
|
const loanInfoContract = SparkViewContract(web3, network);
|
|
61
61
|
const loanInfo = yield loanInfoContract.methods.getFullTokensInfo(marketAddress, selectedMarket.assets.map(a => getAssetInfo(ethToWeth(a)).address)).call();
|
|
62
|
-
const assetsData = loanInfo
|
|
63
|
-
.map((market, i) => ({
|
|
64
|
-
symbol
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
.
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
.
|
|
83
|
-
.
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
62
|
+
const assetsData = yield Promise.all(loanInfo
|
|
63
|
+
.map((market, i) => __awaiter(void 0, void 0, void 0, function* () {
|
|
64
|
+
const symbol = selectedMarket.assets[i];
|
|
65
|
+
const borrowCapInWei = new Dec(assetAmountInWei(market.borrowCap.toString(), symbol));
|
|
66
|
+
let marketLiquidity = borrowCapInWei.lt(new Dec(market.totalSupply))
|
|
67
|
+
? assetAmountInEth(borrowCapInWei
|
|
68
|
+
.sub(market.totalBorrow.toString())
|
|
69
|
+
.toString(), symbol)
|
|
70
|
+
: assetAmountInEth(new Dec(market.totalSupply.toString())
|
|
71
|
+
.sub(market.totalBorrow.toString())
|
|
72
|
+
.toString(), symbol);
|
|
73
|
+
if (new Dec(marketLiquidity).lt(0)) {
|
|
74
|
+
marketLiquidity = '0';
|
|
75
|
+
}
|
|
76
|
+
return ({
|
|
77
|
+
symbol: selectedMarket.assets[i],
|
|
78
|
+
isIsolated: new Dec(market.debtCeilingForIsolationMode).gt(0),
|
|
79
|
+
debtCeilingForIsolationMode: new Dec(market.debtCeilingForIsolationMode).div(100).toString(),
|
|
80
|
+
isSiloed: market.isSiloedForBorrowing,
|
|
81
|
+
eModeCategory: +market.emodeCategory,
|
|
82
|
+
isolationModeTotalDebt: new Dec(market.isolationModeTotalDebt).div(100).toString(),
|
|
83
|
+
assetId: Number(market.assetId),
|
|
84
|
+
underlyingTokenAddress: market.underlyingTokenAddress,
|
|
85
|
+
supplyRate: new Dec(market.supplyRate.toString()).div(1e25).toString(),
|
|
86
|
+
borrowRate: new Dec(market.borrowRateVariable.toString()).div(1e25).toString(),
|
|
87
|
+
borrowRateStable: new Dec(market.borrowRateStable.toString()).div(1e25).toString(),
|
|
88
|
+
collateralFactor: new Dec(market.collateralFactor.toString()).div(10000).toString(),
|
|
89
|
+
liquidationRatio: new Dec(market.liquidationRatio.toString()).div(10000).toString(),
|
|
90
|
+
marketLiquidity,
|
|
91
|
+
utilization: new Dec(market.totalBorrow.toString()).times(100).div(new Dec(market.totalSupply.toString())).toString(),
|
|
92
|
+
usageAsCollateralEnabled: market.usageAsCollateralEnabled,
|
|
93
|
+
supplyCap: market.supplyCap,
|
|
94
|
+
borrowCap: market.borrowCap,
|
|
95
|
+
totalSupply: assetAmountInEth(market.totalSupply.toString(), selectedMarket.assets[i]),
|
|
96
|
+
isInactive: !market.isActive,
|
|
97
|
+
isFrozen: market.isFrozen,
|
|
98
|
+
isPaused: market.isPaused,
|
|
99
|
+
canBeBorrowed: market.isActive && !market.isPaused && !market.isFrozen && market.borrowingEnabled,
|
|
100
|
+
canBeSupplied: market.isActive && !market.isPaused && !market.isFrozen,
|
|
101
|
+
canBeWithdrawn: market.isActive && !market.isPaused,
|
|
102
|
+
canBePayBacked: market.isActive && !market.isPaused,
|
|
103
|
+
disabledStableBorrowing: !market.stableBorrowRateEnabled,
|
|
104
|
+
totalBorrow: assetAmountInEth(market.totalBorrow.toString(), selectedMarket.assets[i]),
|
|
105
|
+
totalBorrowVar: assetAmountInEth(market.totalBorrowVar.toString(), selectedMarket.assets[i]),
|
|
106
|
+
price: new Dec(market.price.toString()).div(1e8).toString(),
|
|
107
|
+
isolationModeBorrowingEnabled: market.isolationModeBorrowingEnabled,
|
|
108
|
+
isFlashLoanEnabled: market.isFlashLoanEnabled,
|
|
109
|
+
aTokenAddress: market.aTokenAddress,
|
|
110
|
+
eModeCategoryData: {
|
|
111
|
+
label: market.label,
|
|
112
|
+
liquidationBonus: new Dec(market.liquidationBonus).div(10000).toString(),
|
|
113
|
+
liquidationRatio: new Dec(market.liquidationThreshold).div(10000).toString(),
|
|
114
|
+
collateralFactor: new Dec(market.ltv).div(10000).toString(),
|
|
115
|
+
priceSource: market.priceSource,
|
|
116
|
+
},
|
|
117
|
+
});
|
|
118
|
+
})));
|
|
110
119
|
yield Promise.all(assetsData.map((market) => __awaiter(void 0, void 0, void 0, function* () {
|
|
111
120
|
/* eslint-disable no-param-reassign */
|
|
112
121
|
const rewardForMarket = rewardInfo[market.underlyingTokenAddress];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@defisaver/positions-sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.83",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./cjs/index.js",
|
|
6
6
|
"module": "./esm/index.js",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"author": "",
|
|
20
20
|
"license": "ISC",
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@defisaver/tokens": "^1.5.
|
|
22
|
+
"@defisaver/tokens": "^1.5.23",
|
|
23
23
|
"@ethersproject/bignumber": "^5.7.0",
|
|
24
24
|
"@morpho-org/morpho-aave-v3-sdk": "^1.5.3",
|
|
25
25
|
"@stakewise/v3-sdk": "^1.3.0",
|
package/src/aaveV3/index.ts
CHANGED
|
@@ -181,9 +181,8 @@ export async function getAaveV3MarketData(web3: Web3, network: NetworkNumber, ma
|
|
|
181
181
|
|
|
182
182
|
if (nativeAsset && facilitatorsList && discountRate && minDiscountTokenBalance && minGhoBalanceForDiscount && ghoDiscountedPerDiscountToken) {
|
|
183
183
|
const facilitatorBucket = await ghoContract.methods.getFacilitatorBucket(facilitatorsList[0]).call();
|
|
184
|
-
const availableFacilitatorCap = assetAmountInEth(new Dec(facilitatorBucket[0]).sub(facilitatorBucket[1]).toString(), 'GHO');
|
|
185
184
|
|
|
186
|
-
borrowCap = Dec.min(borrowCap, assetAmountInEth(facilitatorBucket[0],'GHO')).toString();
|
|
185
|
+
borrowCap = Dec.min(borrowCap, assetAmountInEth(facilitatorBucket[0], 'GHO')).toString();
|
|
187
186
|
|
|
188
187
|
discountRateOnBorrow = aaveV3CalculateDiscountRate(
|
|
189
188
|
tokenMarket.totalBorrow.toString(),
|
|
@@ -195,8 +194,9 @@ export async function getAaveV3MarketData(web3: Web3, network: NetworkNumber, ma
|
|
|
195
194
|
);
|
|
196
195
|
}
|
|
197
196
|
|
|
198
|
-
|
|
199
|
-
|
|
197
|
+
const borrowCapInWei = new Dec(assetAmountInWei(borrowCap.toString(), symbol));
|
|
198
|
+
let marketLiquidity = borrowCapInWei.lt(new Dec(tokenMarket.totalSupply)) || nativeAsset
|
|
199
|
+
? assetAmountInEth(borrowCapInWei
|
|
200
200
|
.sub(tokenMarket.totalBorrow.toString())
|
|
201
201
|
.toString(), symbol)
|
|
202
202
|
: assetAmountInEth(new Dec(tokenMarket.totalSupply.toString())
|
|
@@ -232,10 +232,7 @@ export async function getAaveV3MarketData(web3: Web3, network: NetworkNumber, ma
|
|
|
232
232
|
collateralFactor: new Dec(tokenMarket.collateralFactor.toString()).div(10000).toString(),
|
|
233
233
|
liquidationRatio: new Dec(tokenMarket.liquidationRatio.toString()).div(10000).toString(),
|
|
234
234
|
marketLiquidity,
|
|
235
|
-
utilization: new Dec(tokenMarket.totalBorrow.toString())
|
|
236
|
-
.div(new Dec(tokenMarket.totalSupply.toString()))
|
|
237
|
-
.times(100)
|
|
238
|
-
.toString(),
|
|
235
|
+
utilization: new Dec(tokenMarket.totalBorrow.toString()).times(100).div(new Dec(tokenMarket.totalSupply.toString())).toString(),
|
|
239
236
|
usageAsCollateralEnabled: tokenMarket.usageAsCollateralEnabled,
|
|
240
237
|
supplyCap: tokenMarket.supplyCap,
|
|
241
238
|
borrowCap,
|
|
@@ -14,7 +14,7 @@ export const aaveV3AssetsDefaultMarketOpt = [
|
|
|
14
14
|
export const aaveV3AssetsDefaultMarketArb = [
|
|
15
15
|
'ETH', 'DAI', 'EURS', 'USDC', 'USDT', 'AAVE', 'LINK', 'WBTC', 'wstETH', 'MAI', 'rETH', 'LUSD', 'USDC.e', 'FRAX', 'ARB', 'weETH',
|
|
16
16
|
];
|
|
17
|
-
export const aaveV3AssetsDefaultMarketBase = ['ETH', 'cbETH', 'USDbC', 'wstETH', 'USDC'];
|
|
17
|
+
export const aaveV3AssetsDefaultMarketBase = ['ETH', 'cbETH', 'USDbC', 'wstETH', 'USDC', 'weETH'];
|
|
18
18
|
|
|
19
19
|
// @dev Keep assets in array, do not assign directly, so we can parse it and edit it programmatically with `scripts/updateMarkets`
|
|
20
20
|
export const aaveV3AssetsDefaultMarket = {
|
package/src/spark/index.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Web3 from 'web3';
|
|
2
2
|
import Dec from 'decimal.js';
|
|
3
|
-
import { assetAmountInEth, getAssetInfo } from '@defisaver/tokens';
|
|
3
|
+
import { assetAmountInEth, assetAmountInWei, getAssetInfo } from '@defisaver/tokens';
|
|
4
4
|
import {
|
|
5
5
|
Blockish, EthAddress, NetworkNumber, PositionBalances,
|
|
6
6
|
} from '../types/common';
|
|
@@ -85,53 +85,64 @@ export const getSparkMarketsData = async (web3: Web3, network: NetworkNumber, se
|
|
|
85
85
|
selectedMarket.assets.map(a => getAssetInfo(ethToWeth(a)).address),
|
|
86
86
|
).call();
|
|
87
87
|
|
|
88
|
-
const assetsData: SparkAssetData[] = loanInfo
|
|
89
|
-
.map((market, i) =>
|
|
90
|
-
symbol
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
.
|
|
109
|
-
.
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
88
|
+
const assetsData: SparkAssetData[] = await Promise.all(loanInfo
|
|
89
|
+
.map(async (market, i) => {
|
|
90
|
+
const symbol = selectedMarket.assets[i];
|
|
91
|
+
|
|
92
|
+
const borrowCapInWei = new Dec(assetAmountInWei(market.borrowCap.toString(), symbol));
|
|
93
|
+
let marketLiquidity = borrowCapInWei.lt(new Dec(market.totalSupply))
|
|
94
|
+
? assetAmountInEth(borrowCapInWei
|
|
95
|
+
.sub(market.totalBorrow.toString())
|
|
96
|
+
.toString(), symbol)
|
|
97
|
+
: assetAmountInEth(new Dec(market.totalSupply.toString())
|
|
98
|
+
.sub(market.totalBorrow.toString())
|
|
99
|
+
.toString(), symbol);
|
|
100
|
+
|
|
101
|
+
if (new Dec(marketLiquidity).lt(0)) {
|
|
102
|
+
marketLiquidity = '0';
|
|
103
|
+
}
|
|
104
|
+
return ({
|
|
105
|
+
symbol: selectedMarket.assets[i],
|
|
106
|
+
isIsolated: new Dec(market.debtCeilingForIsolationMode).gt(0),
|
|
107
|
+
debtCeilingForIsolationMode: new Dec(market.debtCeilingForIsolationMode).div(100).toString(),
|
|
108
|
+
isSiloed: market.isSiloedForBorrowing,
|
|
109
|
+
eModeCategory: +market.emodeCategory,
|
|
110
|
+
isolationModeTotalDebt: new Dec(market.isolationModeTotalDebt).div(100).toString(),
|
|
111
|
+
assetId: Number(market.assetId),
|
|
112
|
+
underlyingTokenAddress: market.underlyingTokenAddress,
|
|
113
|
+
supplyRate: new Dec(market.supplyRate.toString()).div(1e25).toString(),
|
|
114
|
+
borrowRate: new Dec(market.borrowRateVariable.toString()).div(1e25).toString(),
|
|
115
|
+
borrowRateStable: new Dec(market.borrowRateStable.toString()).div(1e25).toString(),
|
|
116
|
+
collateralFactor: new Dec(market.collateralFactor.toString()).div(10000).toString(),
|
|
117
|
+
liquidationRatio: new Dec(market.liquidationRatio.toString()).div(10000).toString(),
|
|
118
|
+
marketLiquidity,
|
|
119
|
+
utilization: new Dec(market.totalBorrow.toString()).times(100).div(new Dec(market.totalSupply.toString())).toString(),
|
|
120
|
+
usageAsCollateralEnabled: market.usageAsCollateralEnabled,
|
|
121
|
+
supplyCap: market.supplyCap,
|
|
122
|
+
borrowCap: market.borrowCap,
|
|
123
|
+
totalSupply: assetAmountInEth(market.totalSupply.toString(), selectedMarket.assets[i]),
|
|
124
|
+
isInactive: !market.isActive,
|
|
125
|
+
isFrozen: market.isFrozen,
|
|
126
|
+
isPaused: market.isPaused,
|
|
127
|
+
canBeBorrowed: market.isActive && !market.isPaused && !market.isFrozen && market.borrowingEnabled,
|
|
128
|
+
canBeSupplied: market.isActive && !market.isPaused && !market.isFrozen,
|
|
129
|
+
canBeWithdrawn: market.isActive && !market.isPaused,
|
|
130
|
+
canBePayBacked: market.isActive && !market.isPaused,
|
|
131
|
+
disabledStableBorrowing: !market.stableBorrowRateEnabled,
|
|
132
|
+
totalBorrow: assetAmountInEth(market.totalBorrow.toString(), selectedMarket.assets[i]),
|
|
133
|
+
totalBorrowVar: assetAmountInEth(market.totalBorrowVar.toString(), selectedMarket.assets[i]),
|
|
134
|
+
price: new Dec(market.price.toString()).div(1e8).toString(), // is actually price in USD
|
|
135
|
+
isolationModeBorrowingEnabled: market.isolationModeBorrowingEnabled,
|
|
136
|
+
isFlashLoanEnabled: market.isFlashLoanEnabled,
|
|
137
|
+
aTokenAddress: market.aTokenAddress,
|
|
138
|
+
eModeCategoryData: {
|
|
139
|
+
label: market.label,
|
|
140
|
+
liquidationBonus: new Dec(market.liquidationBonus).div(10000).toString(),
|
|
141
|
+
liquidationRatio: new Dec(market.liquidationThreshold).div(10000).toString(),
|
|
142
|
+
collateralFactor: new Dec(market.ltv).div(10000).toString(),
|
|
143
|
+
priceSource: market.priceSource,
|
|
144
|
+
},
|
|
145
|
+
});
|
|
135
146
|
}));
|
|
136
147
|
|
|
137
148
|
await Promise.all(assetsData.map(async (market) => {
|
package/yarn-error.log
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
Arguments:
|
|
2
|
-
/Users/stefan/.nvm/versions/node/v14.19.0/bin/node /usr/local/Cellar/yarn/1.22.19/libexec/bin/yarn.js
|
|
3
|
-
|
|
4
|
-
PATH:
|
|
5
|
-
/Users/stefan/.nvm/versions/node/v14.19.0/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware Fusion.app/Contents/Public:/usr/local/go/bin:/Users/stefan/WebstormProjects/defisaver-positions-sdk/node_modules/.bin:/usr/local/go
|
|
6
|
-
|
|
7
|
-
Yarn version:
|
|
8
|
-
1.22.19
|
|
9
|
-
|
|
10
|
-
Node version:
|
|
11
|
-
14.19.0
|
|
12
|
-
|
|
13
|
-
Platform:
|
|
14
|
-
darwin x64
|
|
15
|
-
|
|
16
|
-
Trace:
|
|
17
|
-
Error: incorrect data check
|
|
18
|
-
at Zlib.zlibOnError [as onerror] (zlib.js:187:17)
|
|
19
|
-
|
|
20
|
-
npm manifest:
|
|
21
|
-
{
|
|
22
|
-
"name": "defisaver-positions-sdk",
|
|
23
|
-
"version": "0.0.1",
|
|
24
|
-
"description": "",
|
|
25
|
-
"main": "./cjs/index.js",
|
|
26
|
-
"module": "./esm/src/index.js",
|
|
27
|
-
"types": "./esm/src/index.d.ts",
|
|
28
|
-
"scripts": {
|
|
29
|
-
"build:esm": "rm -rf esm && tsc -p tsconfig.json",
|
|
30
|
-
"build:cjs": "rm -rf cjs && tsc -p tsconfig.cjs.json",
|
|
31
|
-
"build": "npm run build:cjs && npm run build:esm",
|
|
32
|
-
"dev": "tsc -p tsconfig.cjs.json --watch",
|
|
33
|
-
"lint": "eslint src/ --fix",
|
|
34
|
-
"generate-contracts": "node scripts/generateContracts.js",
|
|
35
|
-
"test": "mocha tests/*",
|
|
36
|
-
"build-test": "npm run build && mocha tests/*"
|
|
37
|
-
},
|
|
38
|
-
"keywords": [],
|
|
39
|
-
"author": "",
|
|
40
|
-
"license": "ISC",
|
|
41
|
-
"dependencies": {
|
|
42
|
-
"@defisaver/tokens": "^1.4.56",
|
|
43
|
-
"decimal.js": "^10.4.3"
|
|
44
|
-
},
|
|
45
|
-
"devDependencies": {
|
|
46
|
-
"@defisaver/eslint-config": "^1.0.1",
|
|
47
|
-
"chai": "^4.3.8",
|
|
48
|
-
"dotenv": "^16.3.1",
|
|
49
|
-
"eslint": "^8.49.0",
|
|
50
|
-
"mocha": "^10.2.0",
|
|
51
|
-
"typechain": "^8.3.1",
|
|
52
|
-
"typechain-target-web3-v1-3mihai3": "^6.0.2",
|
|
53
|
-
"typescript": "^5.2.2"
|
|
54
|
-
},
|
|
55
|
-
"peerDependencies": {
|
|
56
|
-
"web3": "^1.10.2"
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
yarn manifest:
|
|
61
|
-
No manifest
|
|
62
|
-
|
|
63
|
-
Lockfile:
|
|
64
|
-
No lockfile
|