@defisaver/positions-sdk 2.1.43-aave-v4-dev-2 → 2.1.43-aave-v4-dev-4
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/aaveV4/index.js +9 -5
- package/cjs/config/contracts.d.ts +209 -1
- package/cjs/config/contracts.js +2 -2
- package/cjs/contracts.d.ts +5221 -366
- package/cjs/helpers/aaveV4Helpers/index.js +8 -5
- package/cjs/markets/aaveV4/index.d.ts +2 -1
- package/cjs/markets/aaveV4/index.js +3 -1
- package/cjs/types/aaveV4.d.ts +3 -0
- package/esm/aaveV4/index.js +9 -5
- package/esm/config/contracts.d.ts +209 -1
- package/esm/config/contracts.js +2 -2
- package/esm/contracts.d.ts +5221 -366
- package/esm/helpers/aaveV4Helpers/index.js +8 -5
- package/esm/markets/aaveV4/index.d.ts +2 -1
- package/esm/markets/aaveV4/index.js +1 -0
- package/esm/types/aaveV4.d.ts +3 -0
- package/package.json +2 -2
- package/src/aaveV4/index.ts +9 -6
- package/src/config/contracts.ts +2 -2
- package/src/helpers/aaveV4Helpers/index.ts +7 -5
- package/src/markets/aaveV4/index.ts +3 -1
- package/src/types/aaveV4.ts +3 -0
package/cjs/aaveV4/index.js
CHANGED
|
@@ -36,7 +36,7 @@ const fetchHubData = (viewContract, hubAddress) => __awaiter(void 0, void 0, voi
|
|
|
36
36
|
}, {}),
|
|
37
37
|
};
|
|
38
38
|
});
|
|
39
|
-
const formatReserveAsset = (reserveAsset, hubAsset, oracleDecimals, network) => __awaiter(void 0, void 0, void 0, function* () {
|
|
39
|
+
const formatReserveAsset = (reserveAsset, hubAsset, reserveId, oracleDecimals, network) => __awaiter(void 0, void 0, void 0, function* () {
|
|
40
40
|
const assetInfo = (0, tokens_1.getAssetInfoByAddress)(reserveAsset.underlying, network);
|
|
41
41
|
const symbol = (0, utils_1.wethToEth)(assetInfo.symbol);
|
|
42
42
|
const isStakingAsset = staking_1.STAKING_ASSETS.includes(symbol);
|
|
@@ -65,6 +65,7 @@ const formatReserveAsset = (reserveAsset, hubAsset, oracleDecimals, network) =>
|
|
|
65
65
|
underlying: reserveAsset.underlying,
|
|
66
66
|
hub: reserveAsset.hub,
|
|
67
67
|
assetId: reserveAsset.assetId,
|
|
68
|
+
reserveId,
|
|
68
69
|
paused: reserveAsset.paused,
|
|
69
70
|
frozen: reserveAsset.frozen,
|
|
70
71
|
borrowable: reserveAsset.borrowable,
|
|
@@ -96,10 +97,10 @@ function _getAaveV4SpokeData(provider_1, network_1, market_1) {
|
|
|
96
97
|
hubsData[hubAddress] = yield fetchHubData(viewContract, hubAddress);
|
|
97
98
|
})),
|
|
98
99
|
]);
|
|
99
|
-
const reserveAssetsArray = yield Promise.all(spokeData[1].map((reserveAssetOnChain) => __awaiter(this, void 0, void 0, function* () { return formatReserveAsset(reserveAssetOnChain, hubsData[reserveAssetOnChain.hub].assets[reserveAssetOnChain.assetId], +spokeData[0].oracleDecimals.toString(), network); })));
|
|
100
|
+
const reserveAssetsArray = yield Promise.all(spokeData[1].map((reserveAssetOnChain, index) => __awaiter(this, void 0, void 0, function* () { return formatReserveAsset(reserveAssetOnChain, hubsData[reserveAssetOnChain.hub].assets[reserveAssetOnChain.assetId], index, +spokeData[0].oracleDecimals.toString(), network); })));
|
|
100
101
|
return {
|
|
101
102
|
assetsData: reserveAssetsArray.reduce((acc, reserveAsset) => {
|
|
102
|
-
acc[reserveAsset.symbol] = reserveAsset;
|
|
103
|
+
acc[`${reserveAsset.symbol}-${reserveAsset.reserveId}`] = reserveAsset;
|
|
103
104
|
return acc;
|
|
104
105
|
}, {}),
|
|
105
106
|
oracle: spokeData[0].oracle,
|
|
@@ -119,14 +120,17 @@ function _getAaveV4AccountData(provider_1, network_1, spokeData_1, address_1) {
|
|
|
119
120
|
const loanData = yield viewContract.read.getLoanData([spokeData.address, address]);
|
|
120
121
|
const healthFactor = new decimal_js_1.default(loanData.healthFactor).div(1e18).toString();
|
|
121
122
|
const usedAssets = loanData.reserves.reduce((acc, usedReserveAsset) => {
|
|
122
|
-
const
|
|
123
|
+
const identifier = `${(0, utils_1.wethToEth)((0, tokens_1.getAssetInfoByAddress)(usedReserveAsset.underlying, network).symbol)}-${+usedReserveAsset.reserveId.toString()}`;
|
|
124
|
+
const reserveData = spokeData.assetsData[identifier];
|
|
123
125
|
const price = reserveData.price;
|
|
124
126
|
const supplied = (0, tokens_1.assetAmountInEth)(usedReserveAsset.supplied.toString(), reserveData.symbol);
|
|
125
127
|
const drawn = (0, tokens_1.assetAmountInEth)(usedReserveAsset.drawn.toString(), reserveData.symbol);
|
|
126
128
|
const premium = (0, tokens_1.assetAmountInEth)(usedReserveAsset.premium.toString(), reserveData.symbol);
|
|
127
129
|
const borrowed = (0, tokens_1.assetAmountInEth)(usedReserveAsset.totalDebt.toString(), reserveData.symbol);
|
|
128
|
-
acc[
|
|
130
|
+
acc[identifier] = {
|
|
129
131
|
symbol: reserveData.symbol,
|
|
132
|
+
assetId: reserveData.assetId,
|
|
133
|
+
reserveId: +usedReserveAsset.reserveId.toString(),
|
|
130
134
|
supplied,
|
|
131
135
|
suppliedUsd: new decimal_js_1.default(supplied).mul(price).toString(),
|
|
132
136
|
drawn,
|
|
@@ -85763,6 +85763,10 @@ export declare const AaveV4View: {
|
|
|
85763
85763
|
readonly internalType: "uint256";
|
|
85764
85764
|
readonly name: "reserveId";
|
|
85765
85765
|
readonly type: "uint256";
|
|
85766
|
+
}, {
|
|
85767
|
+
readonly internalType: "uint16";
|
|
85768
|
+
readonly name: "assetId";
|
|
85769
|
+
readonly type: "uint16";
|
|
85766
85770
|
}, {
|
|
85767
85771
|
readonly internalType: "address";
|
|
85768
85772
|
readonly name: "underlying";
|
|
@@ -85863,6 +85867,10 @@ export declare const AaveV4View: {
|
|
|
85863
85867
|
readonly internalType: "uint256";
|
|
85864
85868
|
readonly name: "reserveId";
|
|
85865
85869
|
readonly type: "uint256";
|
|
85870
|
+
}, {
|
|
85871
|
+
readonly internalType: "uint16";
|
|
85872
|
+
readonly name: "assetId";
|
|
85873
|
+
readonly type: "uint16";
|
|
85866
85874
|
}, {
|
|
85867
85875
|
readonly internalType: "address";
|
|
85868
85876
|
readonly name: "underlying";
|
|
@@ -85963,6 +85971,10 @@ export declare const AaveV4View: {
|
|
|
85963
85971
|
readonly internalType: "uint256";
|
|
85964
85972
|
readonly name: "reserveId";
|
|
85965
85973
|
readonly type: "uint256";
|
|
85974
|
+
}, {
|
|
85975
|
+
readonly internalType: "uint16";
|
|
85976
|
+
readonly name: "assetId";
|
|
85977
|
+
readonly type: "uint16";
|
|
85966
85978
|
}, {
|
|
85967
85979
|
readonly internalType: "address";
|
|
85968
85980
|
readonly name: "underlying";
|
|
@@ -86014,6 +86026,198 @@ export declare const AaveV4View: {
|
|
|
86014
86026
|
}];
|
|
86015
86027
|
readonly stateMutability: "view";
|
|
86016
86028
|
readonly type: "function";
|
|
86029
|
+
}, {
|
|
86030
|
+
readonly inputs: readonly [{
|
|
86031
|
+
readonly internalType: "address";
|
|
86032
|
+
readonly name: "_spoke";
|
|
86033
|
+
readonly type: "address";
|
|
86034
|
+
}, {
|
|
86035
|
+
readonly internalType: "address";
|
|
86036
|
+
readonly name: "_user";
|
|
86037
|
+
readonly type: "address";
|
|
86038
|
+
}];
|
|
86039
|
+
readonly name: "getLoanDataFull";
|
|
86040
|
+
readonly outputs: readonly [{
|
|
86041
|
+
readonly components: readonly [{
|
|
86042
|
+
readonly internalType: "address";
|
|
86043
|
+
readonly name: "user";
|
|
86044
|
+
readonly type: "address";
|
|
86045
|
+
}, {
|
|
86046
|
+
readonly internalType: "uint256";
|
|
86047
|
+
readonly name: "riskPremium";
|
|
86048
|
+
readonly type: "uint256";
|
|
86049
|
+
}, {
|
|
86050
|
+
readonly internalType: "uint256";
|
|
86051
|
+
readonly name: "avgCollateralFactor";
|
|
86052
|
+
readonly type: "uint256";
|
|
86053
|
+
}, {
|
|
86054
|
+
readonly internalType: "uint256";
|
|
86055
|
+
readonly name: "healthFactor";
|
|
86056
|
+
readonly type: "uint256";
|
|
86057
|
+
}, {
|
|
86058
|
+
readonly internalType: "uint256";
|
|
86059
|
+
readonly name: "totalCollateralInUsd";
|
|
86060
|
+
readonly type: "uint256";
|
|
86061
|
+
}, {
|
|
86062
|
+
readonly internalType: "uint256";
|
|
86063
|
+
readonly name: "totalDebtInUsd";
|
|
86064
|
+
readonly type: "uint256";
|
|
86065
|
+
}, {
|
|
86066
|
+
readonly internalType: "uint256";
|
|
86067
|
+
readonly name: "activeCollateralCount";
|
|
86068
|
+
readonly type: "uint256";
|
|
86069
|
+
}, {
|
|
86070
|
+
readonly internalType: "uint256";
|
|
86071
|
+
readonly name: "borrowedCount";
|
|
86072
|
+
readonly type: "uint256";
|
|
86073
|
+
}, {
|
|
86074
|
+
readonly components: readonly [{
|
|
86075
|
+
readonly internalType: "uint256";
|
|
86076
|
+
readonly name: "reserveId";
|
|
86077
|
+
readonly type: "uint256";
|
|
86078
|
+
}, {
|
|
86079
|
+
readonly internalType: "address";
|
|
86080
|
+
readonly name: "underlying";
|
|
86081
|
+
readonly type: "address";
|
|
86082
|
+
}, {
|
|
86083
|
+
readonly internalType: "uint256";
|
|
86084
|
+
readonly name: "price";
|
|
86085
|
+
readonly type: "uint256";
|
|
86086
|
+
}, {
|
|
86087
|
+
readonly internalType: "uint8";
|
|
86088
|
+
readonly name: "decimals";
|
|
86089
|
+
readonly type: "uint8";
|
|
86090
|
+
}, {
|
|
86091
|
+
readonly internalType: "bool";
|
|
86092
|
+
readonly name: "isUsingAsCollateral";
|
|
86093
|
+
readonly type: "bool";
|
|
86094
|
+
}, {
|
|
86095
|
+
readonly internalType: "bool";
|
|
86096
|
+
readonly name: "isBorrowing";
|
|
86097
|
+
readonly type: "bool";
|
|
86098
|
+
}, {
|
|
86099
|
+
readonly internalType: "bool";
|
|
86100
|
+
readonly name: "reservePaused";
|
|
86101
|
+
readonly type: "bool";
|
|
86102
|
+
}, {
|
|
86103
|
+
readonly internalType: "bool";
|
|
86104
|
+
readonly name: "reserveFrozen";
|
|
86105
|
+
readonly type: "bool";
|
|
86106
|
+
}, {
|
|
86107
|
+
readonly internalType: "bool";
|
|
86108
|
+
readonly name: "borrowable";
|
|
86109
|
+
readonly type: "bool";
|
|
86110
|
+
}, {
|
|
86111
|
+
readonly internalType: "bool";
|
|
86112
|
+
readonly name: "spokeActive";
|
|
86113
|
+
readonly type: "bool";
|
|
86114
|
+
}, {
|
|
86115
|
+
readonly internalType: "bool";
|
|
86116
|
+
readonly name: "spokePaused";
|
|
86117
|
+
readonly type: "bool";
|
|
86118
|
+
}, {
|
|
86119
|
+
readonly internalType: "uint256";
|
|
86120
|
+
readonly name: "userSupplied";
|
|
86121
|
+
readonly type: "uint256";
|
|
86122
|
+
}, {
|
|
86123
|
+
readonly internalType: "uint256";
|
|
86124
|
+
readonly name: "userDrawn";
|
|
86125
|
+
readonly type: "uint256";
|
|
86126
|
+
}, {
|
|
86127
|
+
readonly internalType: "uint256";
|
|
86128
|
+
readonly name: "userPremium";
|
|
86129
|
+
readonly type: "uint256";
|
|
86130
|
+
}, {
|
|
86131
|
+
readonly internalType: "uint256";
|
|
86132
|
+
readonly name: "userTotalDebt";
|
|
86133
|
+
readonly type: "uint256";
|
|
86134
|
+
}, {
|
|
86135
|
+
readonly internalType: "uint24";
|
|
86136
|
+
readonly name: "collateralRisk";
|
|
86137
|
+
readonly type: "uint24";
|
|
86138
|
+
}, {
|
|
86139
|
+
readonly internalType: "uint16";
|
|
86140
|
+
readonly name: "userCollateralFactor";
|
|
86141
|
+
readonly type: "uint16";
|
|
86142
|
+
}, {
|
|
86143
|
+
readonly internalType: "uint32";
|
|
86144
|
+
readonly name: "userMaxLiquidationBonus";
|
|
86145
|
+
readonly type: "uint32";
|
|
86146
|
+
}, {
|
|
86147
|
+
readonly internalType: "uint16";
|
|
86148
|
+
readonly name: "userLiquidationFee";
|
|
86149
|
+
readonly type: "uint16";
|
|
86150
|
+
}, {
|
|
86151
|
+
readonly internalType: "uint16";
|
|
86152
|
+
readonly name: "latestCollateralFactor";
|
|
86153
|
+
readonly type: "uint16";
|
|
86154
|
+
}, {
|
|
86155
|
+
readonly internalType: "uint32";
|
|
86156
|
+
readonly name: "latestMaxLiquidationBonus";
|
|
86157
|
+
readonly type: "uint32";
|
|
86158
|
+
}, {
|
|
86159
|
+
readonly internalType: "uint16";
|
|
86160
|
+
readonly name: "latestLiquidationFee";
|
|
86161
|
+
readonly type: "uint16";
|
|
86162
|
+
}, {
|
|
86163
|
+
readonly internalType: "address";
|
|
86164
|
+
readonly name: "hub";
|
|
86165
|
+
readonly type: "address";
|
|
86166
|
+
}, {
|
|
86167
|
+
readonly internalType: "uint16";
|
|
86168
|
+
readonly name: "hubAssetId";
|
|
86169
|
+
readonly type: "uint16";
|
|
86170
|
+
}, {
|
|
86171
|
+
readonly internalType: "uint256";
|
|
86172
|
+
readonly name: "hubLiquidity";
|
|
86173
|
+
readonly type: "uint256";
|
|
86174
|
+
}, {
|
|
86175
|
+
readonly internalType: "uint96";
|
|
86176
|
+
readonly name: "drawnRate";
|
|
86177
|
+
readonly type: "uint96";
|
|
86178
|
+
}, {
|
|
86179
|
+
readonly internalType: "uint120";
|
|
86180
|
+
readonly name: "drawnIndex";
|
|
86181
|
+
readonly type: "uint120";
|
|
86182
|
+
}, {
|
|
86183
|
+
readonly internalType: "uint256";
|
|
86184
|
+
readonly name: "spokeTotalSupplied";
|
|
86185
|
+
readonly type: "uint256";
|
|
86186
|
+
}, {
|
|
86187
|
+
readonly internalType: "uint256";
|
|
86188
|
+
readonly name: "spokeTotalDrawn";
|
|
86189
|
+
readonly type: "uint256";
|
|
86190
|
+
}, {
|
|
86191
|
+
readonly internalType: "uint256";
|
|
86192
|
+
readonly name: "spokeTotalPremium";
|
|
86193
|
+
readonly type: "uint256";
|
|
86194
|
+
}, {
|
|
86195
|
+
readonly internalType: "uint256";
|
|
86196
|
+
readonly name: "spokeTotalDebt";
|
|
86197
|
+
readonly type: "uint256";
|
|
86198
|
+
}, {
|
|
86199
|
+
readonly internalType: "uint256";
|
|
86200
|
+
readonly name: "spokeSupplyCap";
|
|
86201
|
+
readonly type: "uint256";
|
|
86202
|
+
}, {
|
|
86203
|
+
readonly internalType: "uint256";
|
|
86204
|
+
readonly name: "spokeBorrowCap";
|
|
86205
|
+
readonly type: "uint256";
|
|
86206
|
+
}, {
|
|
86207
|
+
readonly internalType: "uint256";
|
|
86208
|
+
readonly name: "spokeDeficitRay";
|
|
86209
|
+
readonly type: "uint256";
|
|
86210
|
+
}];
|
|
86211
|
+
readonly internalType: "structAaveV4View.UserReserveDataFull[]";
|
|
86212
|
+
readonly name: "reserves";
|
|
86213
|
+
readonly type: "tuple[]";
|
|
86214
|
+
}];
|
|
86215
|
+
readonly internalType: "structAaveV4View.LoanDataWithFullReserves";
|
|
86216
|
+
readonly name: "loanData";
|
|
86217
|
+
readonly type: "tuple";
|
|
86218
|
+
}];
|
|
86219
|
+
readonly stateMutability: "view";
|
|
86220
|
+
readonly type: "function";
|
|
86017
86221
|
}, {
|
|
86018
86222
|
readonly inputs: readonly [{
|
|
86019
86223
|
readonly internalType: "address";
|
|
@@ -86540,6 +86744,10 @@ export declare const AaveV4View: {
|
|
|
86540
86744
|
readonly internalType: "uint256";
|
|
86541
86745
|
readonly name: "reserveId";
|
|
86542
86746
|
readonly type: "uint256";
|
|
86747
|
+
}, {
|
|
86748
|
+
readonly internalType: "uint16";
|
|
86749
|
+
readonly name: "assetId";
|
|
86750
|
+
readonly type: "uint16";
|
|
86543
86751
|
}, {
|
|
86544
86752
|
readonly internalType: "address";
|
|
86545
86753
|
readonly name: "underlying";
|
|
@@ -86590,7 +86798,7 @@ export declare const AaveV4View: {
|
|
|
86590
86798
|
}];
|
|
86591
86799
|
readonly networks: {
|
|
86592
86800
|
readonly "1": {
|
|
86593
|
-
readonly address: "
|
|
86801
|
+
readonly address: "0xF0D440dE7f82A1e598992A648E5Bfa5d69b8E3a9";
|
|
86594
86802
|
};
|
|
86595
86803
|
};
|
|
86596
86804
|
};
|
package/cjs/config/contracts.js
CHANGED
|
@@ -1298,10 +1298,10 @@ exports.YearnV3Vault = {
|
|
|
1298
1298
|
"abi": [{ "stateMutability": "view", "type": "function", "name": "balanceOf", "inputs": [{ "name": "addr", "type": "address" }], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "totalAssets", "inputs": [], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "totalDebt", "inputs": [], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "totalSupply", "inputs": [], "outputs": [{ "name": "", "type": "uint256" }] }]
|
|
1299
1299
|
};
|
|
1300
1300
|
exports.AaveV4View = {
|
|
1301
|
-
"abi": [{ "inputs": [{ "internalType": "address", "name": "_spoke", "type": "address" }, { "internalType": "address", "name": "_user", "type": "address" }], "name": "getHealthFactor", "outputs": [{ "internalType": "uint256", "name": "healthFactor", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_hub", "type": "address" }], "name": "getHubAllAssetsData", "outputs": [{ "components": [{ "internalType": "uint16", "name": "assetId", "type": "uint16" }, { "internalType": "uint8", "name": "decimals", "type": "uint8" }, { "internalType": "address", "name": "underlying", "type": "address" }, { "internalType": "uint256", "name": "liquidity", "type": "uint256" }, { "internalType": "uint256", "name": "totalSupplied", "type": "uint256" }, { "internalType": "uint256", "name": "totalDrawn", "type": "uint256" }, { "internalType": "uint256", "name": "totalPremium", "type": "uint256" }, { "internalType": "uint256", "name": "totalDebt", "type": "uint256" }, { "internalType": "uint256", "name": "swept", "type": "uint256" }, { "internalType": "uint16", "name": "liquidityFee", "type": "uint16" }, { "internalType": "uint120", "name": "drawnIndex", "type": "uint120" }, { "internalType": "uint96", "name": "drawnRate", "type": "uint96" }, { "internalType": "uint40", "name": "lastUpdateTimestamp", "type": "uint40" }, { "internalType": "address", "name": "irStrategy", "type": "address" }, { "internalType": "address", "name": "reinvestmentController", "type": "address" }, { "internalType": "address", "name": "feeReceiver", "type": "address" }, { "internalType": "uint256", "name": "deficitRay", "type": "uint256" }], "internalType": "structAaveV4View.HubAssetData[]", "name": "hubAssetData", "type": "tuple[]" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_hub", "type": "address" }, { "internalType": "uint256", "name": "_assetId", "type": "uint256" }], "name": "getHubAssetData", "outputs": [{ "components": [{ "internalType": "uint16", "name": "assetId", "type": "uint16" }, { "internalType": "uint8", "name": "decimals", "type": "uint8" }, { "internalType": "address", "name": "underlying", "type": "address" }, { "internalType": "uint256", "name": "liquidity", "type": "uint256" }, { "internalType": "uint256", "name": "totalSupplied", "type": "uint256" }, { "internalType": "uint256", "name": "totalDrawn", "type": "uint256" }, { "internalType": "uint256", "name": "totalPremium", "type": "uint256" }, { "internalType": "uint256", "name": "totalDebt", "type": "uint256" }, { "internalType": "uint256", "name": "swept", "type": "uint256" }, { "internalType": "uint16", "name": "liquidityFee", "type": "uint16" }, { "internalType": "uint120", "name": "drawnIndex", "type": "uint120" }, { "internalType": "uint96", "name": "drawnRate", "type": "uint96" }, { "internalType": "uint40", "name": "lastUpdateTimestamp", "type": "uint40" }, { "internalType": "address", "name": "irStrategy", "type": "address" }, { "internalType": "address", "name": "reinvestmentController", "type": "address" }, { "internalType": "address", "name": "feeReceiver", "type": "address" }, { "internalType": "uint256", "name": "deficitRay", "type": "uint256" }], "internalType": "structAaveV4View.HubAssetData", "name": "hubAssetData", "type": "tuple" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_spoke", "type": "address" }, { "internalType": "address", "name": "_user", "type": "address" }], "name": "getLoanData", "outputs": [{ "components": [{ "internalType": "address", "name": "user", "type": "address" }, { "internalType": "uint256", "name": "riskPremium", "type": "uint256" }, { "internalType": "uint256", "name": "avgCollateralFactor", "type": "uint256" }, { "internalType": "uint256", "name": "healthFactor", "type": "uint256" }, { "internalType": "uint256", "name": "totalCollateralInUsd", "type": "uint256" }, { "internalType": "uint256", "name": "totalDebtInUsd", "type": "uint256" }, { "internalType": "uint256", "name": "activeCollateralCount", "type": "uint256" }, { "internalType": "uint256", "name": "borrowedCount", "type": "uint256" }, { "components": [{ "internalType": "uint256", "name": "reserveId", "type": "uint256" }, { "internalType": "address", "name": "underlying", "type": "address" }, { "internalType": "uint256", "name": "supplied", "type": "uint256" }, { "internalType": "uint256", "name": "drawn", "type": "uint256" }, { "internalType": "uint256", "name": "premium", "type": "uint256" }, { "internalType": "uint256", "name": "totalDebt", "type": "uint256" }, { "internalType": "uint16", "name": "collateralFactor", "type": "uint16" }, { "internalType": "uint32", "name": "maxLiquidationBonus", "type": "uint32" }, { "internalType": "uint16", "name": "liquidationFee", "type": "uint16" }, { "internalType": "bool", "name": "isUsingAsCollateral", "type": "bool" }, { "internalType": "bool", "name": "isBorrowing", "type": "bool" }], "internalType": "structAaveV4View.UserReserveData[]", "name": "reserves", "type": "tuple[]" }], "internalType": "structAaveV4View.LoanData", "name": "loanData", "type": "tuple" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_user", "type": "address" }, { "internalType": "address[]", "name": "_spokes", "type": "address[]" }], "name": "getLoanDataForMultipleSpokes", "outputs": [{ "components": [{ "internalType": "address", "name": "user", "type": "address" }, { "internalType": "uint256", "name": "riskPremium", "type": "uint256" }, { "internalType": "uint256", "name": "avgCollateralFactor", "type": "uint256" }, { "internalType": "uint256", "name": "healthFactor", "type": "uint256" }, { "internalType": "uint256", "name": "totalCollateralInUsd", "type": "uint256" }, { "internalType": "uint256", "name": "totalDebtInUsd", "type": "uint256" }, { "internalType": "uint256", "name": "activeCollateralCount", "type": "uint256" }, { "internalType": "uint256", "name": "borrowedCount", "type": "uint256" }, { "components": [{ "internalType": "uint256", "name": "reserveId", "type": "uint256" }, { "internalType": "address", "name": "underlying", "type": "address" }, { "internalType": "uint256", "name": "supplied", "type": "uint256" }, { "internalType": "uint256", "name": "drawn", "type": "uint256" }, { "internalType": "uint256", "name": "premium", "type": "uint256" }, { "internalType": "uint256", "name": "totalDebt", "type": "uint256" }, { "internalType": "uint16", "name": "collateralFactor", "type": "uint16" }, { "internalType": "uint32", "name": "maxLiquidationBonus", "type": "uint32" }, { "internalType": "uint16", "name": "liquidationFee", "type": "uint16" }, { "internalType": "bool", "name": "isUsingAsCollateral", "type": "bool" }, { "internalType": "bool", "name": "isBorrowing", "type": "bool" }], "internalType": "structAaveV4View.UserReserveData[]", "name": "reserves", "type": "tuple[]" }], "internalType": "structAaveV4View.LoanData[]", "name": "loans", "type": "tuple[]" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_spoke", "type": "address" }, { "internalType": "address[]", "name": "_users", "type": "address[]" }], "name": "getLoanDataForMultipleUsers", "outputs": [{ "components": [{ "internalType": "address", "name": "user", "type": "address" }, { "internalType": "uint256", "name": "riskPremium", "type": "uint256" }, { "internalType": "uint256", "name": "avgCollateralFactor", "type": "uint256" }, { "internalType": "uint256", "name": "healthFactor", "type": "uint256" }, { "internalType": "uint256", "name": "totalCollateralInUsd", "type": "uint256" }, { "internalType": "uint256", "name": "totalDebtInUsd", "type": "uint256" }, { "internalType": "uint256", "name": "activeCollateralCount", "type": "uint256" }, { "internalType": "uint256", "name": "borrowedCount", "type": "uint256" }, { "components": [{ "internalType": "uint256", "name": "reserveId", "type": "uint256" }, { "internalType": "address", "name": "underlying", "type": "address" }, { "internalType": "uint256", "name": "supplied", "type": "uint256" }, { "internalType": "uint256", "name": "drawn", "type": "uint256" }, { "internalType": "uint256", "name": "premium", "type": "uint256" }, { "internalType": "uint256", "name": "totalDebt", "type": "uint256" }, { "internalType": "uint16", "name": "collateralFactor", "type": "uint16" }, { "internalType": "uint32", "name": "maxLiquidationBonus", "type": "uint32" }, { "internalType": "uint16", "name": "liquidationFee", "type": "uint16" }, { "internalType": "bool", "name": "isUsingAsCollateral", "type": "bool" }, { "internalType": "bool", "name": "isBorrowing", "type": "bool" }], "internalType": "structAaveV4View.UserReserveData[]", "name": "reserves", "type": "tuple[]" }], "internalType": "structAaveV4View.LoanData[]", "name": "loans", "type": "tuple[]" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_spoke", "type": "address" }, { "internalType": "uint256", "name": "_reserveId", "type": "uint256" }], "name": "getReserveData", "outputs": [{ "components": [{ "internalType": "address", "name": "underlying", "type": "address" }, { "internalType": "uint16", "name": "collateralFactor", "type": "uint16" }, { "internalType": "uint256", "name": "price", "type": "uint256" }], "internalType": "structAaveV4View.ReserveData", "name": "reserveData", "type": "tuple" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_spoke", "type": "address" }, { "internalType": "uint256", "name": "_reserveId", "type": "uint256" }], "name": "getReserveDataFull", "outputs": [{ "components": [{ "internalType": "address", "name": "underlying", "type": "address" }, { "internalType": "address", "name": "hub", "type": "address" }, { "internalType": "uint16", "name": "assetId", "type": "uint16" }, { "internalType": "uint8", "name": "decimals", "type": "uint8" }, { "internalType": "bool", "name": "paused", "type": "bool" }, { "internalType": "bool", "name": "frozen", "type": "bool" }, { "internalType": "bool", "name": "borrowable", "type": "bool" }, { "internalType": "uint24", "name": "collateralRisk", "type": "uint24" }, { "internalType": "uint16", "name": "collateralFactor", "type": "uint16" }, { "internalType": "uint32", "name": "maxLiquidationBonus", "type": "uint32" }, { "internalType": "uint16", "name": "liquidationFee", "type": "uint16" }, { "internalType": "uint256", "name": "price", "type": "uint256" }, { "internalType": "uint256", "name": "totalSupplied", "type": "uint256" }, { "internalType": "uint256", "name": "totalDrawn", "type": "uint256" }, { "internalType": "uint256", "name": "totalPremium", "type": "uint256" }, { "internalType": "uint256", "name": "totalDebt", "type": "uint256" }, { "internalType": "uint256", "name": "supplyCap", "type": "uint256" }, { "internalType": "uint256", "name": "borrowCap", "type": "uint256" }, { "internalType": "uint256", "name": "deficitRay", "type": "uint256" }, { "internalType": "bool", "name": "spokeActive", "type": "bool" }, { "internalType": "bool", "name": "spokePaused", "type": "bool" }], "internalType": "structAaveV4View.ReserveDataFull", "name": "reserveData", "type": "tuple" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_spoke", "type": "address" }, { "internalType": "uint256", "name": "_reserveId", "type": "uint256" }], "name": "getReservePrice", "outputs": [{ "internalType": "uint256", "name": "price", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_spoke", "type": "address" }, { "internalType": "uint256[]", "name": "_reserveIds", "type": "uint256[]" }], "name": "getReservePrices", "outputs": [{ "internalType": "uint256[]", "name": "prices", "type": "uint256[]" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_spoke", "type": "address" }, { "internalType": "uint256[]", "name": "_reserveIds", "type": "uint256[]" }], "name": "getReservesData", "outputs": [{ "components": [{ "internalType": "address", "name": "underlying", "type": "address" }, { "internalType": "uint16", "name": "collateralFactor", "type": "uint16" }, { "internalType": "uint256", "name": "price", "type": "uint256" }], "internalType": "structAaveV4View.ReserveData[]", "name": "reserveData", "type": "tuple[]" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_spoke", "type": "address" }, { "internalType": "uint256[]", "name": "_reserveIds", "type": "uint256[]" }], "name": "getReservesDataFull", "outputs": [{ "components": [{ "internalType": "address", "name": "underlying", "type": "address" }, { "internalType": "address", "name": "hub", "type": "address" }, { "internalType": "uint16", "name": "assetId", "type": "uint16" }, { "internalType": "uint8", "name": "decimals", "type": "uint8" }, { "internalType": "bool", "name": "paused", "type": "bool" }, { "internalType": "bool", "name": "frozen", "type": "bool" }, { "internalType": "bool", "name": "borrowable", "type": "bool" }, { "internalType": "uint24", "name": "collateralRisk", "type": "uint24" }, { "internalType": "uint16", "name": "collateralFactor", "type": "uint16" }, { "internalType": "uint32", "name": "maxLiquidationBonus", "type": "uint32" }, { "internalType": "uint16", "name": "liquidationFee", "type": "uint16" }, { "internalType": "uint256", "name": "price", "type": "uint256" }, { "internalType": "uint256", "name": "totalSupplied", "type": "uint256" }, { "internalType": "uint256", "name": "totalDrawn", "type": "uint256" }, { "internalType": "uint256", "name": "totalPremium", "type": "uint256" }, { "internalType": "uint256", "name": "totalDebt", "type": "uint256" }, { "internalType": "uint256", "name": "supplyCap", "type": "uint256" }, { "internalType": "uint256", "name": "borrowCap", "type": "uint256" }, { "internalType": "uint256", "name": "deficitRay", "type": "uint256" }, { "internalType": "bool", "name": "spokeActive", "type": "bool" }, { "internalType": "bool", "name": "spokePaused", "type": "bool" }], "internalType": "structAaveV4View.ReserveDataFull[]", "name": "reserveData", "type": "tuple[]" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_spoke", "type": "address" }], "name": "getSpokeData", "outputs": [{ "components": [{ "internalType": "uint128", "name": "targetHealthFactor", "type": "uint128" }, { "internalType": "uint64", "name": "healthFactorForMaxBonus", "type": "uint64" }, { "internalType": "uint16", "name": "liquidationBonusFactor", "type": "uint16" }, { "internalType": "address", "name": "oracle", "type": "address" }, { "internalType": "uint256", "name": "oracleDecimals", "type": "uint256" }, { "internalType": "uint256", "name": "reserveCount", "type": "uint256" }], "internalType": "structAaveV4View.SpokeData", "name": "spokeData", "type": "tuple" }, { "components": [{ "internalType": "address", "name": "underlying", "type": "address" }, { "internalType": "uint16", "name": "collateralFactor", "type": "uint16" }, { "internalType": "uint256", "name": "price", "type": "uint256" }], "internalType": "structAaveV4View.ReserveData[]", "name": "reserves", "type": "tuple[]" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_spoke", "type": "address" }], "name": "getSpokeDataFull", "outputs": [{ "components": [{ "internalType": "uint128", "name": "targetHealthFactor", "type": "uint128" }, { "internalType": "uint64", "name": "healthFactorForMaxBonus", "type": "uint64" }, { "internalType": "uint16", "name": "liquidationBonusFactor", "type": "uint16" }, { "internalType": "address", "name": "oracle", "type": "address" }, { "internalType": "uint256", "name": "oracleDecimals", "type": "uint256" }, { "internalType": "uint256", "name": "reserveCount", "type": "uint256" }], "internalType": "structAaveV4View.SpokeData", "name": "spokeData", "type": "tuple" }, { "components": [{ "internalType": "address", "name": "underlying", "type": "address" }, { "internalType": "address", "name": "hub", "type": "address" }, { "internalType": "uint16", "name": "assetId", "type": "uint16" }, { "internalType": "uint8", "name": "decimals", "type": "uint8" }, { "internalType": "bool", "name": "paused", "type": "bool" }, { "internalType": "bool", "name": "frozen", "type": "bool" }, { "internalType": "bool", "name": "borrowable", "type": "bool" }, { "internalType": "uint24", "name": "collateralRisk", "type": "uint24" }, { "internalType": "uint16", "name": "collateralFactor", "type": "uint16" }, { "internalType": "uint32", "name": "maxLiquidationBonus", "type": "uint32" }, { "internalType": "uint16", "name": "liquidationFee", "type": "uint16" }, { "internalType": "uint256", "name": "price", "type": "uint256" }, { "internalType": "uint256", "name": "totalSupplied", "type": "uint256" }, { "internalType": "uint256", "name": "totalDrawn", "type": "uint256" }, { "internalType": "uint256", "name": "totalPremium", "type": "uint256" }, { "internalType": "uint256", "name": "totalDebt", "type": "uint256" }, { "internalType": "uint256", "name": "supplyCap", "type": "uint256" }, { "internalType": "uint256", "name": "borrowCap", "type": "uint256" }, { "internalType": "uint256", "name": "deficitRay", "type": "uint256" }, { "internalType": "bool", "name": "spokeActive", "type": "bool" }, { "internalType": "bool", "name": "spokePaused", "type": "bool" }], "internalType": "structAaveV4View.ReserveDataFull[]", "name": "reserves", "type": "tuple[]" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_hub", "type": "address" }, { "internalType": "uint256", "name": "_assetId", "type": "uint256" }], "name": "getSpokesForAsset", "outputs": [{ "internalType": "address[]", "name": "spokes", "type": "address[]" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_spoke", "type": "address" }, { "internalType": "address", "name": "_user", "type": "address" }, { "internalType": "uint256[]", "name": "_reserveIds", "type": "uint256[]" }], "name": "getUserReserveData", "outputs": [{ "components": [{ "internalType": "uint256", "name": "reserveId", "type": "uint256" }, { "internalType": "address", "name": "underlying", "type": "address" }, { "internalType": "uint256", "name": "supplied", "type": "uint256" }, { "internalType": "uint256", "name": "drawn", "type": "uint256" }, { "internalType": "uint256", "name": "premium", "type": "uint256" }, { "internalType": "uint256", "name": "totalDebt", "type": "uint256" }, { "internalType": "uint16", "name": "collateralFactor", "type": "uint16" }, { "internalType": "uint32", "name": "maxLiquidationBonus", "type": "uint32" }, { "internalType": "uint16", "name": "liquidationFee", "type": "uint16" }, { "internalType": "bool", "name": "isUsingAsCollateral", "type": "bool" }, { "internalType": "bool", "name": "isBorrowing", "type": "bool" }], "internalType": "structAaveV4View.UserReserveData[]", "name": "_userReserves", "type": "tuple[]" }], "stateMutability": "view", "type": "function" }],
|
|
1301
|
+
"abi": [{ "inputs": [{ "internalType": "address", "name": "_spoke", "type": "address" }, { "internalType": "address", "name": "_user", "type": "address" }], "name": "getHealthFactor", "outputs": [{ "internalType": "uint256", "name": "healthFactor", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_hub", "type": "address" }], "name": "getHubAllAssetsData", "outputs": [{ "components": [{ "internalType": "uint16", "name": "assetId", "type": "uint16" }, { "internalType": "uint8", "name": "decimals", "type": "uint8" }, { "internalType": "address", "name": "underlying", "type": "address" }, { "internalType": "uint256", "name": "liquidity", "type": "uint256" }, { "internalType": "uint256", "name": "totalSupplied", "type": "uint256" }, { "internalType": "uint256", "name": "totalDrawn", "type": "uint256" }, { "internalType": "uint256", "name": "totalPremium", "type": "uint256" }, { "internalType": "uint256", "name": "totalDebt", "type": "uint256" }, { "internalType": "uint256", "name": "swept", "type": "uint256" }, { "internalType": "uint16", "name": "liquidityFee", "type": "uint16" }, { "internalType": "uint120", "name": "drawnIndex", "type": "uint120" }, { "internalType": "uint96", "name": "drawnRate", "type": "uint96" }, { "internalType": "uint40", "name": "lastUpdateTimestamp", "type": "uint40" }, { "internalType": "address", "name": "irStrategy", "type": "address" }, { "internalType": "address", "name": "reinvestmentController", "type": "address" }, { "internalType": "address", "name": "feeReceiver", "type": "address" }, { "internalType": "uint256", "name": "deficitRay", "type": "uint256" }], "internalType": "structAaveV4View.HubAssetData[]", "name": "hubAssetData", "type": "tuple[]" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_hub", "type": "address" }, { "internalType": "uint256", "name": "_assetId", "type": "uint256" }], "name": "getHubAssetData", "outputs": [{ "components": [{ "internalType": "uint16", "name": "assetId", "type": "uint16" }, { "internalType": "uint8", "name": "decimals", "type": "uint8" }, { "internalType": "address", "name": "underlying", "type": "address" }, { "internalType": "uint256", "name": "liquidity", "type": "uint256" }, { "internalType": "uint256", "name": "totalSupplied", "type": "uint256" }, { "internalType": "uint256", "name": "totalDrawn", "type": "uint256" }, { "internalType": "uint256", "name": "totalPremium", "type": "uint256" }, { "internalType": "uint256", "name": "totalDebt", "type": "uint256" }, { "internalType": "uint256", "name": "swept", "type": "uint256" }, { "internalType": "uint16", "name": "liquidityFee", "type": "uint16" }, { "internalType": "uint120", "name": "drawnIndex", "type": "uint120" }, { "internalType": "uint96", "name": "drawnRate", "type": "uint96" }, { "internalType": "uint40", "name": "lastUpdateTimestamp", "type": "uint40" }, { "internalType": "address", "name": "irStrategy", "type": "address" }, { "internalType": "address", "name": "reinvestmentController", "type": "address" }, { "internalType": "address", "name": "feeReceiver", "type": "address" }, { "internalType": "uint256", "name": "deficitRay", "type": "uint256" }], "internalType": "structAaveV4View.HubAssetData", "name": "hubAssetData", "type": "tuple" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_spoke", "type": "address" }, { "internalType": "address", "name": "_user", "type": "address" }], "name": "getLoanData", "outputs": [{ "components": [{ "internalType": "address", "name": "user", "type": "address" }, { "internalType": "uint256", "name": "riskPremium", "type": "uint256" }, { "internalType": "uint256", "name": "avgCollateralFactor", "type": "uint256" }, { "internalType": "uint256", "name": "healthFactor", "type": "uint256" }, { "internalType": "uint256", "name": "totalCollateralInUsd", "type": "uint256" }, { "internalType": "uint256", "name": "totalDebtInUsd", "type": "uint256" }, { "internalType": "uint256", "name": "activeCollateralCount", "type": "uint256" }, { "internalType": "uint256", "name": "borrowedCount", "type": "uint256" }, { "components": [{ "internalType": "uint256", "name": "reserveId", "type": "uint256" }, { "internalType": "uint16", "name": "assetId", "type": "uint16" }, { "internalType": "address", "name": "underlying", "type": "address" }, { "internalType": "uint256", "name": "supplied", "type": "uint256" }, { "internalType": "uint256", "name": "drawn", "type": "uint256" }, { "internalType": "uint256", "name": "premium", "type": "uint256" }, { "internalType": "uint256", "name": "totalDebt", "type": "uint256" }, { "internalType": "uint16", "name": "collateralFactor", "type": "uint16" }, { "internalType": "uint32", "name": "maxLiquidationBonus", "type": "uint32" }, { "internalType": "uint16", "name": "liquidationFee", "type": "uint16" }, { "internalType": "bool", "name": "isUsingAsCollateral", "type": "bool" }, { "internalType": "bool", "name": "isBorrowing", "type": "bool" }], "internalType": "structAaveV4View.UserReserveData[]", "name": "reserves", "type": "tuple[]" }], "internalType": "structAaveV4View.LoanData", "name": "loanData", "type": "tuple" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_user", "type": "address" }, { "internalType": "address[]", "name": "_spokes", "type": "address[]" }], "name": "getLoanDataForMultipleSpokes", "outputs": [{ "components": [{ "internalType": "address", "name": "user", "type": "address" }, { "internalType": "uint256", "name": "riskPremium", "type": "uint256" }, { "internalType": "uint256", "name": "avgCollateralFactor", "type": "uint256" }, { "internalType": "uint256", "name": "healthFactor", "type": "uint256" }, { "internalType": "uint256", "name": "totalCollateralInUsd", "type": "uint256" }, { "internalType": "uint256", "name": "totalDebtInUsd", "type": "uint256" }, { "internalType": "uint256", "name": "activeCollateralCount", "type": "uint256" }, { "internalType": "uint256", "name": "borrowedCount", "type": "uint256" }, { "components": [{ "internalType": "uint256", "name": "reserveId", "type": "uint256" }, { "internalType": "uint16", "name": "assetId", "type": "uint16" }, { "internalType": "address", "name": "underlying", "type": "address" }, { "internalType": "uint256", "name": "supplied", "type": "uint256" }, { "internalType": "uint256", "name": "drawn", "type": "uint256" }, { "internalType": "uint256", "name": "premium", "type": "uint256" }, { "internalType": "uint256", "name": "totalDebt", "type": "uint256" }, { "internalType": "uint16", "name": "collateralFactor", "type": "uint16" }, { "internalType": "uint32", "name": "maxLiquidationBonus", "type": "uint32" }, { "internalType": "uint16", "name": "liquidationFee", "type": "uint16" }, { "internalType": "bool", "name": "isUsingAsCollateral", "type": "bool" }, { "internalType": "bool", "name": "isBorrowing", "type": "bool" }], "internalType": "structAaveV4View.UserReserveData[]", "name": "reserves", "type": "tuple[]" }], "internalType": "structAaveV4View.LoanData[]", "name": "loans", "type": "tuple[]" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_spoke", "type": "address" }, { "internalType": "address[]", "name": "_users", "type": "address[]" }], "name": "getLoanDataForMultipleUsers", "outputs": [{ "components": [{ "internalType": "address", "name": "user", "type": "address" }, { "internalType": "uint256", "name": "riskPremium", "type": "uint256" }, { "internalType": "uint256", "name": "avgCollateralFactor", "type": "uint256" }, { "internalType": "uint256", "name": "healthFactor", "type": "uint256" }, { "internalType": "uint256", "name": "totalCollateralInUsd", "type": "uint256" }, { "internalType": "uint256", "name": "totalDebtInUsd", "type": "uint256" }, { "internalType": "uint256", "name": "activeCollateralCount", "type": "uint256" }, { "internalType": "uint256", "name": "borrowedCount", "type": "uint256" }, { "components": [{ "internalType": "uint256", "name": "reserveId", "type": "uint256" }, { "internalType": "uint16", "name": "assetId", "type": "uint16" }, { "internalType": "address", "name": "underlying", "type": "address" }, { "internalType": "uint256", "name": "supplied", "type": "uint256" }, { "internalType": "uint256", "name": "drawn", "type": "uint256" }, { "internalType": "uint256", "name": "premium", "type": "uint256" }, { "internalType": "uint256", "name": "totalDebt", "type": "uint256" }, { "internalType": "uint16", "name": "collateralFactor", "type": "uint16" }, { "internalType": "uint32", "name": "maxLiquidationBonus", "type": "uint32" }, { "internalType": "uint16", "name": "liquidationFee", "type": "uint16" }, { "internalType": "bool", "name": "isUsingAsCollateral", "type": "bool" }, { "internalType": "bool", "name": "isBorrowing", "type": "bool" }], "internalType": "structAaveV4View.UserReserveData[]", "name": "reserves", "type": "tuple[]" }], "internalType": "structAaveV4View.LoanData[]", "name": "loans", "type": "tuple[]" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_spoke", "type": "address" }, { "internalType": "address", "name": "_user", "type": "address" }], "name": "getLoanDataFull", "outputs": [{ "components": [{ "internalType": "address", "name": "user", "type": "address" }, { "internalType": "uint256", "name": "riskPremium", "type": "uint256" }, { "internalType": "uint256", "name": "avgCollateralFactor", "type": "uint256" }, { "internalType": "uint256", "name": "healthFactor", "type": "uint256" }, { "internalType": "uint256", "name": "totalCollateralInUsd", "type": "uint256" }, { "internalType": "uint256", "name": "totalDebtInUsd", "type": "uint256" }, { "internalType": "uint256", "name": "activeCollateralCount", "type": "uint256" }, { "internalType": "uint256", "name": "borrowedCount", "type": "uint256" }, { "components": [{ "internalType": "uint256", "name": "reserveId", "type": "uint256" }, { "internalType": "address", "name": "underlying", "type": "address" }, { "internalType": "uint256", "name": "price", "type": "uint256" }, { "internalType": "uint8", "name": "decimals", "type": "uint8" }, { "internalType": "bool", "name": "isUsingAsCollateral", "type": "bool" }, { "internalType": "bool", "name": "isBorrowing", "type": "bool" }, { "internalType": "bool", "name": "reservePaused", "type": "bool" }, { "internalType": "bool", "name": "reserveFrozen", "type": "bool" }, { "internalType": "bool", "name": "borrowable", "type": "bool" }, { "internalType": "bool", "name": "spokeActive", "type": "bool" }, { "internalType": "bool", "name": "spokePaused", "type": "bool" }, { "internalType": "uint256", "name": "userSupplied", "type": "uint256" }, { "internalType": "uint256", "name": "userDrawn", "type": "uint256" }, { "internalType": "uint256", "name": "userPremium", "type": "uint256" }, { "internalType": "uint256", "name": "userTotalDebt", "type": "uint256" }, { "internalType": "uint24", "name": "collateralRisk", "type": "uint24" }, { "internalType": "uint16", "name": "userCollateralFactor", "type": "uint16" }, { "internalType": "uint32", "name": "userMaxLiquidationBonus", "type": "uint32" }, { "internalType": "uint16", "name": "userLiquidationFee", "type": "uint16" }, { "internalType": "uint16", "name": "latestCollateralFactor", "type": "uint16" }, { "internalType": "uint32", "name": "latestMaxLiquidationBonus", "type": "uint32" }, { "internalType": "uint16", "name": "latestLiquidationFee", "type": "uint16" }, { "internalType": "address", "name": "hub", "type": "address" }, { "internalType": "uint16", "name": "hubAssetId", "type": "uint16" }, { "internalType": "uint256", "name": "hubLiquidity", "type": "uint256" }, { "internalType": "uint96", "name": "drawnRate", "type": "uint96" }, { "internalType": "uint120", "name": "drawnIndex", "type": "uint120" }, { "internalType": "uint256", "name": "spokeTotalSupplied", "type": "uint256" }, { "internalType": "uint256", "name": "spokeTotalDrawn", "type": "uint256" }, { "internalType": "uint256", "name": "spokeTotalPremium", "type": "uint256" }, { "internalType": "uint256", "name": "spokeTotalDebt", "type": "uint256" }, { "internalType": "uint256", "name": "spokeSupplyCap", "type": "uint256" }, { "internalType": "uint256", "name": "spokeBorrowCap", "type": "uint256" }, { "internalType": "uint256", "name": "spokeDeficitRay", "type": "uint256" }], "internalType": "structAaveV4View.UserReserveDataFull[]", "name": "reserves", "type": "tuple[]" }], "internalType": "structAaveV4View.LoanDataWithFullReserves", "name": "loanData", "type": "tuple" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_spoke", "type": "address" }, { "internalType": "uint256", "name": "_reserveId", "type": "uint256" }], "name": "getReserveData", "outputs": [{ "components": [{ "internalType": "address", "name": "underlying", "type": "address" }, { "internalType": "uint16", "name": "collateralFactor", "type": "uint16" }, { "internalType": "uint256", "name": "price", "type": "uint256" }], "internalType": "structAaveV4View.ReserveData", "name": "reserveData", "type": "tuple" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_spoke", "type": "address" }, { "internalType": "uint256", "name": "_reserveId", "type": "uint256" }], "name": "getReserveDataFull", "outputs": [{ "components": [{ "internalType": "address", "name": "underlying", "type": "address" }, { "internalType": "address", "name": "hub", "type": "address" }, { "internalType": "uint16", "name": "assetId", "type": "uint16" }, { "internalType": "uint8", "name": "decimals", "type": "uint8" }, { "internalType": "bool", "name": "paused", "type": "bool" }, { "internalType": "bool", "name": "frozen", "type": "bool" }, { "internalType": "bool", "name": "borrowable", "type": "bool" }, { "internalType": "uint24", "name": "collateralRisk", "type": "uint24" }, { "internalType": "uint16", "name": "collateralFactor", "type": "uint16" }, { "internalType": "uint32", "name": "maxLiquidationBonus", "type": "uint32" }, { "internalType": "uint16", "name": "liquidationFee", "type": "uint16" }, { "internalType": "uint256", "name": "price", "type": "uint256" }, { "internalType": "uint256", "name": "totalSupplied", "type": "uint256" }, { "internalType": "uint256", "name": "totalDrawn", "type": "uint256" }, { "internalType": "uint256", "name": "totalPremium", "type": "uint256" }, { "internalType": "uint256", "name": "totalDebt", "type": "uint256" }, { "internalType": "uint256", "name": "supplyCap", "type": "uint256" }, { "internalType": "uint256", "name": "borrowCap", "type": "uint256" }, { "internalType": "uint256", "name": "deficitRay", "type": "uint256" }, { "internalType": "bool", "name": "spokeActive", "type": "bool" }, { "internalType": "bool", "name": "spokePaused", "type": "bool" }], "internalType": "structAaveV4View.ReserveDataFull", "name": "reserveData", "type": "tuple" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_spoke", "type": "address" }, { "internalType": "uint256", "name": "_reserveId", "type": "uint256" }], "name": "getReservePrice", "outputs": [{ "internalType": "uint256", "name": "price", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_spoke", "type": "address" }, { "internalType": "uint256[]", "name": "_reserveIds", "type": "uint256[]" }], "name": "getReservePrices", "outputs": [{ "internalType": "uint256[]", "name": "prices", "type": "uint256[]" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_spoke", "type": "address" }, { "internalType": "uint256[]", "name": "_reserveIds", "type": "uint256[]" }], "name": "getReservesData", "outputs": [{ "components": [{ "internalType": "address", "name": "underlying", "type": "address" }, { "internalType": "uint16", "name": "collateralFactor", "type": "uint16" }, { "internalType": "uint256", "name": "price", "type": "uint256" }], "internalType": "structAaveV4View.ReserveData[]", "name": "reserveData", "type": "tuple[]" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_spoke", "type": "address" }, { "internalType": "uint256[]", "name": "_reserveIds", "type": "uint256[]" }], "name": "getReservesDataFull", "outputs": [{ "components": [{ "internalType": "address", "name": "underlying", "type": "address" }, { "internalType": "address", "name": "hub", "type": "address" }, { "internalType": "uint16", "name": "assetId", "type": "uint16" }, { "internalType": "uint8", "name": "decimals", "type": "uint8" }, { "internalType": "bool", "name": "paused", "type": "bool" }, { "internalType": "bool", "name": "frozen", "type": "bool" }, { "internalType": "bool", "name": "borrowable", "type": "bool" }, { "internalType": "uint24", "name": "collateralRisk", "type": "uint24" }, { "internalType": "uint16", "name": "collateralFactor", "type": "uint16" }, { "internalType": "uint32", "name": "maxLiquidationBonus", "type": "uint32" }, { "internalType": "uint16", "name": "liquidationFee", "type": "uint16" }, { "internalType": "uint256", "name": "price", "type": "uint256" }, { "internalType": "uint256", "name": "totalSupplied", "type": "uint256" }, { "internalType": "uint256", "name": "totalDrawn", "type": "uint256" }, { "internalType": "uint256", "name": "totalPremium", "type": "uint256" }, { "internalType": "uint256", "name": "totalDebt", "type": "uint256" }, { "internalType": "uint256", "name": "supplyCap", "type": "uint256" }, { "internalType": "uint256", "name": "borrowCap", "type": "uint256" }, { "internalType": "uint256", "name": "deficitRay", "type": "uint256" }, { "internalType": "bool", "name": "spokeActive", "type": "bool" }, { "internalType": "bool", "name": "spokePaused", "type": "bool" }], "internalType": "structAaveV4View.ReserveDataFull[]", "name": "reserveData", "type": "tuple[]" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_spoke", "type": "address" }], "name": "getSpokeData", "outputs": [{ "components": [{ "internalType": "uint128", "name": "targetHealthFactor", "type": "uint128" }, { "internalType": "uint64", "name": "healthFactorForMaxBonus", "type": "uint64" }, { "internalType": "uint16", "name": "liquidationBonusFactor", "type": "uint16" }, { "internalType": "address", "name": "oracle", "type": "address" }, { "internalType": "uint256", "name": "oracleDecimals", "type": "uint256" }, { "internalType": "uint256", "name": "reserveCount", "type": "uint256" }], "internalType": "structAaveV4View.SpokeData", "name": "spokeData", "type": "tuple" }, { "components": [{ "internalType": "address", "name": "underlying", "type": "address" }, { "internalType": "uint16", "name": "collateralFactor", "type": "uint16" }, { "internalType": "uint256", "name": "price", "type": "uint256" }], "internalType": "structAaveV4View.ReserveData[]", "name": "reserves", "type": "tuple[]" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_spoke", "type": "address" }], "name": "getSpokeDataFull", "outputs": [{ "components": [{ "internalType": "uint128", "name": "targetHealthFactor", "type": "uint128" }, { "internalType": "uint64", "name": "healthFactorForMaxBonus", "type": "uint64" }, { "internalType": "uint16", "name": "liquidationBonusFactor", "type": "uint16" }, { "internalType": "address", "name": "oracle", "type": "address" }, { "internalType": "uint256", "name": "oracleDecimals", "type": "uint256" }, { "internalType": "uint256", "name": "reserveCount", "type": "uint256" }], "internalType": "structAaveV4View.SpokeData", "name": "spokeData", "type": "tuple" }, { "components": [{ "internalType": "address", "name": "underlying", "type": "address" }, { "internalType": "address", "name": "hub", "type": "address" }, { "internalType": "uint16", "name": "assetId", "type": "uint16" }, { "internalType": "uint8", "name": "decimals", "type": "uint8" }, { "internalType": "bool", "name": "paused", "type": "bool" }, { "internalType": "bool", "name": "frozen", "type": "bool" }, { "internalType": "bool", "name": "borrowable", "type": "bool" }, { "internalType": "uint24", "name": "collateralRisk", "type": "uint24" }, { "internalType": "uint16", "name": "collateralFactor", "type": "uint16" }, { "internalType": "uint32", "name": "maxLiquidationBonus", "type": "uint32" }, { "internalType": "uint16", "name": "liquidationFee", "type": "uint16" }, { "internalType": "uint256", "name": "price", "type": "uint256" }, { "internalType": "uint256", "name": "totalSupplied", "type": "uint256" }, { "internalType": "uint256", "name": "totalDrawn", "type": "uint256" }, { "internalType": "uint256", "name": "totalPremium", "type": "uint256" }, { "internalType": "uint256", "name": "totalDebt", "type": "uint256" }, { "internalType": "uint256", "name": "supplyCap", "type": "uint256" }, { "internalType": "uint256", "name": "borrowCap", "type": "uint256" }, { "internalType": "uint256", "name": "deficitRay", "type": "uint256" }, { "internalType": "bool", "name": "spokeActive", "type": "bool" }, { "internalType": "bool", "name": "spokePaused", "type": "bool" }], "internalType": "structAaveV4View.ReserveDataFull[]", "name": "reserves", "type": "tuple[]" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_hub", "type": "address" }, { "internalType": "uint256", "name": "_assetId", "type": "uint256" }], "name": "getSpokesForAsset", "outputs": [{ "internalType": "address[]", "name": "spokes", "type": "address[]" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_spoke", "type": "address" }, { "internalType": "address", "name": "_user", "type": "address" }, { "internalType": "uint256[]", "name": "_reserveIds", "type": "uint256[]" }], "name": "getUserReserveData", "outputs": [{ "components": [{ "internalType": "uint256", "name": "reserveId", "type": "uint256" }, { "internalType": "uint16", "name": "assetId", "type": "uint16" }, { "internalType": "address", "name": "underlying", "type": "address" }, { "internalType": "uint256", "name": "supplied", "type": "uint256" }, { "internalType": "uint256", "name": "drawn", "type": "uint256" }, { "internalType": "uint256", "name": "premium", "type": "uint256" }, { "internalType": "uint256", "name": "totalDebt", "type": "uint256" }, { "internalType": "uint16", "name": "collateralFactor", "type": "uint16" }, { "internalType": "uint32", "name": "maxLiquidationBonus", "type": "uint32" }, { "internalType": "uint16", "name": "liquidationFee", "type": "uint16" }, { "internalType": "bool", "name": "isUsingAsCollateral", "type": "bool" }, { "internalType": "bool", "name": "isBorrowing", "type": "bool" }], "internalType": "structAaveV4View.UserReserveData[]", "name": "_userReserves", "type": "tuple[]" }], "stateMutability": "view", "type": "function" }],
|
|
1302
1302
|
"networks": {
|
|
1303
1303
|
"1": {
|
|
1304
|
-
"address": "
|
|
1304
|
+
"address": "0xF0D440dE7f82A1e598992A648E5Bfa5d69b8E3a9",
|
|
1305
1305
|
}
|
|
1306
1306
|
}
|
|
1307
1307
|
};
|