@defisaver/positions-sdk 0.0.111 → 0.0.112
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/config/contracts.d.ts +176 -0
- package/cjs/config/contracts.js +22 -4
- package/cjs/constants/index.d.ts +1 -0
- package/cjs/constants/index.js +2 -1
- package/cjs/helpers/morphoBlueHelpers/index.js +1 -2
- package/cjs/helpers/sparkHelpers/index.d.ts +12 -1
- package/cjs/helpers/sparkHelpers/index.js +49 -1
- package/cjs/types/contracts/generated/SparkView.d.ts +9 -2
- package/esm/config/contracts.d.ts +176 -0
- package/esm/config/contracts.js +22 -4
- package/esm/constants/index.d.ts +1 -0
- package/esm/constants/index.js +1 -0
- package/esm/helpers/morphoBlueHelpers/index.js +1 -2
- package/esm/helpers/sparkHelpers/index.d.ts +12 -1
- package/esm/helpers/sparkHelpers/index.js +49 -2
- package/esm/types/contracts/generated/SparkView.d.ts +9 -2
- package/package.json +1 -1
- package/src/config/contracts.js +22 -4
- package/src/constants/index.ts +2 -1
- package/src/helpers/morphoBlueHelpers/index.ts +1 -3
- package/src/helpers/sparkHelpers/index.ts +47 -3
- package/src/types/contracts/generated/SparkView.ts +9 -2
|
@@ -3072,6 +3072,72 @@ export namespace SparkView {
|
|
|
3072
3072
|
address: string;
|
|
3073
3073
|
createdBlock: number;
|
|
3074
3074
|
oldVersions: {
|
|
3075
|
+
"20218396": {
|
|
3076
|
+
abi: ({
|
|
3077
|
+
inputs: ({
|
|
3078
|
+
internalType: string;
|
|
3079
|
+
name: string;
|
|
3080
|
+
type: string;
|
|
3081
|
+
components?: undefined;
|
|
3082
|
+
} | {
|
|
3083
|
+
components: {
|
|
3084
|
+
internalType: string;
|
|
3085
|
+
name: string;
|
|
3086
|
+
type: string;
|
|
3087
|
+
}[];
|
|
3088
|
+
internalType: string;
|
|
3089
|
+
name: string;
|
|
3090
|
+
type: string;
|
|
3091
|
+
})[];
|
|
3092
|
+
name: string;
|
|
3093
|
+
outputs: {
|
|
3094
|
+
components: {
|
|
3095
|
+
internalType: string;
|
|
3096
|
+
name: string;
|
|
3097
|
+
type: string;
|
|
3098
|
+
}[];
|
|
3099
|
+
internalType: string;
|
|
3100
|
+
name: string;
|
|
3101
|
+
type: string;
|
|
3102
|
+
}[];
|
|
3103
|
+
stateMutability: string;
|
|
3104
|
+
type: string;
|
|
3105
|
+
} | {
|
|
3106
|
+
inputs: {
|
|
3107
|
+
internalType: string;
|
|
3108
|
+
name: string;
|
|
3109
|
+
type: string;
|
|
3110
|
+
}[];
|
|
3111
|
+
name: string;
|
|
3112
|
+
outputs: {
|
|
3113
|
+
internalType: string;
|
|
3114
|
+
name: string;
|
|
3115
|
+
type: string;
|
|
3116
|
+
}[];
|
|
3117
|
+
stateMutability: string;
|
|
3118
|
+
type: string;
|
|
3119
|
+
} | {
|
|
3120
|
+
inputs: {
|
|
3121
|
+
components: {
|
|
3122
|
+
internalType: string;
|
|
3123
|
+
name: string;
|
|
3124
|
+
type: string;
|
|
3125
|
+
}[];
|
|
3126
|
+
internalType: string;
|
|
3127
|
+
name: string;
|
|
3128
|
+
type: string;
|
|
3129
|
+
}[];
|
|
3130
|
+
name: string;
|
|
3131
|
+
outputs: {
|
|
3132
|
+
internalType: string;
|
|
3133
|
+
name: string;
|
|
3134
|
+
type: string;
|
|
3135
|
+
}[];
|
|
3136
|
+
stateMutability: string;
|
|
3137
|
+
type: string;
|
|
3138
|
+
})[];
|
|
3139
|
+
address: string;
|
|
3140
|
+
};
|
|
3075
3141
|
"17870357": {
|
|
3076
3142
|
abi: ({
|
|
3077
3143
|
inputs: {
|
|
@@ -4925,9 +4991,119 @@ export namespace MorphoBlueView {
|
|
|
4925
4991
|
let networks_67: {
|
|
4926
4992
|
"1": {
|
|
4927
4993
|
address: string;
|
|
4994
|
+
createdBlock: number;
|
|
4995
|
+
oldVersions: {
|
|
4996
|
+
"18976639": {
|
|
4997
|
+
abi: ({
|
|
4998
|
+
inputs: {
|
|
4999
|
+
components: {
|
|
5000
|
+
internalType: string;
|
|
5001
|
+
name: string;
|
|
5002
|
+
type: string;
|
|
5003
|
+
}[];
|
|
5004
|
+
internalType: string;
|
|
5005
|
+
name: string;
|
|
5006
|
+
type: string;
|
|
5007
|
+
}[];
|
|
5008
|
+
name: string;
|
|
5009
|
+
outputs: {
|
|
5010
|
+
internalType: string;
|
|
5011
|
+
name: string;
|
|
5012
|
+
type: string;
|
|
5013
|
+
}[];
|
|
5014
|
+
stateMutability: string;
|
|
5015
|
+
type: string;
|
|
5016
|
+
} | {
|
|
5017
|
+
inputs: ({
|
|
5018
|
+
components: {
|
|
5019
|
+
internalType: string;
|
|
5020
|
+
name: string;
|
|
5021
|
+
type: string;
|
|
5022
|
+
}[];
|
|
5023
|
+
internalType: string;
|
|
5024
|
+
name: string;
|
|
5025
|
+
type: string;
|
|
5026
|
+
} | {
|
|
5027
|
+
internalType: string;
|
|
5028
|
+
name: string;
|
|
5029
|
+
type: string;
|
|
5030
|
+
components?: undefined;
|
|
5031
|
+
})[];
|
|
5032
|
+
name: string;
|
|
5033
|
+
outputs: {
|
|
5034
|
+
components: {
|
|
5035
|
+
internalType: string;
|
|
5036
|
+
name: string;
|
|
5037
|
+
type: string;
|
|
5038
|
+
}[];
|
|
5039
|
+
internalType: string;
|
|
5040
|
+
name: string;
|
|
5041
|
+
type: string;
|
|
5042
|
+
}[];
|
|
5043
|
+
stateMutability: string;
|
|
5044
|
+
type: string;
|
|
5045
|
+
})[];
|
|
5046
|
+
address: string;
|
|
5047
|
+
};
|
|
5048
|
+
};
|
|
4928
5049
|
};
|
|
4929
5050
|
"8453": {
|
|
4930
5051
|
address: string;
|
|
5052
|
+
createdBlock: number;
|
|
5053
|
+
oldVersions: {
|
|
5054
|
+
"14527939": {
|
|
5055
|
+
abi: ({
|
|
5056
|
+
inputs: {
|
|
5057
|
+
components: {
|
|
5058
|
+
internalType: string;
|
|
5059
|
+
name: string;
|
|
5060
|
+
type: string;
|
|
5061
|
+
}[];
|
|
5062
|
+
internalType: string;
|
|
5063
|
+
name: string;
|
|
5064
|
+
type: string;
|
|
5065
|
+
}[];
|
|
5066
|
+
name: string;
|
|
5067
|
+
outputs: {
|
|
5068
|
+
internalType: string;
|
|
5069
|
+
name: string;
|
|
5070
|
+
type: string;
|
|
5071
|
+
}[];
|
|
5072
|
+
stateMutability: string;
|
|
5073
|
+
type: string;
|
|
5074
|
+
} | {
|
|
5075
|
+
inputs: ({
|
|
5076
|
+
components: {
|
|
5077
|
+
internalType: string;
|
|
5078
|
+
name: string;
|
|
5079
|
+
type: string;
|
|
5080
|
+
}[];
|
|
5081
|
+
internalType: string;
|
|
5082
|
+
name: string;
|
|
5083
|
+
type: string;
|
|
5084
|
+
} | {
|
|
5085
|
+
internalType: string;
|
|
5086
|
+
name: string;
|
|
5087
|
+
type: string;
|
|
5088
|
+
components?: undefined;
|
|
5089
|
+
})[];
|
|
5090
|
+
name: string;
|
|
5091
|
+
outputs: {
|
|
5092
|
+
components: {
|
|
5093
|
+
internalType: string;
|
|
5094
|
+
name: string;
|
|
5095
|
+
type: string;
|
|
5096
|
+
}[];
|
|
5097
|
+
internalType: string;
|
|
5098
|
+
name: string;
|
|
5099
|
+
type: string;
|
|
5100
|
+
}[];
|
|
5101
|
+
stateMutability: string;
|
|
5102
|
+
type: string;
|
|
5103
|
+
})[];
|
|
5104
|
+
address: string;
|
|
5105
|
+
};
|
|
5106
|
+
};
|
|
4931
5107
|
};
|
|
4932
5108
|
};
|
|
4933
5109
|
export { networks_67 as networks };
|
package/cjs/config/contracts.js
CHANGED
|
@@ -553,12 +553,16 @@ module.exports = {
|
|
|
553
553
|
}
|
|
554
554
|
},
|
|
555
555
|
"SparkView": {
|
|
556
|
-
"abi": [{ "inputs": [], "name": "SPARK_REFERRAL_CODE", "outputs": [{ "internalType": "uint16", "name": "", "type": "uint16" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_market", "type": "address" }, { "components": [{ "internalType": "address", "name": "reserveAddress", "type": "address" }, { "internalType": "uint256", "name": "liquidityAdded", "type": "uint256" }, { "internalType": "uint256", "name": "liquidityTaken", "type": "uint256" }], "internalType": "struct SparkView.LiquidityChangeParams[]", "name": "_reserveParams", "type": "tuple[]" }], "name": "getApyAfterValuesEstimation", "outputs": [{ "components": [{ "internalType": "address", "name": "reserveAddress", "type": "address" }, { "internalType": "uint256", "name": "supplyRate", "type": "uint256" }, { "internalType": "uint256", "name": "variableBorrowRate", "type": "uint256" }], "internalType": "struct SparkView.EstimatedRates[]", "name": "", "type": "tuple[]" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_market", "type": "address" }, { "internalType": "address", "name": "_tokenAddr", "type": "address" }], "name": "getAssetPrice", "outputs": [{ "internalType": "uint256", "name": "price", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_market", "type": "address" }, { "internalType": "address[]", "name": "_tokens", "type": "address[]" }], "name": "getCollFactors", "outputs": [{ "internalType": "uint256[]", "name": "collFactors", "type": "uint256[]" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "emodeCategory", "type": "uint256" }, { "internalType": "contract IPoolV3", "name": "lendingPool", "type": "address" }], "name": "getEModeCollateralFactor", "outputs": [{ "internalType": "uint16", "name": "", "type": "uint16" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_market", "type": "address" }, { "internalType": "address[]", "name": "_tokenAddresses", "type": "address[]" }], "name": "getFullTokensInfo", "outputs": [{ "components": [{ "internalType": "address", "name": "aTokenAddress", "type": "address" }, { "internalType": "address", "name": "underlyingTokenAddress", "type": "address" }, { "internalType": "uint16", "name": "assetId", "type": "uint16" }, { "internalType": "uint256", "name": "supplyRate", "type": "uint256" }, { "internalType": "uint256", "name": "borrowRateVariable", "type": "uint256" }, { "internalType": "uint256", "name": "borrowRateStable", "type": "uint256" }, { "internalType": "uint256", "name": "totalSupply", "type": "uint256" }, { "internalType": "uint256", "name": "availableLiquidity", "type": "uint256" }, { "internalType": "uint256", "name": "totalBorrow", "type": "uint256" }, { "internalType": "uint256", "name": "totalBorrowVar", "type": "uint256" }, { "internalType": "uint256", "name": "totalBorrowStab", "type": "uint256" }, { "internalType": "uint256", "name": "collateralFactor", "type": "uint256" }, { "internalType": "uint256", "name": "liquidationRatio", "type": "uint256" }, { "internalType": "uint256", "name": "price", "type": "uint256" }, { "internalType": "uint256", "name": "supplyCap", "type": "uint256" }, { "internalType": "uint256", "name": "borrowCap", "type": "uint256" }, { "internalType": "uint256", "name": "emodeCategory", "type": "uint256" }, { "internalType": "uint256", "name": "debtCeilingForIsolationMode", "type": "uint256" }, { "internalType": "uint256", "name": "isolationModeTotalDebt", "type": "uint256" }, { "internalType": "bool", "name": "usageAsCollateralEnabled", "type": "bool" }, { "internalType": "bool", "name": "borrowingEnabled", "type": "bool" }, { "internalType": "bool", "name": "stableBorrowRateEnabled", "type": "bool" }, { "internalType": "bool", "name": "isolationModeBorrowingEnabled", "type": "bool" }, { "internalType": "bool", "name": "isSiloedForBorrowing", "type": "bool" }, { "internalType": "uint256", "name": "eModeCollateralFactor", "type": "uint256" }, { "internalType": "bool", "name": "isFlashLoanEnabled", "type": "bool" }, { "internalType": "uint16", "name": "ltv", "type": "uint16" }, { "internalType": "uint16", "name": "liquidationThreshold", "type": "uint16" }, { "internalType": "uint16", "name": "liquidationBonus", "type": "uint16" }, { "internalType": "address", "name": "priceSource", "type": "address" }, { "internalType": "string", "name": "label", "type": "string" }, { "internalType": "bool", "name": "isActive", "type": "bool" }, { "internalType": "bool", "name": "isPaused", "type": "bool" }, { "internalType": "bool", "name": "isFrozen", "type": "bool" }], "internalType": "struct SparkView.TokenInfoFull[]", "name": "tokens", "type": "tuple[]" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_market", "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": "_market", "type": "address" }, { "internalType": "address", "name": "_user", "type": "address" }], "name": "getLoanData", "outputs": [{ "components": [{ "internalType": "address", "name": "user", "type": "address" }, { "internalType": "uint128", "name": "ratio", "type": "uint128" }, { "internalType": "uint256", "name": "eMode", "type": "uint256" }, { "internalType": "address[]", "name": "collAddr", "type": "address[]" }, { "internalType": "bool[]", "name": "enabledAsColl", "type": "bool[]" }, { "internalType": "address[]", "name": "borrowAddr", "type": "address[]" }, { "internalType": "uint256[]", "name": "collAmounts", "type": "uint256[]" }, { "internalType": "uint256[]", "name": "borrowStableAmounts", "type": "uint256[]" }, { "internalType": "uint256[]", "name": "borrowVariableAmounts", "type": "uint256[]" }, { "internalType": "uint16", "name": "ltv", "type": "uint16" }, { "internalType": "uint16", "name": "liquidationThreshold", "type": "uint16" }, { "internalType": "uint16", "name": "liquidationBonus", "type": "uint16" }, { "internalType": "address", "name": "priceSource", "type": "address" }, { "internalType": "string", "name": "label", "type": "string" }], "internalType": "struct SparkView.LoanData", "name": "data", "type": "tuple" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_market", "type": "address" }, { "internalType": "address[]", "name": "_users", "type": "address[]" }], "name": "getLoanDataArr", "outputs": [{ "components": [{ "internalType": "address", "name": "user", "type": "address" }, { "internalType": "uint128", "name": "ratio", "type": "uint128" }, { "internalType": "uint256", "name": "eMode", "type": "uint256" }, { "internalType": "address[]", "name": "collAddr", "type": "address[]" }, { "internalType": "bool[]", "name": "enabledAsColl", "type": "bool[]" }, { "internalType": "address[]", "name": "borrowAddr", "type": "address[]" }, { "internalType": "uint256[]", "name": "collAmounts", "type": "uint256[]" }, { "internalType": "uint256[]", "name": "borrowStableAmounts", "type": "uint256[]" }, { "internalType": "uint256[]", "name": "borrowVariableAmounts", "type": "uint256[]" }, { "internalType": "uint16", "name": "ltv", "type": "uint16" }, { "internalType": "uint16", "name": "liquidationThreshold", "type": "uint16" }, { "internalType": "uint16", "name": "liquidationBonus", "type": "uint16" }, { "internalType": "address", "name": "priceSource", "type": "address" }, { "internalType": "string", "name": "label", "type": "string" }], "internalType": "struct SparkView.LoanData[]", "name": "loans", "type": "tuple[]" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "components": [{ "internalType": "uint256", "name": "data", "type": "uint256" }], "internalType": "struct DataTypes.ReserveConfigurationMap", "name": "self", "type": "tuple" }], "name": "getLtv", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "pure", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_market", "type": "address" }, { "internalType": "address[]", "name": "_tokens", "type": "address[]" }], "name": "getPrices", "outputs": [{ "internalType": "uint256[]", "name": "prices", "type": "uint256[]" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_market", "type": "address" }, { "internalType": "address", "name": "_user", "type": "address" }], "name": "getRatio", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_market", "type": "address" }, { "internalType": "address[]", "name": "_users", "type": "address[]" }], "name": "getRatios", "outputs": [{ "internalType": "uint256[]", "name": "ratios", "type": "uint256[]" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_market", "type": "address" }, { "internalType": "address", "name": "_user", "type": "address" }], "name": "getSafetyRatio", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_market", "type": "address" }, { "internalType": "address", "name": "_user", "type": "address" }, { "internalType": "address[]", "name": "_tokens", "type": "address[]" }], "name": "getTokenBalances", "outputs": [{ "components": [{ "internalType": "address", "name": "token", "type": "address" }, { "internalType": "uint256", "name": "balance", "type": "uint256" }, { "internalType": "uint256", "name": "borrowsStable", "type": "uint256" }, { "internalType": "uint256", "name": "borrowsVariable", "type": "uint256" }, { "internalType": "uint256", "name": "stableBorrowRate", "type": "uint256" }, { "internalType": "bool", "name": "enabledAsCollateral", "type": "bool" }], "internalType": "struct SparkView.UserToken[]", "name": "userTokens", "type": "tuple[]" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_market", "type": "address" }, { "internalType": "address", "name": "_tokenAddr", "type": "address" }], "name": "getTokenInfoFull", "outputs": [{ "components": [{ "internalType": "address", "name": "aTokenAddress", "type": "address" }, { "internalType": "address", "name": "underlyingTokenAddress", "type": "address" }, { "internalType": "uint16", "name": "assetId", "type": "uint16" }, { "internalType": "uint256", "name": "supplyRate", "type": "uint256" }, { "internalType": "uint256", "name": "borrowRateVariable", "type": "uint256" }, { "internalType": "uint256", "name": "borrowRateStable", "type": "uint256" }, { "internalType": "uint256", "name": "totalSupply", "type": "uint256" }, { "internalType": "uint256", "name": "availableLiquidity", "type": "uint256" }, { "internalType": "uint256", "name": "totalBorrow", "type": "uint256" }, { "internalType": "uint256", "name": "totalBorrowVar", "type": "uint256" }, { "internalType": "uint256", "name": "totalBorrowStab", "type": "uint256" }, { "internalType": "uint256", "name": "collateralFactor", "type": "uint256" }, { "internalType": "uint256", "name": "liquidationRatio", "type": "uint256" }, { "internalType": "uint256", "name": "price", "type": "uint256" }, { "internalType": "uint256", "name": "supplyCap", "type": "uint256" }, { "internalType": "uint256", "name": "borrowCap", "type": "uint256" }, { "internalType": "uint256", "name": "emodeCategory", "type": "uint256" }, { "internalType": "uint256", "name": "debtCeilingForIsolationMode", "type": "uint256" }, { "internalType": "uint256", "name": "isolationModeTotalDebt", "type": "uint256" }, { "internalType": "bool", "name": "usageAsCollateralEnabled", "type": "bool" }, { "internalType": "bool", "name": "borrowingEnabled", "type": "bool" }, { "internalType": "bool", "name": "stableBorrowRateEnabled", "type": "bool" }, { "internalType": "bool", "name": "isolationModeBorrowingEnabled", "type": "bool" }, { "internalType": "bool", "name": "isSiloedForBorrowing", "type": "bool" }, { "internalType": "uint256", "name": "eModeCollateralFactor", "type": "uint256" }, { "internalType": "bool", "name": "isFlashLoanEnabled", "type": "bool" }, { "internalType": "uint16", "name": "ltv", "type": "uint16" }, { "internalType": "uint16", "name": "liquidationThreshold", "type": "uint16" }, { "internalType": "uint16", "name": "liquidationBonus", "type": "uint16" }, { "internalType": "address", "name": "priceSource", "type": "address" }, { "internalType": "string", "name": "label", "type": "string" }, { "internalType": "bool", "name": "isActive", "type": "bool" }, { "internalType": "bool", "name": "isPaused", "type": "bool" }, { "internalType": "bool", "name": "isFrozen", "type": "bool" }], "internalType": "struct SparkView.TokenInfoFull", "name": "_tokenInfo", "type": "tuple" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_market", "type": "address" }, { "internalType": "address[]", "name": "_tokenAddresses", "type": "address[]" }], "name": "getTokensInfo", "outputs": [{ "components": [{ "internalType": "address", "name": "aTokenAddress", "type": "address" }, { "internalType": "address", "name": "underlyingTokenAddress", "type": "address" }, { "internalType": "uint256", "name": "collateralFactor", "type": "uint256" }, { "internalType": "uint256", "name": "price", "type": "uint256" }], "internalType": "struct SparkView.TokenInfo[]", "name": "tokens", "type": "tuple[]" }], "stateMutability": "view", "type": "function" }],
|
|
556
|
+
"abi": [{ "inputs": [], "name": "SPARK_REFERRAL_CODE", "outputs": [{ "internalType": "uint16", "name": "", "type": "uint16" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_market", "type": "address" }, { "components": [{ "internalType": "address", "name": "reserveAddress", "type": "address" }, { "internalType": "uint256", "name": "liquidityAdded", "type": "uint256" }, { "internalType": "uint256", "name": "liquidityTaken", "type": "uint256" }, { "internalType": "bool", "name": "isDebtAsset", "type": "bool" }], "internalType": "struct SparkView.LiquidityChangeParams[]", "name": "_reserveParams", "type": "tuple[]" }], "name": "getApyAfterValuesEstimation", "outputs": [{ "components": [{ "internalType": "address", "name": "reserveAddress", "type": "address" }, { "internalType": "uint256", "name": "supplyRate", "type": "uint256" }, { "internalType": "uint256", "name": "variableBorrowRate", "type": "uint256" }], "internalType": "struct SparkView.EstimatedRates[]", "name": "", "type": "tuple[]" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_market", "type": "address" }, { "internalType": "address", "name": "_tokenAddr", "type": "address" }], "name": "getAssetPrice", "outputs": [{ "internalType": "uint256", "name": "price", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_market", "type": "address" }, { "internalType": "address[]", "name": "_tokens", "type": "address[]" }], "name": "getCollFactors", "outputs": [{ "internalType": "uint256[]", "name": "collFactors", "type": "uint256[]" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "emodeCategory", "type": "uint256" }, { "internalType": "contract IPoolV3", "name": "lendingPool", "type": "address" }], "name": "getEModeCollateralFactor", "outputs": [{ "internalType": "uint16", "name": "", "type": "uint16" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_market", "type": "address" }, { "internalType": "address[]", "name": "_tokenAddresses", "type": "address[]" }], "name": "getFullTokensInfo", "outputs": [{ "components": [{ "internalType": "address", "name": "aTokenAddress", "type": "address" }, { "internalType": "address", "name": "underlyingTokenAddress", "type": "address" }, { "internalType": "uint16", "name": "assetId", "type": "uint16" }, { "internalType": "uint256", "name": "supplyRate", "type": "uint256" }, { "internalType": "uint256", "name": "borrowRateVariable", "type": "uint256" }, { "internalType": "uint256", "name": "borrowRateStable", "type": "uint256" }, { "internalType": "uint256", "name": "totalSupply", "type": "uint256" }, { "internalType": "uint256", "name": "availableLiquidity", "type": "uint256" }, { "internalType": "uint256", "name": "totalBorrow", "type": "uint256" }, { "internalType": "uint256", "name": "totalBorrowVar", "type": "uint256" }, { "internalType": "uint256", "name": "totalBorrowStab", "type": "uint256" }, { "internalType": "uint256", "name": "collateralFactor", "type": "uint256" }, { "internalType": "uint256", "name": "liquidationRatio", "type": "uint256" }, { "internalType": "uint256", "name": "price", "type": "uint256" }, { "internalType": "uint256", "name": "supplyCap", "type": "uint256" }, { "internalType": "uint256", "name": "borrowCap", "type": "uint256" }, { "internalType": "uint256", "name": "emodeCategory", "type": "uint256" }, { "internalType": "uint256", "name": "debtCeilingForIsolationMode", "type": "uint256" }, { "internalType": "uint256", "name": "isolationModeTotalDebt", "type": "uint256" }, { "internalType": "bool", "name": "usageAsCollateralEnabled", "type": "bool" }, { "internalType": "bool", "name": "borrowingEnabled", "type": "bool" }, { "internalType": "bool", "name": "stableBorrowRateEnabled", "type": "bool" }, { "internalType": "bool", "name": "isolationModeBorrowingEnabled", "type": "bool" }, { "internalType": "bool", "name": "isSiloedForBorrowing", "type": "bool" }, { "internalType": "uint256", "name": "eModeCollateralFactor", "type": "uint256" }, { "internalType": "bool", "name": "isFlashLoanEnabled", "type": "bool" }, { "internalType": "uint16", "name": "ltv", "type": "uint16" }, { "internalType": "uint16", "name": "liquidationThreshold", "type": "uint16" }, { "internalType": "uint16", "name": "liquidationBonus", "type": "uint16" }, { "internalType": "address", "name": "priceSource", "type": "address" }, { "internalType": "string", "name": "label", "type": "string" }, { "internalType": "bool", "name": "isActive", "type": "bool" }, { "internalType": "bool", "name": "isPaused", "type": "bool" }, { "internalType": "bool", "name": "isFrozen", "type": "bool" }], "internalType": "struct SparkView.TokenInfoFull[]", "name": "tokens", "type": "tuple[]" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_market", "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": "_market", "type": "address" }, { "internalType": "address", "name": "_user", "type": "address" }], "name": "getLoanData", "outputs": [{ "components": [{ "internalType": "address", "name": "user", "type": "address" }, { "internalType": "uint128", "name": "ratio", "type": "uint128" }, { "internalType": "uint256", "name": "eMode", "type": "uint256" }, { "internalType": "address[]", "name": "collAddr", "type": "address[]" }, { "internalType": "bool[]", "name": "enabledAsColl", "type": "bool[]" }, { "internalType": "address[]", "name": "borrowAddr", "type": "address[]" }, { "internalType": "uint256[]", "name": "collAmounts", "type": "uint256[]" }, { "internalType": "uint256[]", "name": "borrowStableAmounts", "type": "uint256[]" }, { "internalType": "uint256[]", "name": "borrowVariableAmounts", "type": "uint256[]" }, { "internalType": "uint16", "name": "ltv", "type": "uint16" }, { "internalType": "uint16", "name": "liquidationThreshold", "type": "uint16" }, { "internalType": "uint16", "name": "liquidationBonus", "type": "uint16" }, { "internalType": "address", "name": "priceSource", "type": "address" }, { "internalType": "string", "name": "label", "type": "string" }], "internalType": "struct SparkView.LoanData", "name": "data", "type": "tuple" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_market", "type": "address" }, { "internalType": "address[]", "name": "_users", "type": "address[]" }], "name": "getLoanDataArr", "outputs": [{ "components": [{ "internalType": "address", "name": "user", "type": "address" }, { "internalType": "uint128", "name": "ratio", "type": "uint128" }, { "internalType": "uint256", "name": "eMode", "type": "uint256" }, { "internalType": "address[]", "name": "collAddr", "type": "address[]" }, { "internalType": "bool[]", "name": "enabledAsColl", "type": "bool[]" }, { "internalType": "address[]", "name": "borrowAddr", "type": "address[]" }, { "internalType": "uint256[]", "name": "collAmounts", "type": "uint256[]" }, { "internalType": "uint256[]", "name": "borrowStableAmounts", "type": "uint256[]" }, { "internalType": "uint256[]", "name": "borrowVariableAmounts", "type": "uint256[]" }, { "internalType": "uint16", "name": "ltv", "type": "uint16" }, { "internalType": "uint16", "name": "liquidationThreshold", "type": "uint16" }, { "internalType": "uint16", "name": "liquidationBonus", "type": "uint16" }, { "internalType": "address", "name": "priceSource", "type": "address" }, { "internalType": "string", "name": "label", "type": "string" }], "internalType": "struct SparkView.LoanData[]", "name": "loans", "type": "tuple[]" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "components": [{ "internalType": "uint256", "name": "data", "type": "uint256" }], "internalType": "struct DataTypes.ReserveConfigurationMap", "name": "self", "type": "tuple" }], "name": "getLtv", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "pure", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_market", "type": "address" }, { "internalType": "address[]", "name": "_tokens", "type": "address[]" }], "name": "getPrices", "outputs": [{ "internalType": "uint256[]", "name": "prices", "type": "uint256[]" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_market", "type": "address" }, { "internalType": "address", "name": "_user", "type": "address" }], "name": "getRatio", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_market", "type": "address" }, { "internalType": "address[]", "name": "_users", "type": "address[]" }], "name": "getRatios", "outputs": [{ "internalType": "uint256[]", "name": "ratios", "type": "uint256[]" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_market", "type": "address" }, { "internalType": "address", "name": "_user", "type": "address" }], "name": "getSafetyRatio", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_market", "type": "address" }, { "internalType": "address", "name": "_user", "type": "address" }, { "internalType": "address[]", "name": "_tokens", "type": "address[]" }], "name": "getTokenBalances", "outputs": [{ "components": [{ "internalType": "address", "name": "token", "type": "address" }, { "internalType": "uint256", "name": "balance", "type": "uint256" }, { "internalType": "uint256", "name": "borrowsStable", "type": "uint256" }, { "internalType": "uint256", "name": "borrowsVariable", "type": "uint256" }, { "internalType": "uint256", "name": "stableBorrowRate", "type": "uint256" }, { "internalType": "bool", "name": "enabledAsCollateral", "type": "bool" }], "internalType": "struct SparkView.UserToken[]", "name": "userTokens", "type": "tuple[]" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_market", "type": "address" }, { "internalType": "address", "name": "_tokenAddr", "type": "address" }], "name": "getTokenInfoFull", "outputs": [{ "components": [{ "internalType": "address", "name": "aTokenAddress", "type": "address" }, { "internalType": "address", "name": "underlyingTokenAddress", "type": "address" }, { "internalType": "uint16", "name": "assetId", "type": "uint16" }, { "internalType": "uint256", "name": "supplyRate", "type": "uint256" }, { "internalType": "uint256", "name": "borrowRateVariable", "type": "uint256" }, { "internalType": "uint256", "name": "borrowRateStable", "type": "uint256" }, { "internalType": "uint256", "name": "totalSupply", "type": "uint256" }, { "internalType": "uint256", "name": "availableLiquidity", "type": "uint256" }, { "internalType": "uint256", "name": "totalBorrow", "type": "uint256" }, { "internalType": "uint256", "name": "totalBorrowVar", "type": "uint256" }, { "internalType": "uint256", "name": "totalBorrowStab", "type": "uint256" }, { "internalType": "uint256", "name": "collateralFactor", "type": "uint256" }, { "internalType": "uint256", "name": "liquidationRatio", "type": "uint256" }, { "internalType": "uint256", "name": "price", "type": "uint256" }, { "internalType": "uint256", "name": "supplyCap", "type": "uint256" }, { "internalType": "uint256", "name": "borrowCap", "type": "uint256" }, { "internalType": "uint256", "name": "emodeCategory", "type": "uint256" }, { "internalType": "uint256", "name": "debtCeilingForIsolationMode", "type": "uint256" }, { "internalType": "uint256", "name": "isolationModeTotalDebt", "type": "uint256" }, { "internalType": "bool", "name": "usageAsCollateralEnabled", "type": "bool" }, { "internalType": "bool", "name": "borrowingEnabled", "type": "bool" }, { "internalType": "bool", "name": "stableBorrowRateEnabled", "type": "bool" }, { "internalType": "bool", "name": "isolationModeBorrowingEnabled", "type": "bool" }, { "internalType": "bool", "name": "isSiloedForBorrowing", "type": "bool" }, { "internalType": "uint256", "name": "eModeCollateralFactor", "type": "uint256" }, { "internalType": "bool", "name": "isFlashLoanEnabled", "type": "bool" }, { "internalType": "uint16", "name": "ltv", "type": "uint16" }, { "internalType": "uint16", "name": "liquidationThreshold", "type": "uint16" }, { "internalType": "uint16", "name": "liquidationBonus", "type": "uint16" }, { "internalType": "address", "name": "priceSource", "type": "address" }, { "internalType": "string", "name": "label", "type": "string" }, { "internalType": "bool", "name": "isActive", "type": "bool" }, { "internalType": "bool", "name": "isPaused", "type": "bool" }, { "internalType": "bool", "name": "isFrozen", "type": "bool" }], "internalType": "struct SparkView.TokenInfoFull", "name": "_tokenInfo", "type": "tuple" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_market", "type": "address" }, { "internalType": "address[]", "name": "_tokenAddresses", "type": "address[]" }], "name": "getTokensInfo", "outputs": [{ "components": [{ "internalType": "address", "name": "aTokenAddress", "type": "address" }, { "internalType": "address", "name": "underlyingTokenAddress", "type": "address" }, { "internalType": "uint256", "name": "collateralFactor", "type": "uint256" }, { "internalType": "uint256", "name": "price", "type": "uint256" }], "internalType": "struct SparkView.TokenInfo[]", "name": "tokens", "type": "tuple[]" }], "stateMutability": "view", "type": "function" }],
|
|
557
557
|
"networks": {
|
|
558
558
|
"1": {
|
|
559
|
-
"address": "
|
|
560
|
-
"createdBlock":
|
|
559
|
+
"address": "0x080f99a5E039e863EC61bbEBBc48a409E75C58F5",
|
|
560
|
+
"createdBlock": 20368470,
|
|
561
561
|
"oldVersions": {
|
|
562
|
+
"20218396": {
|
|
563
|
+
"abi": [{ "inputs": [], "name": "SPARK_REFERRAL_CODE", "outputs": [{ "internalType": "uint16", "name": "", "type": "uint16" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_market", "type": "address" }, { "components": [{ "internalType": "address", "name": "reserveAddress", "type": "address" }, { "internalType": "uint256", "name": "liquidityAdded", "type": "uint256" }, { "internalType": "uint256", "name": "liquidityTaken", "type": "uint256" }], "internalType": "struct SparkView.LiquidityChangeParams[]", "name": "_reserveParams", "type": "tuple[]" }], "name": "getApyAfterValuesEstimation", "outputs": [{ "components": [{ "internalType": "address", "name": "reserveAddress", "type": "address" }, { "internalType": "uint256", "name": "supplyRate", "type": "uint256" }, { "internalType": "uint256", "name": "variableBorrowRate", "type": "uint256" }], "internalType": "struct SparkView.EstimatedRates[]", "name": "", "type": "tuple[]" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_market", "type": "address" }, { "internalType": "address", "name": "_tokenAddr", "type": "address" }], "name": "getAssetPrice", "outputs": [{ "internalType": "uint256", "name": "price", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_market", "type": "address" }, { "internalType": "address[]", "name": "_tokens", "type": "address[]" }], "name": "getCollFactors", "outputs": [{ "internalType": "uint256[]", "name": "collFactors", "type": "uint256[]" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "emodeCategory", "type": "uint256" }, { "internalType": "contract IPoolV3", "name": "lendingPool", "type": "address" }], "name": "getEModeCollateralFactor", "outputs": [{ "internalType": "uint16", "name": "", "type": "uint16" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_market", "type": "address" }, { "internalType": "address[]", "name": "_tokenAddresses", "type": "address[]" }], "name": "getFullTokensInfo", "outputs": [{ "components": [{ "internalType": "address", "name": "aTokenAddress", "type": "address" }, { "internalType": "address", "name": "underlyingTokenAddress", "type": "address" }, { "internalType": "uint16", "name": "assetId", "type": "uint16" }, { "internalType": "uint256", "name": "supplyRate", "type": "uint256" }, { "internalType": "uint256", "name": "borrowRateVariable", "type": "uint256" }, { "internalType": "uint256", "name": "borrowRateStable", "type": "uint256" }, { "internalType": "uint256", "name": "totalSupply", "type": "uint256" }, { "internalType": "uint256", "name": "availableLiquidity", "type": "uint256" }, { "internalType": "uint256", "name": "totalBorrow", "type": "uint256" }, { "internalType": "uint256", "name": "totalBorrowVar", "type": "uint256" }, { "internalType": "uint256", "name": "totalBorrowStab", "type": "uint256" }, { "internalType": "uint256", "name": "collateralFactor", "type": "uint256" }, { "internalType": "uint256", "name": "liquidationRatio", "type": "uint256" }, { "internalType": "uint256", "name": "price", "type": "uint256" }, { "internalType": "uint256", "name": "supplyCap", "type": "uint256" }, { "internalType": "uint256", "name": "borrowCap", "type": "uint256" }, { "internalType": "uint256", "name": "emodeCategory", "type": "uint256" }, { "internalType": "uint256", "name": "debtCeilingForIsolationMode", "type": "uint256" }, { "internalType": "uint256", "name": "isolationModeTotalDebt", "type": "uint256" }, { "internalType": "bool", "name": "usageAsCollateralEnabled", "type": "bool" }, { "internalType": "bool", "name": "borrowingEnabled", "type": "bool" }, { "internalType": "bool", "name": "stableBorrowRateEnabled", "type": "bool" }, { "internalType": "bool", "name": "isolationModeBorrowingEnabled", "type": "bool" }, { "internalType": "bool", "name": "isSiloedForBorrowing", "type": "bool" }, { "internalType": "uint256", "name": "eModeCollateralFactor", "type": "uint256" }, { "internalType": "bool", "name": "isFlashLoanEnabled", "type": "bool" }, { "internalType": "uint16", "name": "ltv", "type": "uint16" }, { "internalType": "uint16", "name": "liquidationThreshold", "type": "uint16" }, { "internalType": "uint16", "name": "liquidationBonus", "type": "uint16" }, { "internalType": "address", "name": "priceSource", "type": "address" }, { "internalType": "string", "name": "label", "type": "string" }, { "internalType": "bool", "name": "isActive", "type": "bool" }, { "internalType": "bool", "name": "isPaused", "type": "bool" }, { "internalType": "bool", "name": "isFrozen", "type": "bool" }], "internalType": "struct SparkView.TokenInfoFull[]", "name": "tokens", "type": "tuple[]" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_market", "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": "_market", "type": "address" }, { "internalType": "address", "name": "_user", "type": "address" }], "name": "getLoanData", "outputs": [{ "components": [{ "internalType": "address", "name": "user", "type": "address" }, { "internalType": "uint128", "name": "ratio", "type": "uint128" }, { "internalType": "uint256", "name": "eMode", "type": "uint256" }, { "internalType": "address[]", "name": "collAddr", "type": "address[]" }, { "internalType": "bool[]", "name": "enabledAsColl", "type": "bool[]" }, { "internalType": "address[]", "name": "borrowAddr", "type": "address[]" }, { "internalType": "uint256[]", "name": "collAmounts", "type": "uint256[]" }, { "internalType": "uint256[]", "name": "borrowStableAmounts", "type": "uint256[]" }, { "internalType": "uint256[]", "name": "borrowVariableAmounts", "type": "uint256[]" }, { "internalType": "uint16", "name": "ltv", "type": "uint16" }, { "internalType": "uint16", "name": "liquidationThreshold", "type": "uint16" }, { "internalType": "uint16", "name": "liquidationBonus", "type": "uint16" }, { "internalType": "address", "name": "priceSource", "type": "address" }, { "internalType": "string", "name": "label", "type": "string" }], "internalType": "struct SparkView.LoanData", "name": "data", "type": "tuple" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_market", "type": "address" }, { "internalType": "address[]", "name": "_users", "type": "address[]" }], "name": "getLoanDataArr", "outputs": [{ "components": [{ "internalType": "address", "name": "user", "type": "address" }, { "internalType": "uint128", "name": "ratio", "type": "uint128" }, { "internalType": "uint256", "name": "eMode", "type": "uint256" }, { "internalType": "address[]", "name": "collAddr", "type": "address[]" }, { "internalType": "bool[]", "name": "enabledAsColl", "type": "bool[]" }, { "internalType": "address[]", "name": "borrowAddr", "type": "address[]" }, { "internalType": "uint256[]", "name": "collAmounts", "type": "uint256[]" }, { "internalType": "uint256[]", "name": "borrowStableAmounts", "type": "uint256[]" }, { "internalType": "uint256[]", "name": "borrowVariableAmounts", "type": "uint256[]" }, { "internalType": "uint16", "name": "ltv", "type": "uint16" }, { "internalType": "uint16", "name": "liquidationThreshold", "type": "uint16" }, { "internalType": "uint16", "name": "liquidationBonus", "type": "uint16" }, { "internalType": "address", "name": "priceSource", "type": "address" }, { "internalType": "string", "name": "label", "type": "string" }], "internalType": "struct SparkView.LoanData[]", "name": "loans", "type": "tuple[]" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "components": [{ "internalType": "uint256", "name": "data", "type": "uint256" }], "internalType": "struct DataTypes.ReserveConfigurationMap", "name": "self", "type": "tuple" }], "name": "getLtv", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "pure", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_market", "type": "address" }, { "internalType": "address[]", "name": "_tokens", "type": "address[]" }], "name": "getPrices", "outputs": [{ "internalType": "uint256[]", "name": "prices", "type": "uint256[]" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_market", "type": "address" }, { "internalType": "address", "name": "_user", "type": "address" }], "name": "getRatio", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_market", "type": "address" }, { "internalType": "address[]", "name": "_users", "type": "address[]" }], "name": "getRatios", "outputs": [{ "internalType": "uint256[]", "name": "ratios", "type": "uint256[]" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_market", "type": "address" }, { "internalType": "address", "name": "_user", "type": "address" }], "name": "getSafetyRatio", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_market", "type": "address" }, { "internalType": "address", "name": "_user", "type": "address" }, { "internalType": "address[]", "name": "_tokens", "type": "address[]" }], "name": "getTokenBalances", "outputs": [{ "components": [{ "internalType": "address", "name": "token", "type": "address" }, { "internalType": "uint256", "name": "balance", "type": "uint256" }, { "internalType": "uint256", "name": "borrowsStable", "type": "uint256" }, { "internalType": "uint256", "name": "borrowsVariable", "type": "uint256" }, { "internalType": "uint256", "name": "stableBorrowRate", "type": "uint256" }, { "internalType": "bool", "name": "enabledAsCollateral", "type": "bool" }], "internalType": "struct SparkView.UserToken[]", "name": "userTokens", "type": "tuple[]" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_market", "type": "address" }, { "internalType": "address", "name": "_tokenAddr", "type": "address" }], "name": "getTokenInfoFull", "outputs": [{ "components": [{ "internalType": "address", "name": "aTokenAddress", "type": "address" }, { "internalType": "address", "name": "underlyingTokenAddress", "type": "address" }, { "internalType": "uint16", "name": "assetId", "type": "uint16" }, { "internalType": "uint256", "name": "supplyRate", "type": "uint256" }, { "internalType": "uint256", "name": "borrowRateVariable", "type": "uint256" }, { "internalType": "uint256", "name": "borrowRateStable", "type": "uint256" }, { "internalType": "uint256", "name": "totalSupply", "type": "uint256" }, { "internalType": "uint256", "name": "availableLiquidity", "type": "uint256" }, { "internalType": "uint256", "name": "totalBorrow", "type": "uint256" }, { "internalType": "uint256", "name": "totalBorrowVar", "type": "uint256" }, { "internalType": "uint256", "name": "totalBorrowStab", "type": "uint256" }, { "internalType": "uint256", "name": "collateralFactor", "type": "uint256" }, { "internalType": "uint256", "name": "liquidationRatio", "type": "uint256" }, { "internalType": "uint256", "name": "price", "type": "uint256" }, { "internalType": "uint256", "name": "supplyCap", "type": "uint256" }, { "internalType": "uint256", "name": "borrowCap", "type": "uint256" }, { "internalType": "uint256", "name": "emodeCategory", "type": "uint256" }, { "internalType": "uint256", "name": "debtCeilingForIsolationMode", "type": "uint256" }, { "internalType": "uint256", "name": "isolationModeTotalDebt", "type": "uint256" }, { "internalType": "bool", "name": "usageAsCollateralEnabled", "type": "bool" }, { "internalType": "bool", "name": "borrowingEnabled", "type": "bool" }, { "internalType": "bool", "name": "stableBorrowRateEnabled", "type": "bool" }, { "internalType": "bool", "name": "isolationModeBorrowingEnabled", "type": "bool" }, { "internalType": "bool", "name": "isSiloedForBorrowing", "type": "bool" }, { "internalType": "uint256", "name": "eModeCollateralFactor", "type": "uint256" }, { "internalType": "bool", "name": "isFlashLoanEnabled", "type": "bool" }, { "internalType": "uint16", "name": "ltv", "type": "uint16" }, { "internalType": "uint16", "name": "liquidationThreshold", "type": "uint16" }, { "internalType": "uint16", "name": "liquidationBonus", "type": "uint16" }, { "internalType": "address", "name": "priceSource", "type": "address" }, { "internalType": "string", "name": "label", "type": "string" }, { "internalType": "bool", "name": "isActive", "type": "bool" }, { "internalType": "bool", "name": "isPaused", "type": "bool" }, { "internalType": "bool", "name": "isFrozen", "type": "bool" }], "internalType": "struct SparkView.TokenInfoFull", "name": "_tokenInfo", "type": "tuple" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_market", "type": "address" }, { "internalType": "address[]", "name": "_tokenAddresses", "type": "address[]" }], "name": "getTokensInfo", "outputs": [{ "components": [{ "internalType": "address", "name": "aTokenAddress", "type": "address" }, { "internalType": "address", "name": "underlyingTokenAddress", "type": "address" }, { "internalType": "uint256", "name": "collateralFactor", "type": "uint256" }, { "internalType": "uint256", "name": "price", "type": "uint256" }], "internalType": "struct SparkView.TokenInfo[]", "name": "tokens", "type": "tuple[]" }], "stateMutability": "view", "type": "function" }],
|
|
564
|
+
"address": "0xD3780b6A694C3573C669A10bc10f61e3401412B8",
|
|
565
|
+
},
|
|
562
566
|
"17870357": {
|
|
563
567
|
"abi": [{ "inputs": [], "name": "SPARK_REFERRAL_CODE", "outputs": [{ "internalType": "uint16", "name": "", "type": "uint16" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "STABLE_ID", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "VARIABLE_ID", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_market", "type": "address" }, { "internalType": "address", "name": "_tokenAddr", "type": "address" }], "name": "getAssetPrice", "outputs": [{ "internalType": "uint256", "name": "price", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_market", "type": "address" }, { "internalType": "address[]", "name": "_tokens", "type": "address[]" }], "name": "getCollFactors", "outputs": [{ "internalType": "uint256[]", "name": "collFactors", "type": "uint256[]" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "emodeCategory", "type": "uint256" }, { "internalType": "contract IPoolV3", "name": "lendingPool", "type": "address" }], "name": "getEModeCollateralFactor", "outputs": [{ "internalType": "uint16", "name": "", "type": "uint16" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_market", "type": "address" }, { "internalType": "address[]", "name": "_tokenAddresses", "type": "address[]" }], "name": "getFullTokensInfo", "outputs": [{ "components": [{ "internalType": "address", "name": "aTokenAddress", "type": "address" }, { "internalType": "address", "name": "underlyingTokenAddress", "type": "address" }, { "internalType": "uint16", "name": "assetId", "type": "uint16" }, { "internalType": "uint256", "name": "supplyRate", "type": "uint256" }, { "internalType": "uint256", "name": "borrowRateVariable", "type": "uint256" }, { "internalType": "uint256", "name": "borrowRateStable", "type": "uint256" }, { "internalType": "uint256", "name": "totalSupply", "type": "uint256" }, { "internalType": "uint256", "name": "availableLiquidity", "type": "uint256" }, { "internalType": "uint256", "name": "totalBorrow", "type": "uint256" }, { "internalType": "uint256", "name": "totalBorrowVar", "type": "uint256" }, { "internalType": "uint256", "name": "totalBorrowStab", "type": "uint256" }, { "internalType": "uint256", "name": "collateralFactor", "type": "uint256" }, { "internalType": "uint256", "name": "liquidationRatio", "type": "uint256" }, { "internalType": "uint256", "name": "price", "type": "uint256" }, { "internalType": "uint256", "name": "supplyCap", "type": "uint256" }, { "internalType": "uint256", "name": "borrowCap", "type": "uint256" }, { "internalType": "uint256", "name": "emodeCategory", "type": "uint256" }, { "internalType": "uint256", "name": "debtCeilingForIsolationMode", "type": "uint256" }, { "internalType": "uint256", "name": "isolationModeTotalDebt", "type": "uint256" }, { "internalType": "bool", "name": "usageAsCollateralEnabled", "type": "bool" }, { "internalType": "bool", "name": "borrowingEnabled", "type": "bool" }, { "internalType": "bool", "name": "stableBorrowRateEnabled", "type": "bool" }, { "internalType": "bool", "name": "isolationModeBorrowingEnabled", "type": "bool" }, { "internalType": "bool", "name": "isSiloedForBorrowing", "type": "bool" }, { "internalType": "uint256", "name": "eModeCollateralFactor", "type": "uint256" }, { "internalType": "bool", "name": "isFlashLoanEnabled", "type": "bool" }, { "internalType": "uint16", "name": "ltv", "type": "uint16" }, { "internalType": "uint16", "name": "liquidationThreshold", "type": "uint16" }, { "internalType": "uint16", "name": "liquidationBonus", "type": "uint16" }, { "internalType": "address", "name": "priceSource", "type": "address" }, { "internalType": "string", "name": "label", "type": "string" }, { "internalType": "bool", "name": "isActive", "type": "bool" }, { "internalType": "bool", "name": "isPaused", "type": "bool" }, { "internalType": "bool", "name": "isFrozen", "type": "bool" }], "internalType": "struct SparkView.TokenInfoFull[]", "name": "tokens", "type": "tuple[]" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_market", "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": "_market", "type": "address" }, { "internalType": "address", "name": "_user", "type": "address" }], "name": "getLoanData", "outputs": [{ "components": [{ "internalType": "address", "name": "user", "type": "address" }, { "internalType": "uint128", "name": "ratio", "type": "uint128" }, { "internalType": "uint256", "name": "eMode", "type": "uint256" }, { "internalType": "address[]", "name": "collAddr", "type": "address[]" }, { "internalType": "address[]", "name": "borrowAddr", "type": "address[]" }, { "internalType": "uint256[]", "name": "collAmounts", "type": "uint256[]" }, { "internalType": "uint256[]", "name": "borrowStableAmounts", "type": "uint256[]" }, { "internalType": "uint256[]", "name": "borrowVariableAmounts", "type": "uint256[]" }, { "internalType": "uint16", "name": "ltv", "type": "uint16" }, { "internalType": "uint16", "name": "liquidationThreshold", "type": "uint16" }, { "internalType": "uint16", "name": "liquidationBonus", "type": "uint16" }, { "internalType": "address", "name": "priceSource", "type": "address" }, { "internalType": "string", "name": "label", "type": "string" }], "internalType": "struct SparkView.LoanData", "name": "data", "type": "tuple" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_market", "type": "address" }, { "internalType": "address[]", "name": "_users", "type": "address[]" }], "name": "getLoanDataArr", "outputs": [{ "components": [{ "internalType": "address", "name": "user", "type": "address" }, { "internalType": "uint128", "name": "ratio", "type": "uint128" }, { "internalType": "uint256", "name": "eMode", "type": "uint256" }, { "internalType": "address[]", "name": "collAddr", "type": "address[]" }, { "internalType": "address[]", "name": "borrowAddr", "type": "address[]" }, { "internalType": "uint256[]", "name": "collAmounts", "type": "uint256[]" }, { "internalType": "uint256[]", "name": "borrowStableAmounts", "type": "uint256[]" }, { "internalType": "uint256[]", "name": "borrowVariableAmounts", "type": "uint256[]" }, { "internalType": "uint16", "name": "ltv", "type": "uint16" }, { "internalType": "uint16", "name": "liquidationThreshold", "type": "uint16" }, { "internalType": "uint16", "name": "liquidationBonus", "type": "uint16" }, { "internalType": "address", "name": "priceSource", "type": "address" }, { "internalType": "string", "name": "label", "type": "string" }], "internalType": "struct SparkView.LoanData[]", "name": "loans", "type": "tuple[]" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "components": [{ "internalType": "uint256", "name": "data", "type": "uint256" }], "internalType": "struct DataTypes.ReserveConfigurationMap", "name": "self", "type": "tuple" }], "name": "getLtv", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "pure", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_market", "type": "address" }, { "internalType": "address[]", "name": "_tokens", "type": "address[]" }], "name": "getPrices", "outputs": [{ "internalType": "uint256[]", "name": "prices", "type": "uint256[]" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_market", "type": "address" }, { "internalType": "address", "name": "_user", "type": "address" }], "name": "getRatio", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_market", "type": "address" }, { "internalType": "address[]", "name": "_users", "type": "address[]" }], "name": "getRatios", "outputs": [{ "internalType": "uint256[]", "name": "ratios", "type": "uint256[]" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_market", "type": "address" }, { "internalType": "address", "name": "_user", "type": "address" }], "name": "getSafetyRatio", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_market", "type": "address" }, { "internalType": "address", "name": "_user", "type": "address" }, { "internalType": "address[]", "name": "_tokens", "type": "address[]" }], "name": "getTokenBalances", "outputs": [{ "components": [{ "internalType": "address", "name": "token", "type": "address" }, { "internalType": "uint256", "name": "balance", "type": "uint256" }, { "internalType": "uint256", "name": "borrowsStable", "type": "uint256" }, { "internalType": "uint256", "name": "borrowsVariable", "type": "uint256" }, { "internalType": "uint256", "name": "stableBorrowRate", "type": "uint256" }, { "internalType": "bool", "name": "enabledAsCollateral", "type": "bool" }], "internalType": "struct SparkView.UserToken[]", "name": "userTokens", "type": "tuple[]" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_market", "type": "address" }, { "internalType": "address", "name": "_tokenAddr", "type": "address" }], "name": "getTokenInfoFull", "outputs": [{ "components": [{ "internalType": "address", "name": "aTokenAddress", "type": "address" }, { "internalType": "address", "name": "underlyingTokenAddress", "type": "address" }, { "internalType": "uint16", "name": "assetId", "type": "uint16" }, { "internalType": "uint256", "name": "supplyRate", "type": "uint256" }, { "internalType": "uint256", "name": "borrowRateVariable", "type": "uint256" }, { "internalType": "uint256", "name": "borrowRateStable", "type": "uint256" }, { "internalType": "uint256", "name": "totalSupply", "type": "uint256" }, { "internalType": "uint256", "name": "availableLiquidity", "type": "uint256" }, { "internalType": "uint256", "name": "totalBorrow", "type": "uint256" }, { "internalType": "uint256", "name": "totalBorrowVar", "type": "uint256" }, { "internalType": "uint256", "name": "totalBorrowStab", "type": "uint256" }, { "internalType": "uint256", "name": "collateralFactor", "type": "uint256" }, { "internalType": "uint256", "name": "liquidationRatio", "type": "uint256" }, { "internalType": "uint256", "name": "price", "type": "uint256" }, { "internalType": "uint256", "name": "supplyCap", "type": "uint256" }, { "internalType": "uint256", "name": "borrowCap", "type": "uint256" }, { "internalType": "uint256", "name": "emodeCategory", "type": "uint256" }, { "internalType": "uint256", "name": "debtCeilingForIsolationMode", "type": "uint256" }, { "internalType": "uint256", "name": "isolationModeTotalDebt", "type": "uint256" }, { "internalType": "bool", "name": "usageAsCollateralEnabled", "type": "bool" }, { "internalType": "bool", "name": "borrowingEnabled", "type": "bool" }, { "internalType": "bool", "name": "stableBorrowRateEnabled", "type": "bool" }, { "internalType": "bool", "name": "isolationModeBorrowingEnabled", "type": "bool" }, { "internalType": "bool", "name": "isSiloedForBorrowing", "type": "bool" }, { "internalType": "uint256", "name": "eModeCollateralFactor", "type": "uint256" }, { "internalType": "bool", "name": "isFlashLoanEnabled", "type": "bool" }, { "internalType": "uint16", "name": "ltv", "type": "uint16" }, { "internalType": "uint16", "name": "liquidationThreshold", "type": "uint16" }, { "internalType": "uint16", "name": "liquidationBonus", "type": "uint16" }, { "internalType": "address", "name": "priceSource", "type": "address" }, { "internalType": "string", "name": "label", "type": "string" }, { "internalType": "bool", "name": "isActive", "type": "bool" }, { "internalType": "bool", "name": "isPaused", "type": "bool" }, { "internalType": "bool", "name": "isFrozen", "type": "bool" }], "internalType": "struct SparkView.TokenInfoFull", "name": "_tokenInfo", "type": "tuple" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_market", "type": "address" }, { "internalType": "address[]", "name": "_tokenAddresses", "type": "address[]" }], "name": "getTokensInfo", "outputs": [{ "components": [{ "internalType": "address", "name": "aTokenAddress", "type": "address" }, { "internalType": "address", "name": "underlyingTokenAddress", "type": "address" }, { "internalType": "uint256", "name": "collateralFactor", "type": "uint256" }, { "internalType": "uint256", "name": "price", "type": "uint256" }], "internalType": "struct SparkView.TokenInfo[]", "name": "tokens", "type": "tuple[]" }], "stateMutability": "view", "type": "function" }],
|
|
564
568
|
"address": "0xB3B13838F6F57CE76b94f0744Ab0B045B780836e"
|
|
@@ -862,11 +866,25 @@ module.exports = {
|
|
|
862
866
|
"networks": {
|
|
863
867
|
"1": {
|
|
864
868
|
"address": "0x10B621823D4f3E85fBDF759e252598e4e097C1fd",
|
|
869
|
+
"createdBlock": 20219255,
|
|
870
|
+
"oldVersions": {
|
|
871
|
+
"18976639": {
|
|
872
|
+
"abi": [{ "inputs": [], "name": "MORPHO_BLUE_ADDRESS", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "components": [{ "internalType": "address", "name": "loanToken", "type": "address" }, { "internalType": "address", "name": "collateralToken", "type": "address" }, { "internalType": "address", "name": "oracle", "type": "address" }, { "internalType": "address", "name": "irm", "type": "address" }, { "internalType": "uint256", "name": "lltv", "type": "uint256" }], "internalType": "struct MarketParams", "name": "marketParams", "type": "tuple" }], "name": "getMarketId", "outputs": [{ "internalType": "Id", "name": "id", "type": "bytes32" }], "stateMutability": "pure", "type": "function" }, { "inputs": [{ "components": [{ "internalType": "address", "name": "loanToken", "type": "address" }, { "internalType": "address", "name": "collateralToken", "type": "address" }, { "internalType": "address", "name": "oracle", "type": "address" }, { "internalType": "address", "name": "irm", "type": "address" }, { "internalType": "uint256", "name": "lltv", "type": "uint256" }], "internalType": "struct MarketParams", "name": "marketParams", "type": "tuple" }], "name": "getMarketInfo", "outputs": [{ "components": [{ "internalType": "Id", "name": "id", "type": "bytes32" }, { "internalType": "uint128", "name": "totalSupplyAssets", "type": "uint128" }, { "internalType": "uint128", "name": "totalSupplyShares", "type": "uint128" }, { "internalType": "uint128", "name": "totalBorrowAssets", "type": "uint128" }, { "internalType": "uint128", "name": "totalBorrowShares", "type": "uint128" }, { "internalType": "uint256", "name": "lastUpdate", "type": "uint256" }, { "internalType": "uint256", "name": "fee", "type": "uint256" }, { "internalType": "uint256", "name": "borrowRate", "type": "uint256" }, { "internalType": "uint256", "name": "oracle", "type": "uint256" }], "internalType": "struct MorphoBlueView.MarketInfo", "name": "", "type": "tuple" }], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "loanToken", "type": "address" }, { "internalType": "address", "name": "collToken", "type": "address" }, { "internalType": "address", "name": "oracle", "type": "address" }, { "internalType": "address", "name": "irm", "type": "address" }, { "internalType": "uint256", "name": "lltv", "type": "uint256" }], "name": "getMarketInfoNotTuple", "outputs": [{ "components": [{ "internalType": "Id", "name": "id", "type": "bytes32" }, { "internalType": "uint128", "name": "totalSupplyAssets", "type": "uint128" }, { "internalType": "uint128", "name": "totalSupplyShares", "type": "uint128" }, { "internalType": "uint128", "name": "totalBorrowAssets", "type": "uint128" }, { "internalType": "uint128", "name": "totalBorrowShares", "type": "uint128" }, { "internalType": "uint256", "name": "lastUpdate", "type": "uint256" }, { "internalType": "uint256", "name": "fee", "type": "uint256" }, { "internalType": "uint256", "name": "borrowRate", "type": "uint256" }, { "internalType": "uint256", "name": "oracle", "type": "uint256" }], "internalType": "struct MorphoBlueView.MarketInfo", "name": "", "type": "tuple" }], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "components": [{ "internalType": "address", "name": "loanToken", "type": "address" }, { "internalType": "address", "name": "collateralToken", "type": "address" }, { "internalType": "address", "name": "oracle", "type": "address" }, { "internalType": "address", "name": "irm", "type": "address" }, { "internalType": "uint256", "name": "lltv", "type": "uint256" }], "internalType": "struct MarketParams", "name": "marketParams", "type": "tuple" }, { "internalType": "address", "name": "owner", "type": "address" }], "name": "getUserInfo", "outputs": [{ "components": [{ "internalType": "uint256", "name": "supplyShares", "type": "uint256" }, { "internalType": "uint256", "name": "suppliedInAssets", "type": "uint256" }, { "internalType": "uint256", "name": "borrowShares", "type": "uint256" }, { "internalType": "uint256", "name": "borrowedInAssets", "type": "uint256" }, { "internalType": "uint256", "name": "collateral", "type": "uint256" }], "internalType": "struct MorphoBlueView.PositionInfo", "name": "", "type": "tuple" }], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "morphoBlue", "outputs": [{ "internalType": "contract IMorphoBlue", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }],
|
|
873
|
+
"address": "0xE29175a86B60138403a9534A391acaDb19f1E9a6",
|
|
874
|
+
},
|
|
875
|
+
},
|
|
865
876
|
},
|
|
866
877
|
"8453": {
|
|
867
878
|
"address": "0x53c0E962bd0AC53928ca04703238b2ec2894195B",
|
|
879
|
+
"createdBlock": 16569740,
|
|
880
|
+
"oldVersions": {
|
|
881
|
+
"14527939": {
|
|
882
|
+
"abi": [{ "inputs": [], "name": "MORPHO_BLUE_ADDRESS", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "components": [{ "internalType": "address", "name": "loanToken", "type": "address" }, { "internalType": "address", "name": "collateralToken", "type": "address" }, { "internalType": "address", "name": "oracle", "type": "address" }, { "internalType": "address", "name": "irm", "type": "address" }, { "internalType": "uint256", "name": "lltv", "type": "uint256" }], "internalType": "struct MarketParams", "name": "marketParams", "type": "tuple" }], "name": "getMarketId", "outputs": [{ "internalType": "Id", "name": "id", "type": "bytes32" }], "stateMutability": "pure", "type": "function" }, { "inputs": [{ "components": [{ "internalType": "address", "name": "loanToken", "type": "address" }, { "internalType": "address", "name": "collateralToken", "type": "address" }, { "internalType": "address", "name": "oracle", "type": "address" }, { "internalType": "address", "name": "irm", "type": "address" }, { "internalType": "uint256", "name": "lltv", "type": "uint256" }], "internalType": "struct MarketParams", "name": "marketParams", "type": "tuple" }], "name": "getMarketInfo", "outputs": [{ "components": [{ "internalType": "Id", "name": "id", "type": "bytes32" }, { "internalType": "uint128", "name": "totalSupplyAssets", "type": "uint128" }, { "internalType": "uint128", "name": "totalSupplyShares", "type": "uint128" }, { "internalType": "uint128", "name": "totalBorrowAssets", "type": "uint128" }, { "internalType": "uint128", "name": "totalBorrowShares", "type": "uint128" }, { "internalType": "uint256", "name": "lastUpdate", "type": "uint256" }, { "internalType": "uint256", "name": "fee", "type": "uint256" }, { "internalType": "uint256", "name": "borrowRate", "type": "uint256" }, { "internalType": "uint256", "name": "oracle", "type": "uint256" }], "internalType": "struct MorphoBlueView.MarketInfo", "name": "", "type": "tuple" }], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "loanToken", "type": "address" }, { "internalType": "address", "name": "collToken", "type": "address" }, { "internalType": "address", "name": "oracle", "type": "address" }, { "internalType": "address", "name": "irm", "type": "address" }, { "internalType": "uint256", "name": "lltv", "type": "uint256" }], "name": "getMarketInfoNotTuple", "outputs": [{ "components": [{ "internalType": "Id", "name": "id", "type": "bytes32" }, { "internalType": "uint128", "name": "totalSupplyAssets", "type": "uint128" }, { "internalType": "uint128", "name": "totalSupplyShares", "type": "uint128" }, { "internalType": "uint128", "name": "totalBorrowAssets", "type": "uint128" }, { "internalType": "uint128", "name": "totalBorrowShares", "type": "uint128" }, { "internalType": "uint256", "name": "lastUpdate", "type": "uint256" }, { "internalType": "uint256", "name": "fee", "type": "uint256" }, { "internalType": "uint256", "name": "borrowRate", "type": "uint256" }, { "internalType": "uint256", "name": "oracle", "type": "uint256" }], "internalType": "struct MorphoBlueView.MarketInfo", "name": "", "type": "tuple" }], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "components": [{ "internalType": "address", "name": "loanToken", "type": "address" }, { "internalType": "address", "name": "collateralToken", "type": "address" }, { "internalType": "address", "name": "oracle", "type": "address" }, { "internalType": "address", "name": "irm", "type": "address" }, { "internalType": "uint256", "name": "lltv", "type": "uint256" }], "internalType": "struct MarketParams", "name": "marketParams", "type": "tuple" }, { "internalType": "address", "name": "owner", "type": "address" }], "name": "getUserInfo", "outputs": [{ "components": [{ "internalType": "uint256", "name": "supplyShares", "type": "uint256" }, { "internalType": "uint256", "name": "suppliedInAssets", "type": "uint256" }, { "internalType": "uint256", "name": "borrowShares", "type": "uint256" }, { "internalType": "uint256", "name": "borrowedInAssets", "type": "uint256" }, { "internalType": "uint256", "name": "collateral", "type": "uint256" }], "internalType": "struct MorphoBlueView.PositionInfo", "name": "", "type": "tuple" }], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "morphoBlue", "outputs": [{ "internalType": "contract IMorphoBlue", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }],
|
|
883
|
+
"address": "0xDBCACF59C5063da8B15481F88E7D70E13c92f2a1",
|
|
884
|
+
},
|
|
885
|
+
},
|
|
868
886
|
}
|
|
869
|
-
}
|
|
887
|
+
},
|
|
870
888
|
},
|
|
871
889
|
"FeedRegistry": {
|
|
872
890
|
"abi": [{ "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "accessController", "type": "address" }, { "indexed": true, "internalType": "address", "name": "sender", "type": "address" }], "name": "AccessControllerSet", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "asset", "type": "address" }, { "indexed": true, "internalType": "address", "name": "denomination", "type": "address" }, { "indexed": true, "internalType": "address", "name": "latestAggregator", "type": "address" }, { "indexed": false, "internalType": "address", "name": "previousAggregator", "type": "address" }, { "indexed": false, "internalType": "uint16", "name": "nextPhaseId", "type": "uint16" }, { "indexed": false, "internalType": "address", "name": "sender", "type": "address" }], "name": "FeedConfirmed", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "asset", "type": "address" }, { "indexed": true, "internalType": "address", "name": "denomination", "type": "address" }, { "indexed": true, "internalType": "address", "name": "proposedAggregator", "type": "address" }, { "indexed": false, "internalType": "address", "name": "currentAggregator", "type": "address" }, { "indexed": false, "internalType": "address", "name": "sender", "type": "address" }], "name": "FeedProposed", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "from", "type": "address" }, { "indexed": true, "internalType": "address", "name": "to", "type": "address" }], "name": "OwnershipTransferRequested", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "from", "type": "address" }, { "indexed": true, "internalType": "address", "name": "to", "type": "address" }], "name": "OwnershipTransferred", "type": "event" }, { "inputs": [], "name": "acceptOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "base", "type": "address" }, { "internalType": "address", "name": "quote", "type": "address" }, { "internalType": "address", "name": "aggregator", "type": "address" }], "name": "confirmFeed", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "base", "type": "address" }, { "internalType": "address", "name": "quote", "type": "address" }], "name": "decimals", "outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "base", "type": "address" }, { "internalType": "address", "name": "quote", "type": "address" }], "name": "description", "outputs": [{ "internalType": "string", "name": "", "type": "string" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getAccessController", "outputs": [{ "internalType": "contract AccessControllerInterface", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "base", "type": "address" }, { "internalType": "address", "name": "quote", "type": "address" }, { "internalType": "uint256", "name": "roundId", "type": "uint256" }], "name": "getAnswer", "outputs": [{ "internalType": "int256", "name": "answer", "type": "int256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "base", "type": "address" }, { "internalType": "address", "name": "quote", "type": "address" }], "name": "getCurrentPhaseId", "outputs": [{ "internalType": "uint16", "name": "currentPhaseId", "type": "uint16" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "base", "type": "address" }, { "internalType": "address", "name": "quote", "type": "address" }], "name": "getFeed", "outputs": [{ "internalType": "contract AggregatorV2V3Interface", "name": "aggregator", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "base", "type": "address" }, { "internalType": "address", "name": "quote", "type": "address" }, { "internalType": "uint80", "name": "roundId", "type": "uint80" }], "name": "getNextRoundId", "outputs": [{ "internalType": "uint80", "name": "nextRoundId", "type": "uint80" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "base", "type": "address" }, { "internalType": "address", "name": "quote", "type": "address" }, { "internalType": "uint16", "name": "phaseId", "type": "uint16" }], "name": "getPhase", "outputs": [{ "components": [{ "internalType": "uint16", "name": "phaseId", "type": "uint16" }, { "internalType": "uint80", "name": "startingAggregatorRoundId", "type": "uint80" }, { "internalType": "uint80", "name": "endingAggregatorRoundId", "type": "uint80" }], "internalType": "struct FeedRegistryInterface.Phase", "name": "phase", "type": "tuple" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "base", "type": "address" }, { "internalType": "address", "name": "quote", "type": "address" }, { "internalType": "uint16", "name": "phaseId", "type": "uint16" }], "name": "getPhaseFeed", "outputs": [{ "internalType": "contract AggregatorV2V3Interface", "name": "aggregator", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "base", "type": "address" }, { "internalType": "address", "name": "quote", "type": "address" }, { "internalType": "uint16", "name": "phaseId", "type": "uint16" }], "name": "getPhaseRange", "outputs": [{ "internalType": "uint80", "name": "startingRoundId", "type": "uint80" }, { "internalType": "uint80", "name": "endingRoundId", "type": "uint80" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "base", "type": "address" }, { "internalType": "address", "name": "quote", "type": "address" }, { "internalType": "uint80", "name": "roundId", "type": "uint80" }], "name": "getPreviousRoundId", "outputs": [{ "internalType": "uint80", "name": "previousRoundId", "type": "uint80" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "base", "type": "address" }, { "internalType": "address", "name": "quote", "type": "address" }], "name": "getProposedFeed", "outputs": [{ "internalType": "contract AggregatorV2V3Interface", "name": "proposedAggregator", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "base", "type": "address" }, { "internalType": "address", "name": "quote", "type": "address" }, { "internalType": "uint80", "name": "_roundId", "type": "uint80" }], "name": "getRoundData", "outputs": [{ "internalType": "uint80", "name": "roundId", "type": "uint80" }, { "internalType": "int256", "name": "answer", "type": "int256" }, { "internalType": "uint256", "name": "startedAt", "type": "uint256" }, { "internalType": "uint256", "name": "updatedAt", "type": "uint256" }, { "internalType": "uint80", "name": "answeredInRound", "type": "uint80" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "base", "type": "address" }, { "internalType": "address", "name": "quote", "type": "address" }, { "internalType": "uint80", "name": "roundId", "type": "uint80" }], "name": "getRoundFeed", "outputs": [{ "internalType": "contract AggregatorV2V3Interface", "name": "aggregator", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "base", "type": "address" }, { "internalType": "address", "name": "quote", "type": "address" }, { "internalType": "uint256", "name": "roundId", "type": "uint256" }], "name": "getTimestamp", "outputs": [{ "internalType": "uint256", "name": "timestamp", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "aggregator", "type": "address" }], "name": "isFeedEnabled", "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "base", "type": "address" }, { "internalType": "address", "name": "quote", "type": "address" }], "name": "latestAnswer", "outputs": [{ "internalType": "int256", "name": "answer", "type": "int256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "base", "type": "address" }, { "internalType": "address", "name": "quote", "type": "address" }], "name": "latestRound", "outputs": [{ "internalType": "uint256", "name": "roundId", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "base", "type": "address" }, { "internalType": "address", "name": "quote", "type": "address" }], "name": "latestRoundData", "outputs": [{ "internalType": "uint80", "name": "roundId", "type": "uint80" }, { "internalType": "int256", "name": "answer", "type": "int256" }, { "internalType": "uint256", "name": "startedAt", "type": "uint256" }, { "internalType": "uint256", "name": "updatedAt", "type": "uint256" }, { "internalType": "uint80", "name": "answeredInRound", "type": "uint80" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "base", "type": "address" }, { "internalType": "address", "name": "quote", "type": "address" }], "name": "latestTimestamp", "outputs": [{ "internalType": "uint256", "name": "timestamp", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "owner", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "base", "type": "address" }, { "internalType": "address", "name": "quote", "type": "address" }, { "internalType": "address", "name": "aggregator", "type": "address" }], "name": "proposeFeed", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "base", "type": "address" }, { "internalType": "address", "name": "quote", "type": "address" }, { "internalType": "uint80", "name": "roundId", "type": "uint80" }], "name": "proposedGetRoundData", "outputs": [{ "internalType": "uint80", "name": "id", "type": "uint80" }, { "internalType": "int256", "name": "answer", "type": "int256" }, { "internalType": "uint256", "name": "startedAt", "type": "uint256" }, { "internalType": "uint256", "name": "updatedAt", "type": "uint256" }, { "internalType": "uint80", "name": "answeredInRound", "type": "uint80" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "base", "type": "address" }, { "internalType": "address", "name": "quote", "type": "address" }], "name": "proposedLatestRoundData", "outputs": [{ "internalType": "uint80", "name": "id", "type": "uint80" }, { "internalType": "int256", "name": "answer", "type": "int256" }, { "internalType": "uint256", "name": "startedAt", "type": "uint256" }, { "internalType": "uint256", "name": "updatedAt", "type": "uint256" }, { "internalType": "uint80", "name": "answeredInRound", "type": "uint80" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "contract AccessControllerInterface", "name": "_accessController", "type": "address" }], "name": "setAccessController", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "to", "type": "address" }], "name": "transferOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "typeAndVersion", "outputs": [{ "internalType": "string", "name": "", "type": "string" }], "stateMutability": "pure", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "base", "type": "address" }, { "internalType": "address", "name": "quote", "type": "address" }], "name": "version", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }],
|
package/cjs/constants/index.d.ts
CHANGED
|
@@ -4,3 +4,4 @@ export declare const BLOCKS_IN_A_YEAR: number;
|
|
|
4
4
|
export declare const ZERO_ADDRESS = "0x0000000000000000000000000000000000000000";
|
|
5
5
|
export declare const WAD = 1000000000000000000;
|
|
6
6
|
export declare const USD_QUOTE = "0x0000000000000000000000000000000000000348";
|
|
7
|
+
export declare const borrowOperations: string[];
|
package/cjs/constants/index.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.USD_QUOTE = exports.WAD = exports.ZERO_ADDRESS = exports.BLOCKS_IN_A_YEAR = exports.AVG_BLOCK_TIME = exports.SECONDS_PER_YEAR = void 0;
|
|
3
|
+
exports.borrowOperations = exports.USD_QUOTE = exports.WAD = exports.ZERO_ADDRESS = exports.BLOCKS_IN_A_YEAR = exports.AVG_BLOCK_TIME = exports.SECONDS_PER_YEAR = void 0;
|
|
4
4
|
exports.SECONDS_PER_YEAR = 365 * 24 * 60 * 60;
|
|
5
5
|
exports.AVG_BLOCK_TIME = 12;
|
|
6
6
|
exports.BLOCKS_IN_A_YEAR = exports.SECONDS_PER_YEAR / exports.AVG_BLOCK_TIME;
|
|
7
7
|
exports.ZERO_ADDRESS = '0x0000000000000000000000000000000000000000';
|
|
8
8
|
exports.WAD = 1e18;
|
|
9
9
|
exports.USD_QUOTE = '0x0000000000000000000000000000000000000348';
|
|
10
|
+
exports.borrowOperations = ['borrow', 'payback'];
|
|
@@ -83,12 +83,11 @@ const getBorrowRate = (borrowRate, totalBorrowShares) => {
|
|
|
83
83
|
return new decimal_js_1.default(compound(borrowRate)).div(1e18).mul(100).toString();
|
|
84
84
|
};
|
|
85
85
|
exports.getBorrowRate = getBorrowRate;
|
|
86
|
-
const borrowOperations = ['borrow', 'payback'];
|
|
87
86
|
const getApyAfterValuesEstimation = (selectedMarket, action, amount, asset, web3, network) => __awaiter(void 0, void 0, void 0, function* () {
|
|
88
87
|
const morphoBlueViewContract = (0, contracts_1.MorphoBlueViewContract)(web3, network);
|
|
89
88
|
const lltvInWei = (0, tokens_1.assetAmountInWei)(selectedMarket.lltv, 'ETH');
|
|
90
89
|
const marketData = [selectedMarket.loanToken, selectedMarket.collateralToken, selectedMarket.oracle, selectedMarket.irm, lltvInWei];
|
|
91
|
-
const isBorrowOperation = borrowOperations.includes(action);
|
|
90
|
+
const isBorrowOperation = constants_1.borrowOperations.includes(action);
|
|
92
91
|
const amountInWei = (0, tokens_1.assetAmountInWei)(amount, asset);
|
|
93
92
|
let liquidityAdded;
|
|
94
93
|
let liquidityRemoved;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import Web3 from 'web3';
|
|
2
|
+
import { SparkAggregatedPositionData, SparkAssetsData, SparkHelperCommon, SparkMarketData, SparkUsedAssets } from '../../types';
|
|
2
3
|
export declare const sparkIsInIsolationMode: ({ usedAssets, assetsData }: {
|
|
3
4
|
usedAssets: SparkUsedAssets;
|
|
4
5
|
assetsData: SparkAssetsData;
|
|
@@ -19,3 +20,13 @@ export declare const sparkGetEmodeMutableProps: ({ eModeCategory, assetsData, }:
|
|
|
19
20
|
collateralFactor: string;
|
|
20
21
|
};
|
|
21
22
|
export declare const sparkGetAggregatedPositionData: ({ usedAssets, eModeCategory, eModeCategories, assetsData, selectedMarket, network, ...rest }: SparkHelperCommon) => SparkAggregatedPositionData;
|
|
23
|
+
export declare const getApyAfterValuesEstimation: (selectedMarket: SparkMarketData, actions: [{
|
|
24
|
+
action: string;
|
|
25
|
+
amount: string;
|
|
26
|
+
asset: string;
|
|
27
|
+
}], web3: Web3) => Promise<{
|
|
28
|
+
[key: string]: {
|
|
29
|
+
supplyRate: string;
|
|
30
|
+
borrowRate: string;
|
|
31
|
+
};
|
|
32
|
+
}>;
|