diff --git a/packages/abis/external/protocols/aave/v3-l2/pool.json b/packages/abis/external/protocols/aave/v3-l2/pool.json index 045a6a8d7..5f278b20d 100644 --- a/packages/abis/external/protocols/aave/v3-l2/pool.json +++ b/packages/abis/external/protocols/aave/v3-l2/pool.json @@ -1,1913 +1,1370 @@ [ - { - "inputs": [ - { - "internalType": "contract IPoolAddressesProvider", - "name": "provider", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "reserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "backer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - } - ], - "name": "BackUnbacked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "reserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "onBehalfOf", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "enum DataTypes.InterestRateMode", - "name": "interestRateMode", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowRate", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint16", - "name": "referralCode", - "type": "uint16" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "target", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "initiator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "asset", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "enum DataTypes.InterestRateMode", - "name": "interestRateMode", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "premium", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint16", - "name": "referralCode", - "type": "uint16" - } - ], - "name": "FlashLoan", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "asset", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalDebt", - "type": "uint256" - } - ], - "name": "IsolationModeTotalDebtUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "collateralAsset", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "debtAsset", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "debtToCover", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "liquidatedCollateralAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "bool", - "name": "receiveAToken", - "type": "bool" - } - ], - "name": "LiquidationCall", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "reserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "onBehalfOf", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint16", - "name": "referralCode", - "type": "uint16" - } - ], - "name": "MintUnbacked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "reserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amountMinted", - "type": "uint256" - } - ], - "name": "MintedToTreasury", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "reserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - } - ], - "name": "RebalanceStableBorrowRate", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "reserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "repayer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bool", - "name": "useATokens", - "type": "bool" - } - ], - "name": "Repay", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "reserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "liquidityRate", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "stableBorrowRate", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "variableBorrowRate", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "liquidityIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "variableBorrowIndex", - "type": "uint256" - } - ], - "name": "ReserveDataUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "reserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - } - ], - "name": "ReserveUsedAsCollateralDisabled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "reserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - } - ], - "name": "ReserveUsedAsCollateralEnabled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "reserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "onBehalfOf", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint16", - "name": "referralCode", - "type": "uint16" - } - ], - "name": "Supply", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "reserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": false, - "internalType": "enum DataTypes.InterestRateMode", - "name": "interestRateMode", - "type": "uint8" - } - ], - "name": "SwapBorrowRateMode", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "categoryId", - "type": "uint8" - } - ], - "name": "UserEModeSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "reserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Withdraw", - "type": "event" - }, - { - "inputs": [], - "name": "ADDRESSES_PROVIDER", - "outputs": [ - { - "internalType": "contract IPoolAddressesProvider", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "BRIDGE_PROTOCOL_FEE", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "FLASHLOAN_PREMIUM_TOTAL", - "outputs": [ - { - "internalType": "uint128", - "name": "", - "type": "uint128" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "FLASHLOAN_PREMIUM_TO_PROTOCOL", - "outputs": [ - { - "internalType": "uint128", - "name": "", - "type": "uint128" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MAX_NUMBER_RESERVES", - "outputs": [ - { - "internalType": "uint16", - "name": "", - "type": "uint16" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MAX_STABLE_RATE_BORROW_SIZE_PERCENT", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "POOL_REVISION", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "asset", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fee", - "type": "uint256" - } - ], - "name": "backUnbacked", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "asset", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "interestRateMode", - "type": "uint256" - }, - { - "internalType": "uint16", - "name": "referralCode", - "type": "uint16" - }, - { - "internalType": "address", - "name": "onBehalfOf", - "type": "address" - } - ], - "name": "borrow", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "args", - "type": "bytes32" - } - ], - "name": "borrow", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint8", - "name": "id", - "type": "uint8" - }, - { - "components": [ - { - "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 DataTypes.EModeCategory", - "name": "category", - "type": "tuple" - } - ], - "name": "configureEModeCategory", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "asset", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "address", - "name": "onBehalfOf", - "type": "address" - }, - { - "internalType": "uint16", - "name": "referralCode", - "type": "uint16" - } - ], - "name": "deposit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "asset", - "type": "address" - } - ], - "name": "dropReserve", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "asset", - "type": "address" - }, - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "balanceFromBefore", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "balanceToBefore", - "type": "uint256" - } - ], - "name": "finalizeTransfer", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "receiverAddress", - "type": "address" - }, - { - "internalType": "address[]", - "name": "assets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "amounts", - "type": "uint256[]" - }, - { - "internalType": "uint256[]", - "name": "interestRateModes", - "type": "uint256[]" - }, - { - "internalType": "address", - "name": "onBehalfOf", - "type": "address" - }, - { - "internalType": "bytes", - "name": "params", - "type": "bytes" - }, - { - "internalType": "uint16", - "name": "referralCode", - "type": "uint16" - } - ], - "name": "flashLoan", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "receiverAddress", - "type": "address" - }, - { - "internalType": "address", - "name": "asset", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "params", - "type": "bytes" - }, - { - "internalType": "uint16", - "name": "referralCode", - "type": "uint16" - } - ], - "name": "flashLoanSimple", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "asset", - "type": "address" - } - ], - "name": "getConfiguration", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "data", - "type": "uint256" - } - ], - "internalType": "struct DataTypes.ReserveConfigurationMap", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint8", - "name": "id", - "type": "uint8" - } - ], - "name": "getEModeCategoryData", - "outputs": [ - { - "components": [ - { - "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 DataTypes.EModeCategory", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint16", - "name": "id", - "type": "uint16" - } - ], - "name": "getReserveAddressById", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "asset", - "type": "address" - } - ], - "name": "getReserveData", - "outputs": [ - { - "components": [ - { - "components": [ - { - "internalType": "uint256", - "name": "data", - "type": "uint256" - } - ], - "internalType": "struct DataTypes.ReserveConfigurationMap", - "name": "configuration", - "type": "tuple" - }, - { - "internalType": "uint128", - "name": "liquidityIndex", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "currentLiquidityRate", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "variableBorrowIndex", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "currentVariableBorrowRate", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "currentStableBorrowRate", - "type": "uint128" - }, - { - "internalType": "uint40", - "name": "lastUpdateTimestamp", - "type": "uint40" - }, - { - "internalType": "uint16", - "name": "id", - "type": "uint16" - }, - { - "internalType": "address", - "name": "aTokenAddress", - "type": "address" - }, - { - "internalType": "address", - "name": "stableDebtTokenAddress", - "type": "address" - }, - { - "internalType": "address", - "name": "variableDebtTokenAddress", - "type": "address" - }, - { - "internalType": "address", - "name": "interestRateStrategyAddress", - "type": "address" - }, - { - "internalType": "uint128", - "name": "accruedToTreasury", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "unbacked", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "isolationModeTotalDebt", - "type": "uint128" - } - ], - "internalType": "struct DataTypes.ReserveData", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "asset", - "type": "address" - } - ], - "name": "getReserveNormalizedIncome", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "asset", - "type": "address" - } - ], - "name": "getReserveNormalizedVariableDebt", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getReservesList", - "outputs": [ - { - "internalType": "address[]", - "name": "", - "type": "address[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "user", - "type": "address" - } - ], - "name": "getUserAccountData", - "outputs": [ - { - "internalType": "uint256", - "name": "totalCollateralBase", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "totalDebtBase", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "availableBorrowsBase", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "currentLiquidationThreshold", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "ltv", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "healthFactor", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "user", - "type": "address" - } - ], - "name": "getUserConfiguration", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "data", - "type": "uint256" - } - ], - "internalType": "struct DataTypes.UserConfigurationMap", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "user", - "type": "address" - } - ], - "name": "getUserEMode", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "asset", - "type": "address" - }, - { - "internalType": "address", - "name": "aTokenAddress", - "type": "address" - }, - { - "internalType": "address", - "name": "stableDebtAddress", - "type": "address" - }, - { - "internalType": "address", - "name": "variableDebtAddress", - "type": "address" - }, - { - "internalType": "address", - "name": "interestRateStrategyAddress", - "type": "address" - } - ], - "name": "initReserve", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IPoolAddressesProvider", - "name": "provider", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "collateralAsset", - "type": "address" - }, - { - "internalType": "address", - "name": "debtAsset", - "type": "address" - }, - { - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "internalType": "uint256", - "name": "debtToCover", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "receiveAToken", - "type": "bool" - } - ], - "name": "liquidationCall", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "args1", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "args2", - "type": "bytes32" - } - ], - "name": "liquidationCall", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "assets", - "type": "address[]" - } - ], - "name": "mintToTreasury", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "asset", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "address", - "name": "onBehalfOf", - "type": "address" - }, - { - "internalType": "uint16", - "name": "referralCode", - "type": "uint16" - } - ], - "name": "mintUnbacked", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "args", - "type": "bytes32" - } - ], - "name": "rebalanceStableBorrowRate", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "asset", - "type": "address" - }, - { - "internalType": "address", - "name": "user", - "type": "address" - } - ], - "name": "rebalanceStableBorrowRate", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "args", - "type": "bytes32" - } - ], - "name": "repay", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "asset", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "interestRateMode", - "type": "uint256" - }, - { - "internalType": "address", - "name": "onBehalfOf", - "type": "address" - } - ], - "name": "repay", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "asset", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "interestRateMode", - "type": "uint256" - } - ], - "name": "repayWithATokens", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "args", - "type": "bytes32" - } - ], - "name": "repayWithATokens", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "args", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "repayWithPermit", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "asset", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "interestRateMode", - "type": "uint256" - }, - { - "internalType": "address", - "name": "onBehalfOf", - "type": "address" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "permitV", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "permitR", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "permitS", - "type": "bytes32" - } - ], - "name": "repayWithPermit", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "rescueTokens", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "asset", - "type": "address" - } - ], - "name": "resetIsolationModeTotalDebt", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "asset", - "type": "address" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "data", - "type": "uint256" - } - ], - "internalType": "struct DataTypes.ReserveConfigurationMap", - "name": "configuration", - "type": "tuple" - } - ], - "name": "setConfiguration", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "asset", - "type": "address" - }, - { - "internalType": "address", - "name": "rateStrategyAddress", - "type": "address" - } - ], - "name": "setReserveInterestRateStrategyAddress", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint8", - "name": "categoryId", - "type": "uint8" - } - ], - "name": "setUserEMode", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "args", - "type": "bytes32" - } - ], - "name": "setUserUseReserveAsCollateral", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "asset", - "type": "address" - }, - { - "internalType": "bool", - "name": "useAsCollateral", - "type": "bool" - } - ], - "name": "setUserUseReserveAsCollateral", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "asset", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "address", - "name": "onBehalfOf", - "type": "address" - }, - { - "internalType": "uint16", - "name": "referralCode", - "type": "uint16" - } - ], - "name": "supply", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "args", - "type": "bytes32" - } - ], - "name": "supply", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "asset", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "address", - "name": "onBehalfOf", - "type": "address" - }, - { - "internalType": "uint16", - "name": "referralCode", - "type": "uint16" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "permitV", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "permitR", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "permitS", - "type": "bytes32" - } - ], - "name": "supplyWithPermit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "args", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "supplyWithPermit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "args", - "type": "bytes32" - } - ], - "name": "swapBorrowRateMode", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "asset", - "type": "address" - }, - { - "internalType": "uint256", - "name": "interestRateMode", - "type": "uint256" - } - ], - "name": "swapBorrowRateMode", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "protocolFee", - "type": "uint256" - } - ], - "name": "updateBridgeProtocolFee", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint128", - "name": "flashLoanPremiumTotal", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "flashLoanPremiumToProtocol", - "type": "uint128" - } - ], - "name": "updateFlashloanPremiums", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "asset", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - } - ], - "name": "withdraw", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "args", - "type": "bytes32" - } - ], - "name": "withdraw", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - } -] \ No newline at end of file + { + "inputs": [ + { + "internalType": "contract IPoolAddressesProvider", + "name": "provider", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "reserve", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "backer", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "fee", + "type": "uint256" + } + ], + "name": "BackUnbacked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "reserve", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "onBehalfOf", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "enum DataTypes.InterestRateMode", + "name": "interestRateMode", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "borrowRate", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint16", + "name": "referralCode", + "type": "uint16" + } + ], + "name": "Borrow", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "initiator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "asset", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "enum DataTypes.InterestRateMode", + "name": "interestRateMode", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "premium", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint16", + "name": "referralCode", + "type": "uint16" + } + ], + "name": "FlashLoan", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "asset", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalDebt", + "type": "uint256" + } + ], + "name": "IsolationModeTotalDebtUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "collateralAsset", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "debtAsset", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "debtToCover", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "liquidatedCollateralAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "liquidator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "receiveAToken", + "type": "bool" + } + ], + "name": "LiquidationCall", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "reserve", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "onBehalfOf", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint16", + "name": "referralCode", + "type": "uint16" + } + ], + "name": "MintUnbacked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "reserve", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amountMinted", + "type": "uint256" + } + ], + "name": "MintedToTreasury", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "reserve", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "repayer", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bool", + "name": "useATokens", + "type": "bool" + } + ], + "name": "Repay", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "reserve", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "liquidityRate", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "stableBorrowRate", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "variableBorrowRate", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "liquidityIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "variableBorrowIndex", + "type": "uint256" + } + ], + "name": "ReserveDataUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "reserve", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "ReserveUsedAsCollateralDisabled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "reserve", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "ReserveUsedAsCollateralEnabled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "reserve", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "onBehalfOf", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint16", + "name": "referralCode", + "type": "uint16" + } + ], + "name": "Supply", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "categoryId", + "type": "uint8" + } + ], + "name": "UserEModeSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "reserve", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Withdraw", + "type": "event" + }, + { + "inputs": [], + "name": "ADDRESSES_PROVIDER", + "outputs": [ + { + "internalType": "contract IPoolAddressesProvider", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "BRIDGE_PROTOCOL_FEE", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "FLASHLOAN_PREMIUM_TOTAL", + "outputs": [{ "internalType": "uint128", "name": "", "type": "uint128" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "FLASHLOAN_PREMIUM_TO_PROTOCOL", + "outputs": [{ "internalType": "uint128", "name": "", "type": "uint128" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MAX_NUMBER_RESERVES", + "outputs": [{ "internalType": "uint16", "name": "", "type": "uint16" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "POOL_REVISION", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "asset", "type": "address" }, + { "internalType": "uint256", "name": "amount", "type": "uint256" }, + { "internalType": "uint256", "name": "fee", "type": "uint256" } + ], + "name": "backUnbacked", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "asset", "type": "address" }, + { "internalType": "uint256", "name": "amount", "type": "uint256" }, + { + "internalType": "uint256", + "name": "interestRateMode", + "type": "uint256" + }, + { "internalType": "uint16", "name": "referralCode", "type": "uint16" }, + { "internalType": "address", "name": "onBehalfOf", "type": "address" } + ], + "name": "borrow", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint8", "name": "id", "type": "uint8" }, + { + "components": [ + { "internalType": "uint16", "name": "ltv", "type": "uint16" }, + { + "internalType": "uint16", + "name": "liquidationThreshold", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "liquidationBonus", + "type": "uint16" + }, + { "internalType": "string", "name": "label", "type": "string" } + ], + "internalType": "struct DataTypes.EModeCategoryBaseConfiguration", + "name": "category", + "type": "tuple" + } + ], + "name": "configureEModeCategory", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint8", "name": "id", "type": "uint8" }, + { + "internalType": "uint128", + "name": "borrowableBitmap", + "type": "uint128" + } + ], + "name": "configureEModeCategoryBorrowableBitmap", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint8", "name": "id", "type": "uint8" }, + { + "internalType": "uint128", + "name": "collateralBitmap", + "type": "uint128" + } + ], + "name": "configureEModeCategoryCollateralBitmap", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "asset", "type": "address" }, + { "internalType": "uint256", "name": "amount", "type": "uint256" }, + { "internalType": "address", "name": "onBehalfOf", "type": "address" }, + { "internalType": "uint16", "name": "referralCode", "type": "uint16" } + ], + "name": "deposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "asset", "type": "address" }], + "name": "dropReserve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "asset", "type": "address" }, + { "internalType": "address", "name": "from", "type": "address" }, + { "internalType": "address", "name": "to", "type": "address" }, + { "internalType": "uint256", "name": "amount", "type": "uint256" }, + { + "internalType": "uint256", + "name": "balanceFromBefore", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "balanceToBefore", + "type": "uint256" + } + ], + "name": "finalizeTransfer", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiverAddress", + "type": "address" + }, + { "internalType": "address[]", "name": "assets", "type": "address[]" }, + { "internalType": "uint256[]", "name": "amounts", "type": "uint256[]" }, + { + "internalType": "uint256[]", + "name": "interestRateModes", + "type": "uint256[]" + }, + { "internalType": "address", "name": "onBehalfOf", "type": "address" }, + { "internalType": "bytes", "name": "params", "type": "bytes" }, + { "internalType": "uint16", "name": "referralCode", "type": "uint16" } + ], + "name": "flashLoan", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiverAddress", + "type": "address" + }, + { "internalType": "address", "name": "asset", "type": "address" }, + { "internalType": "uint256", "name": "amount", "type": "uint256" }, + { "internalType": "bytes", "name": "params", "type": "bytes" }, + { "internalType": "uint16", "name": "referralCode", "type": "uint16" } + ], + "name": "flashLoanSimple", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getBorrowLogic", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "getBridgeLogic", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "asset", "type": "address" }], + "name": "getConfiguration", + "outputs": [ + { + "components": [{ "internalType": "uint256", "name": "data", "type": "uint256" }], + "internalType": "struct DataTypes.ReserveConfigurationMap", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "uint8", "name": "id", "type": "uint8" }], + "name": "getEModeCategoryBorrowableBitmap", + "outputs": [{ "internalType": "uint128", "name": "", "type": "uint128" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "uint8", "name": "id", "type": "uint8" }], + "name": "getEModeCategoryCollateralBitmap", + "outputs": [{ "internalType": "uint128", "name": "", "type": "uint128" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "uint8", "name": "id", "type": "uint8" }], + "name": "getEModeCategoryCollateralConfig", + "outputs": [ + { + "components": [ + { "internalType": "uint16", "name": "ltv", "type": "uint16" }, + { + "internalType": "uint16", + "name": "liquidationThreshold", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "liquidationBonus", + "type": "uint16" + } + ], + "internalType": "struct DataTypes.CollateralConfig", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "uint8", "name": "id", "type": "uint8" }], + "name": "getEModeCategoryData", + "outputs": [ + { + "components": [ + { "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 DataTypes.EModeCategoryLegacy", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "uint8", "name": "id", "type": "uint8" }], + "name": "getEModeCategoryLabel", + "outputs": [{ "internalType": "string", "name": "", "type": "string" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getEModeLogic", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "getFlashLoanLogic", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "asset", "type": "address" }], + "name": "getLiquidationGracePeriod", + "outputs": [{ "internalType": "uint40", "name": "", "type": "uint40" }], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getLiquidationLogic", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "getPoolLogic", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [{ "internalType": "uint16", "name": "id", "type": "uint16" }], + "name": "getReserveAddressById", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "asset", "type": "address" }], + "name": "getReserveData", + "outputs": [ + { + "components": [ + { + "components": [{ "internalType": "uint256", "name": "data", "type": "uint256" }], + "internalType": "struct DataTypes.ReserveConfigurationMap", + "name": "configuration", + "type": "tuple" + }, + { + "internalType": "uint128", + "name": "liquidityIndex", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "currentLiquidityRate", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "variableBorrowIndex", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "currentVariableBorrowRate", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "currentStableBorrowRate", + "type": "uint128" + }, + { + "internalType": "uint40", + "name": "lastUpdateTimestamp", + "type": "uint40" + }, + { "internalType": "uint16", "name": "id", "type": "uint16" }, + { + "internalType": "address", + "name": "aTokenAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "stableDebtTokenAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "variableDebtTokenAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "interestRateStrategyAddress", + "type": "address" + }, + { + "internalType": "uint128", + "name": "accruedToTreasury", + "type": "uint128" + }, + { "internalType": "uint128", "name": "unbacked", "type": "uint128" }, + { + "internalType": "uint128", + "name": "isolationModeTotalDebt", + "type": "uint128" + } + ], + "internalType": "struct DataTypes.ReserveDataLegacy", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "asset", "type": "address" }], + "name": "getReserveDataExtended", + "outputs": [ + { + "components": [ + { + "components": [{ "internalType": "uint256", "name": "data", "type": "uint256" }], + "internalType": "struct DataTypes.ReserveConfigurationMap", + "name": "configuration", + "type": "tuple" + }, + { + "internalType": "uint128", + "name": "liquidityIndex", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "currentLiquidityRate", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "variableBorrowIndex", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "currentVariableBorrowRate", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "__deprecatedStableBorrowRate", + "type": "uint128" + }, + { + "internalType": "uint40", + "name": "lastUpdateTimestamp", + "type": "uint40" + }, + { "internalType": "uint16", "name": "id", "type": "uint16" }, + { + "internalType": "uint40", + "name": "liquidationGracePeriodUntil", + "type": "uint40" + }, + { + "internalType": "address", + "name": "aTokenAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "__deprecatedStableDebtTokenAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "variableDebtTokenAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "interestRateStrategyAddress", + "type": "address" + }, + { + "internalType": "uint128", + "name": "accruedToTreasury", + "type": "uint128" + }, + { "internalType": "uint128", "name": "unbacked", "type": "uint128" }, + { + "internalType": "uint128", + "name": "isolationModeTotalDebt", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "virtualUnderlyingBalance", + "type": "uint128" + } + ], + "internalType": "struct DataTypes.ReserveData", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "asset", "type": "address" }], + "name": "getReserveNormalizedIncome", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "asset", "type": "address" }], + "name": "getReserveNormalizedVariableDebt", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getReservesCount", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getReservesList", + "outputs": [{ "internalType": "address[]", "name": "", "type": "address[]" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getSupplyLogic", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "user", "type": "address" }], + "name": "getUserAccountData", + "outputs": [ + { + "internalType": "uint256", + "name": "totalCollateralBase", + "type": "uint256" + }, + { "internalType": "uint256", "name": "totalDebtBase", "type": "uint256" }, + { + "internalType": "uint256", + "name": "availableBorrowsBase", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "currentLiquidationThreshold", + "type": "uint256" + }, + { "internalType": "uint256", "name": "ltv", "type": "uint256" }, + { "internalType": "uint256", "name": "healthFactor", "type": "uint256" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "user", "type": "address" }], + "name": "getUserConfiguration", + "outputs": [ + { + "components": [{ "internalType": "uint256", "name": "data", "type": "uint256" }], + "internalType": "struct DataTypes.UserConfigurationMap", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "user", "type": "address" }], + "name": "getUserEMode", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "asset", "type": "address" }], + "name": "getVirtualUnderlyingBalance", + "outputs": [{ "internalType": "uint128", "name": "", "type": "uint128" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "asset", "type": "address" }, + { "internalType": "address", "name": "aTokenAddress", "type": "address" }, + { + "internalType": "address", + "name": "variableDebtAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "interestRateStrategyAddress", + "type": "address" + } + ], + "name": "initReserve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IPoolAddressesProvider", + "name": "provider", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "collateralAsset", + "type": "address" + }, + { "internalType": "address", "name": "debtAsset", "type": "address" }, + { "internalType": "address", "name": "user", "type": "address" }, + { "internalType": "uint256", "name": "debtToCover", "type": "uint256" }, + { "internalType": "bool", "name": "receiveAToken", "type": "bool" } + ], + "name": "liquidationCall", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [{ "internalType": "address[]", "name": "assets", "type": "address[]" }], + "name": "mintToTreasury", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "asset", "type": "address" }, + { "internalType": "uint256", "name": "amount", "type": "uint256" }, + { "internalType": "address", "name": "onBehalfOf", "type": "address" }, + { "internalType": "uint16", "name": "referralCode", "type": "uint16" } + ], + "name": "mintUnbacked", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "asset", "type": "address" }, + { "internalType": "uint256", "name": "amount", "type": "uint256" }, + { + "internalType": "uint256", + "name": "interestRateMode", + "type": "uint256" + }, + { "internalType": "address", "name": "onBehalfOf", "type": "address" } + ], + "name": "repay", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "asset", "type": "address" }, + { "internalType": "uint256", "name": "amount", "type": "uint256" }, + { + "internalType": "uint256", + "name": "interestRateMode", + "type": "uint256" + } + ], + "name": "repayWithATokens", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "asset", "type": "address" }, + { "internalType": "uint256", "name": "amount", "type": "uint256" }, + { + "internalType": "uint256", + "name": "interestRateMode", + "type": "uint256" + }, + { "internalType": "address", "name": "onBehalfOf", "type": "address" }, + { "internalType": "uint256", "name": "deadline", "type": "uint256" }, + { "internalType": "uint8", "name": "permitV", "type": "uint8" }, + { "internalType": "bytes32", "name": "permitR", "type": "bytes32" }, + { "internalType": "bytes32", "name": "permitS", "type": "bytes32" } + ], + "name": "repayWithPermit", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "token", "type": "address" }, + { "internalType": "address", "name": "to", "type": "address" }, + { "internalType": "uint256", "name": "amount", "type": "uint256" } + ], + "name": "rescueTokens", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "asset", "type": "address" }], + "name": "resetIsolationModeTotalDebt", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "asset", "type": "address" }, + { + "components": [{ "internalType": "uint256", "name": "data", "type": "uint256" }], + "internalType": "struct DataTypes.ReserveConfigurationMap", + "name": "configuration", + "type": "tuple" + } + ], + "name": "setConfiguration", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "asset", "type": "address" }, + { "internalType": "uint40", "name": "until", "type": "uint40" } + ], + "name": "setLiquidationGracePeriod", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "asset", "type": "address" }, + { + "internalType": "address", + "name": "rateStrategyAddress", + "type": "address" + } + ], + "name": "setReserveInterestRateStrategyAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [{ "internalType": "uint8", "name": "categoryId", "type": "uint8" }], + "name": "setUserEMode", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "asset", "type": "address" }, + { "internalType": "bool", "name": "useAsCollateral", "type": "bool" } + ], + "name": "setUserUseReserveAsCollateral", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "asset", "type": "address" }, + { "internalType": "uint256", "name": "amount", "type": "uint256" }, + { "internalType": "address", "name": "onBehalfOf", "type": "address" }, + { "internalType": "uint16", "name": "referralCode", "type": "uint16" } + ], + "name": "supply", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "asset", "type": "address" }, + { "internalType": "uint256", "name": "amount", "type": "uint256" }, + { "internalType": "address", "name": "onBehalfOf", "type": "address" }, + { "internalType": "uint16", "name": "referralCode", "type": "uint16" }, + { "internalType": "uint256", "name": "deadline", "type": "uint256" }, + { "internalType": "uint8", "name": "permitV", "type": "uint8" }, + { "internalType": "bytes32", "name": "permitR", "type": "bytes32" }, + { "internalType": "bytes32", "name": "permitS", "type": "bytes32" } + ], + "name": "supplyWithPermit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "asset", "type": "address" }], + "name": "syncIndexesState", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "asset", "type": "address" }], + "name": "syncRatesState", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [{ "internalType": "uint256", "name": "protocolFee", "type": "uint256" }], + "name": "updateBridgeProtocolFee", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint128", + "name": "flashLoanPremiumTotal", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "flashLoanPremiumToProtocol", + "type": "uint128" + } + ], + "name": "updateFlashloanPremiums", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "asset", "type": "address" }, + { "internalType": "uint256", "name": "amount", "type": "uint256" }, + { "internalType": "address", "name": "to", "type": "address" } + ], + "name": "withdraw", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/packages/abis/external/protocols/aave/v3/aaveProtocolDataProvider.json b/packages/abis/external/protocols/aave/v3/aaveProtocolDataProvider.json index 65c906b42..5729992e5 100644 --- a/packages/abis/external/protocols/aave/v3/aaveProtocolDataProvider.json +++ b/packages/abis/external/protocols/aave/v3/aaveProtocolDataProvider.json @@ -1 +1,219 @@ -[{"inputs":[{"internalType":"contract IPoolAddressesProvider","name":"addressesProvider","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ADDRESSES_PROVIDER","outputs":[{"internalType":"contract IPoolAddressesProvider","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"}],"name":"getATokenTotalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAllATokens","outputs":[{"components":[{"internalType":"string","name":"symbol","type":"string"},{"internalType":"address","name":"tokenAddress","type":"address"}],"internalType":"struct IPoolDataProvider.TokenData[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAllReservesTokens","outputs":[{"components":[{"internalType":"string","name":"symbol","type":"string"},{"internalType":"address","name":"tokenAddress","type":"address"}],"internalType":"struct IPoolDataProvider.TokenData[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"}],"name":"getDebtCeiling","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getDebtCeilingDecimals","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"}],"name":"getFlashLoanEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"}],"name":"getInterestRateStrategyAddress","outputs":[{"internalType":"address","name":"irStrategyAddress","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"}],"name":"getLiquidationProtocolFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"}],"name":"getPaused","outputs":[{"internalType":"bool","name":"isPaused","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"}],"name":"getReserveCaps","outputs":[{"internalType":"uint256","name":"borrowCap","type":"uint256"},{"internalType":"uint256","name":"supplyCap","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"}],"name":"getReserveConfigurationData","outputs":[{"internalType":"uint256","name":"decimals","type":"uint256"},{"internalType":"uint256","name":"ltv","type":"uint256"},{"internalType":"uint256","name":"liquidationThreshold","type":"uint256"},{"internalType":"uint256","name":"liquidationBonus","type":"uint256"},{"internalType":"uint256","name":"reserveFactor","type":"uint256"},{"internalType":"bool","name":"usageAsCollateralEnabled","type":"bool"},{"internalType":"bool","name":"borrowingEnabled","type":"bool"},{"internalType":"bool","name":"stableBorrowRateEnabled","type":"bool"},{"internalType":"bool","name":"isActive","type":"bool"},{"internalType":"bool","name":"isFrozen","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"}],"name":"getReserveData","outputs":[{"internalType":"uint256","name":"unbacked","type":"uint256"},{"internalType":"uint256","name":"accruedToTreasuryScaled","type":"uint256"},{"internalType":"uint256","name":"totalAToken","type":"uint256"},{"internalType":"uint256","name":"totalStableDebt","type":"uint256"},{"internalType":"uint256","name":"totalVariableDebt","type":"uint256"},{"internalType":"uint256","name":"liquidityRate","type":"uint256"},{"internalType":"uint256","name":"variableBorrowRate","type":"uint256"},{"internalType":"uint256","name":"stableBorrowRate","type":"uint256"},{"internalType":"uint256","name":"averageStableBorrowRate","type":"uint256"},{"internalType":"uint256","name":"liquidityIndex","type":"uint256"},{"internalType":"uint256","name":"variableBorrowIndex","type":"uint256"},{"internalType":"uint40","name":"lastUpdateTimestamp","type":"uint40"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"}],"name":"getReserveEModeCategory","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"}],"name":"getReserveTokensAddresses","outputs":[{"internalType":"address","name":"aTokenAddress","type":"address"},{"internalType":"address","name":"stableDebtTokenAddress","type":"address"},{"internalType":"address","name":"variableDebtTokenAddress","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"}],"name":"getSiloedBorrowing","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"}],"name":"getTotalDebt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"}],"name":"getUnbackedMintCap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"},{"internalType":"address","name":"user","type":"address"}],"name":"getUserReserveData","outputs":[{"internalType":"uint256","name":"currentATokenBalance","type":"uint256"},{"internalType":"uint256","name":"currentStableDebt","type":"uint256"},{"internalType":"uint256","name":"currentVariableDebt","type":"uint256"},{"internalType":"uint256","name":"principalStableDebt","type":"uint256"},{"internalType":"uint256","name":"scaledVariableDebt","type":"uint256"},{"internalType":"uint256","name":"stableBorrowRate","type":"uint256"},{"internalType":"uint256","name":"liquidityRate","type":"uint256"},{"internalType":"uint40","name":"stableRateLastUpdated","type":"uint40"},{"internalType":"bool","name":"usageAsCollateralEnabled","type":"bool"}],"stateMutability":"view","type":"function"}] \ No newline at end of file +[ + { + "inputs": [ + { + "internalType": "contract IPoolAddressesProvider", + "name": "addressesProvider", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "ADDRESSES_PROVIDER", + "outputs": [ + { "internalType": "contract IPoolAddressesProvider", "name": "", "type": "address" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "asset", "type": "address" }], + "name": "getATokenTotalSupply", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getAllATokens", + "outputs": [ + { + "components": [ + { "internalType": "string", "name": "symbol", "type": "string" }, + { "internalType": "address", "name": "tokenAddress", "type": "address" } + ], + "internalType": "struct IPoolDataProvider.TokenData[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getAllReservesTokens", + "outputs": [ + { + "components": [ + { "internalType": "string", "name": "symbol", "type": "string" }, + { "internalType": "address", "name": "tokenAddress", "type": "address" } + ], + "internalType": "struct IPoolDataProvider.TokenData[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "asset", "type": "address" }], + "name": "getDebtCeiling", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getDebtCeilingDecimals", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "asset", "type": "address" }], + "name": "getFlashLoanEnabled", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "asset", "type": "address" }], + "name": "getInterestRateStrategyAddress", + "outputs": [{ "internalType": "address", "name": "irStrategyAddress", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "asset", "type": "address" }], + "name": "getIsVirtualAccActive", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "asset", "type": "address" }], + "name": "getLiquidationProtocolFee", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "asset", "type": "address" }], + "name": "getPaused", + "outputs": [{ "internalType": "bool", "name": "isPaused", "type": "bool" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "asset", "type": "address" }], + "name": "getReserveCaps", + "outputs": [ + { "internalType": "uint256", "name": "borrowCap", "type": "uint256" }, + { "internalType": "uint256", "name": "supplyCap", "type": "uint256" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "asset", "type": "address" }], + "name": "getReserveConfigurationData", + "outputs": [ + { "internalType": "uint256", "name": "decimals", "type": "uint256" }, + { "internalType": "uint256", "name": "ltv", "type": "uint256" }, + { "internalType": "uint256", "name": "liquidationThreshold", "type": "uint256" }, + { "internalType": "uint256", "name": "liquidationBonus", "type": "uint256" }, + { "internalType": "uint256", "name": "reserveFactor", "type": "uint256" }, + { "internalType": "bool", "name": "usageAsCollateralEnabled", "type": "bool" }, + { "internalType": "bool", "name": "borrowingEnabled", "type": "bool" }, + { "internalType": "bool", "name": "stableBorrowRateEnabled", "type": "bool" }, + { "internalType": "bool", "name": "isActive", "type": "bool" }, + { "internalType": "bool", "name": "isFrozen", "type": "bool" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "asset", "type": "address" }], + "name": "getReserveData", + "outputs": [ + { "internalType": "uint256", "name": "unbacked", "type": "uint256" }, + { "internalType": "uint256", "name": "accruedToTreasuryScaled", "type": "uint256" }, + { "internalType": "uint256", "name": "totalAToken", "type": "uint256" }, + { "internalType": "uint256", "name": "totalStableDebt", "type": "uint256" }, + { "internalType": "uint256", "name": "totalVariableDebt", "type": "uint256" }, + { "internalType": "uint256", "name": "liquidityRate", "type": "uint256" }, + { "internalType": "uint256", "name": "variableBorrowRate", "type": "uint256" }, + { "internalType": "uint256", "name": "stableBorrowRate", "type": "uint256" }, + { "internalType": "uint256", "name": "averageStableBorrowRate", "type": "uint256" }, + { "internalType": "uint256", "name": "liquidityIndex", "type": "uint256" }, + { "internalType": "uint256", "name": "variableBorrowIndex", "type": "uint256" }, + { "internalType": "uint40", "name": "lastUpdateTimestamp", "type": "uint40" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "asset", "type": "address" }], + "name": "getReserveTokensAddresses", + "outputs": [ + { "internalType": "address", "name": "aTokenAddress", "type": "address" }, + { "internalType": "address", "name": "stableDebtTokenAddress", "type": "address" }, + { "internalType": "address", "name": "variableDebtTokenAddress", "type": "address" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "asset", "type": "address" }], + "name": "getSiloedBorrowing", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "asset", "type": "address" }], + "name": "getTotalDebt", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "asset", "type": "address" }], + "name": "getUnbackedMintCap", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "asset", "type": "address" }, + { "internalType": "address", "name": "user", "type": "address" } + ], + "name": "getUserReserveData", + "outputs": [ + { "internalType": "uint256", "name": "currentATokenBalance", "type": "uint256" }, + { "internalType": "uint256", "name": "currentStableDebt", "type": "uint256" }, + { "internalType": "uint256", "name": "currentVariableDebt", "type": "uint256" }, + { "internalType": "uint256", "name": "principalStableDebt", "type": "uint256" }, + { "internalType": "uint256", "name": "scaledVariableDebt", "type": "uint256" }, + { "internalType": "uint256", "name": "stableBorrowRate", "type": "uint256" }, + { "internalType": "uint256", "name": "liquidityRate", "type": "uint256" }, + { "internalType": "uint40", "name": "stableRateLastUpdated", "type": "uint40" }, + { "internalType": "bool", "name": "usageAsCollateralEnabled", "type": "bool" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "asset", "type": "address" }], + "name": "getVirtualUnderlyingBalance", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + } +] diff --git a/packages/abis/external/protocols/aave/v3/pool.json b/packages/abis/external/protocols/aave/v3/pool.json index 57521e8a2..5f278b20d 100644 --- a/packages/abis/external/protocols/aave/v3/pool.json +++ b/packages/abis/external/protocols/aave/v3/pool.json @@ -1 +1,1370 @@ -[{"inputs":[{"internalType":"contract IPoolAddressesProvider","name":"provider","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"reserve","type":"address"},{"indexed":true,"internalType":"address","name":"backer","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"fee","type":"uint256"}],"name":"BackUnbacked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"reserve","type":"address"},{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"address","name":"onBehalfOf","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"enum DataTypes.InterestRateMode","name":"interestRateMode","type":"uint8"},{"indexed":false,"internalType":"uint256","name":"borrowRate","type":"uint256"},{"indexed":true,"internalType":"uint16","name":"referralCode","type":"uint16"}],"name":"Borrow","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"target","type":"address"},{"indexed":false,"internalType":"address","name":"initiator","type":"address"},{"indexed":true,"internalType":"address","name":"asset","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"enum DataTypes.InterestRateMode","name":"interestRateMode","type":"uint8"},{"indexed":false,"internalType":"uint256","name":"premium","type":"uint256"},{"indexed":true,"internalType":"uint16","name":"referralCode","type":"uint16"}],"name":"FlashLoan","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"asset","type":"address"},{"indexed":false,"internalType":"uint256","name":"totalDebt","type":"uint256"}],"name":"IsolationModeTotalDebtUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"collateralAsset","type":"address"},{"indexed":true,"internalType":"address","name":"debtAsset","type":"address"},{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"debtToCover","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"liquidatedCollateralAmount","type":"uint256"},{"indexed":false,"internalType":"address","name":"liquidator","type":"address"},{"indexed":false,"internalType":"bool","name":"receiveAToken","type":"bool"}],"name":"LiquidationCall","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"reserve","type":"address"},{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"address","name":"onBehalfOf","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":true,"internalType":"uint16","name":"referralCode","type":"uint16"}],"name":"MintUnbacked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"reserve","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountMinted","type":"uint256"}],"name":"MintedToTreasury","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"reserve","type":"address"},{"indexed":true,"internalType":"address","name":"user","type":"address"}],"name":"RebalanceStableBorrowRate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"reserve","type":"address"},{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"address","name":"repayer","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"bool","name":"useATokens","type":"bool"}],"name":"Repay","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"reserve","type":"address"},{"indexed":false,"internalType":"uint256","name":"liquidityRate","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"stableBorrowRate","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"variableBorrowRate","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"liquidityIndex","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"variableBorrowIndex","type":"uint256"}],"name":"ReserveDataUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"reserve","type":"address"},{"indexed":true,"internalType":"address","name":"user","type":"address"}],"name":"ReserveUsedAsCollateralDisabled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"reserve","type":"address"},{"indexed":true,"internalType":"address","name":"user","type":"address"}],"name":"ReserveUsedAsCollateralEnabled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"reserve","type":"address"},{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"address","name":"onBehalfOf","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":true,"internalType":"uint16","name":"referralCode","type":"uint16"}],"name":"Supply","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"reserve","type":"address"},{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"enum DataTypes.InterestRateMode","name":"interestRateMode","type":"uint8"}],"name":"SwapBorrowRateMode","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint8","name":"categoryId","type":"uint8"}],"name":"UserEModeSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"reserve","type":"address"},{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"ADDRESSES_PROVIDER","outputs":[{"internalType":"contract IPoolAddressesProvider","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"BRIDGE_PROTOCOL_FEE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"FLASHLOAN_PREMIUM_TOTAL","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"FLASHLOAN_PREMIUM_TO_PROTOCOL","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_NUMBER_RESERVES","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_STABLE_RATE_BORROW_SIZE_PERCENT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"POOL_REVISION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"fee","type":"uint256"}],"name":"backUnbacked","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"interestRateMode","type":"uint256"},{"internalType":"uint16","name":"referralCode","type":"uint16"},{"internalType":"address","name":"onBehalfOf","type":"address"}],"name":"borrow","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"id","type":"uint8"},{"components":[{"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 DataTypes.EModeCategory","name":"category","type":"tuple"}],"name":"configureEModeCategory","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"onBehalfOf","type":"address"},{"internalType":"uint16","name":"referralCode","type":"uint16"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"}],"name":"dropReserve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"},{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"balanceFromBefore","type":"uint256"},{"internalType":"uint256","name":"balanceToBefore","type":"uint256"}],"name":"finalizeTransfer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"receiverAddress","type":"address"},{"internalType":"address[]","name":"assets","type":"address[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"uint256[]","name":"interestRateModes","type":"uint256[]"},{"internalType":"address","name":"onBehalfOf","type":"address"},{"internalType":"bytes","name":"params","type":"bytes"},{"internalType":"uint16","name":"referralCode","type":"uint16"}],"name":"flashLoan","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"receiverAddress","type":"address"},{"internalType":"address","name":"asset","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"params","type":"bytes"},{"internalType":"uint16","name":"referralCode","type":"uint16"}],"name":"flashLoanSimple","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"}],"name":"getConfiguration","outputs":[{"components":[{"internalType":"uint256","name":"data","type":"uint256"}],"internalType":"struct DataTypes.ReserveConfigurationMap","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"id","type":"uint8"}],"name":"getEModeCategoryData","outputs":[{"components":[{"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 DataTypes.EModeCategory","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"id","type":"uint16"}],"name":"getReserveAddressById","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"}],"name":"getReserveData","outputs":[{"components":[{"components":[{"internalType":"uint256","name":"data","type":"uint256"}],"internalType":"struct DataTypes.ReserveConfigurationMap","name":"configuration","type":"tuple"},{"internalType":"uint128","name":"liquidityIndex","type":"uint128"},{"internalType":"uint128","name":"currentLiquidityRate","type":"uint128"},{"internalType":"uint128","name":"variableBorrowIndex","type":"uint128"},{"internalType":"uint128","name":"currentVariableBorrowRate","type":"uint128"},{"internalType":"uint128","name":"currentStableBorrowRate","type":"uint128"},{"internalType":"uint40","name":"lastUpdateTimestamp","type":"uint40"},{"internalType":"uint16","name":"id","type":"uint16"},{"internalType":"address","name":"aTokenAddress","type":"address"},{"internalType":"address","name":"stableDebtTokenAddress","type":"address"},{"internalType":"address","name":"variableDebtTokenAddress","type":"address"},{"internalType":"address","name":"interestRateStrategyAddress","type":"address"},{"internalType":"uint128","name":"accruedToTreasury","type":"uint128"},{"internalType":"uint128","name":"unbacked","type":"uint128"},{"internalType":"uint128","name":"isolationModeTotalDebt","type":"uint128"}],"internalType":"struct DataTypes.ReserveData","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"}],"name":"getReserveNormalizedIncome","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"}],"name":"getReserveNormalizedVariableDebt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getReservesList","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getUserAccountData","outputs":[{"internalType":"uint256","name":"totalCollateralBase","type":"uint256"},{"internalType":"uint256","name":"totalDebtBase","type":"uint256"},{"internalType":"uint256","name":"availableBorrowsBase","type":"uint256"},{"internalType":"uint256","name":"currentLiquidationThreshold","type":"uint256"},{"internalType":"uint256","name":"ltv","type":"uint256"},{"internalType":"uint256","name":"healthFactor","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getUserConfiguration","outputs":[{"components":[{"internalType":"uint256","name":"data","type":"uint256"}],"internalType":"struct DataTypes.UserConfigurationMap","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getUserEMode","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"},{"internalType":"address","name":"aTokenAddress","type":"address"},{"internalType":"address","name":"stableDebtAddress","type":"address"},{"internalType":"address","name":"variableDebtAddress","type":"address"},{"internalType":"address","name":"interestRateStrategyAddress","type":"address"}],"name":"initReserve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IPoolAddressesProvider","name":"provider","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"collateralAsset","type":"address"},{"internalType":"address","name":"debtAsset","type":"address"},{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"debtToCover","type":"uint256"},{"internalType":"bool","name":"receiveAToken","type":"bool"}],"name":"liquidationCall","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"assets","type":"address[]"}],"name":"mintToTreasury","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"onBehalfOf","type":"address"},{"internalType":"uint16","name":"referralCode","type":"uint16"}],"name":"mintUnbacked","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"},{"internalType":"address","name":"user","type":"address"}],"name":"rebalanceStableBorrowRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"interestRateMode","type":"uint256"},{"internalType":"address","name":"onBehalfOf","type":"address"}],"name":"repay","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"interestRateMode","type":"uint256"}],"name":"repayWithATokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"interestRateMode","type":"uint256"},{"internalType":"address","name":"onBehalfOf","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"permitV","type":"uint8"},{"internalType":"bytes32","name":"permitR","type":"bytes32"},{"internalType":"bytes32","name":"permitS","type":"bytes32"}],"name":"repayWithPermit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"rescueTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"}],"name":"resetIsolationModeTotalDebt","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"},{"components":[{"internalType":"uint256","name":"data","type":"uint256"}],"internalType":"struct DataTypes.ReserveConfigurationMap","name":"configuration","type":"tuple"}],"name":"setConfiguration","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"},{"internalType":"address","name":"rateStrategyAddress","type":"address"}],"name":"setReserveInterestRateStrategyAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"categoryId","type":"uint8"}],"name":"setUserEMode","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"},{"internalType":"bool","name":"useAsCollateral","type":"bool"}],"name":"setUserUseReserveAsCollateral","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"onBehalfOf","type":"address"},{"internalType":"uint16","name":"referralCode","type":"uint16"}],"name":"supply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"onBehalfOf","type":"address"},{"internalType":"uint16","name":"referralCode","type":"uint16"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"permitV","type":"uint8"},{"internalType":"bytes32","name":"permitR","type":"bytes32"},{"internalType":"bytes32","name":"permitS","type":"bytes32"}],"name":"supplyWithPermit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"},{"internalType":"uint256","name":"interestRateMode","type":"uint256"}],"name":"swapBorrowRateMode","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"protocolFee","type":"uint256"}],"name":"updateBridgeProtocolFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint128","name":"flashLoanPremiumTotal","type":"uint128"},{"internalType":"uint128","name":"flashLoanPremiumToProtocol","type":"uint128"}],"name":"updateFlashloanPremiums","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"to","type":"address"}],"name":"withdraw","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"}] \ No newline at end of file +[ + { + "inputs": [ + { + "internalType": "contract IPoolAddressesProvider", + "name": "provider", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "reserve", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "backer", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "fee", + "type": "uint256" + } + ], + "name": "BackUnbacked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "reserve", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "onBehalfOf", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "enum DataTypes.InterestRateMode", + "name": "interestRateMode", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "borrowRate", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint16", + "name": "referralCode", + "type": "uint16" + } + ], + "name": "Borrow", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "initiator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "asset", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "enum DataTypes.InterestRateMode", + "name": "interestRateMode", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "premium", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint16", + "name": "referralCode", + "type": "uint16" + } + ], + "name": "FlashLoan", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "asset", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalDebt", + "type": "uint256" + } + ], + "name": "IsolationModeTotalDebtUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "collateralAsset", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "debtAsset", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "debtToCover", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "liquidatedCollateralAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "liquidator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "receiveAToken", + "type": "bool" + } + ], + "name": "LiquidationCall", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "reserve", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "onBehalfOf", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint16", + "name": "referralCode", + "type": "uint16" + } + ], + "name": "MintUnbacked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "reserve", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amountMinted", + "type": "uint256" + } + ], + "name": "MintedToTreasury", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "reserve", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "repayer", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bool", + "name": "useATokens", + "type": "bool" + } + ], + "name": "Repay", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "reserve", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "liquidityRate", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "stableBorrowRate", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "variableBorrowRate", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "liquidityIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "variableBorrowIndex", + "type": "uint256" + } + ], + "name": "ReserveDataUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "reserve", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "ReserveUsedAsCollateralDisabled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "reserve", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "ReserveUsedAsCollateralEnabled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "reserve", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "onBehalfOf", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint16", + "name": "referralCode", + "type": "uint16" + } + ], + "name": "Supply", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "categoryId", + "type": "uint8" + } + ], + "name": "UserEModeSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "reserve", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Withdraw", + "type": "event" + }, + { + "inputs": [], + "name": "ADDRESSES_PROVIDER", + "outputs": [ + { + "internalType": "contract IPoolAddressesProvider", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "BRIDGE_PROTOCOL_FEE", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "FLASHLOAN_PREMIUM_TOTAL", + "outputs": [{ "internalType": "uint128", "name": "", "type": "uint128" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "FLASHLOAN_PREMIUM_TO_PROTOCOL", + "outputs": [{ "internalType": "uint128", "name": "", "type": "uint128" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MAX_NUMBER_RESERVES", + "outputs": [{ "internalType": "uint16", "name": "", "type": "uint16" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "POOL_REVISION", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "asset", "type": "address" }, + { "internalType": "uint256", "name": "amount", "type": "uint256" }, + { "internalType": "uint256", "name": "fee", "type": "uint256" } + ], + "name": "backUnbacked", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "asset", "type": "address" }, + { "internalType": "uint256", "name": "amount", "type": "uint256" }, + { + "internalType": "uint256", + "name": "interestRateMode", + "type": "uint256" + }, + { "internalType": "uint16", "name": "referralCode", "type": "uint16" }, + { "internalType": "address", "name": "onBehalfOf", "type": "address" } + ], + "name": "borrow", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint8", "name": "id", "type": "uint8" }, + { + "components": [ + { "internalType": "uint16", "name": "ltv", "type": "uint16" }, + { + "internalType": "uint16", + "name": "liquidationThreshold", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "liquidationBonus", + "type": "uint16" + }, + { "internalType": "string", "name": "label", "type": "string" } + ], + "internalType": "struct DataTypes.EModeCategoryBaseConfiguration", + "name": "category", + "type": "tuple" + } + ], + "name": "configureEModeCategory", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint8", "name": "id", "type": "uint8" }, + { + "internalType": "uint128", + "name": "borrowableBitmap", + "type": "uint128" + } + ], + "name": "configureEModeCategoryBorrowableBitmap", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint8", "name": "id", "type": "uint8" }, + { + "internalType": "uint128", + "name": "collateralBitmap", + "type": "uint128" + } + ], + "name": "configureEModeCategoryCollateralBitmap", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "asset", "type": "address" }, + { "internalType": "uint256", "name": "amount", "type": "uint256" }, + { "internalType": "address", "name": "onBehalfOf", "type": "address" }, + { "internalType": "uint16", "name": "referralCode", "type": "uint16" } + ], + "name": "deposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "asset", "type": "address" }], + "name": "dropReserve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "asset", "type": "address" }, + { "internalType": "address", "name": "from", "type": "address" }, + { "internalType": "address", "name": "to", "type": "address" }, + { "internalType": "uint256", "name": "amount", "type": "uint256" }, + { + "internalType": "uint256", + "name": "balanceFromBefore", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "balanceToBefore", + "type": "uint256" + } + ], + "name": "finalizeTransfer", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiverAddress", + "type": "address" + }, + { "internalType": "address[]", "name": "assets", "type": "address[]" }, + { "internalType": "uint256[]", "name": "amounts", "type": "uint256[]" }, + { + "internalType": "uint256[]", + "name": "interestRateModes", + "type": "uint256[]" + }, + { "internalType": "address", "name": "onBehalfOf", "type": "address" }, + { "internalType": "bytes", "name": "params", "type": "bytes" }, + { "internalType": "uint16", "name": "referralCode", "type": "uint16" } + ], + "name": "flashLoan", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiverAddress", + "type": "address" + }, + { "internalType": "address", "name": "asset", "type": "address" }, + { "internalType": "uint256", "name": "amount", "type": "uint256" }, + { "internalType": "bytes", "name": "params", "type": "bytes" }, + { "internalType": "uint16", "name": "referralCode", "type": "uint16" } + ], + "name": "flashLoanSimple", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getBorrowLogic", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "getBridgeLogic", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "asset", "type": "address" }], + "name": "getConfiguration", + "outputs": [ + { + "components": [{ "internalType": "uint256", "name": "data", "type": "uint256" }], + "internalType": "struct DataTypes.ReserveConfigurationMap", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "uint8", "name": "id", "type": "uint8" }], + "name": "getEModeCategoryBorrowableBitmap", + "outputs": [{ "internalType": "uint128", "name": "", "type": "uint128" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "uint8", "name": "id", "type": "uint8" }], + "name": "getEModeCategoryCollateralBitmap", + "outputs": [{ "internalType": "uint128", "name": "", "type": "uint128" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "uint8", "name": "id", "type": "uint8" }], + "name": "getEModeCategoryCollateralConfig", + "outputs": [ + { + "components": [ + { "internalType": "uint16", "name": "ltv", "type": "uint16" }, + { + "internalType": "uint16", + "name": "liquidationThreshold", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "liquidationBonus", + "type": "uint16" + } + ], + "internalType": "struct DataTypes.CollateralConfig", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "uint8", "name": "id", "type": "uint8" }], + "name": "getEModeCategoryData", + "outputs": [ + { + "components": [ + { "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 DataTypes.EModeCategoryLegacy", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "uint8", "name": "id", "type": "uint8" }], + "name": "getEModeCategoryLabel", + "outputs": [{ "internalType": "string", "name": "", "type": "string" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getEModeLogic", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "getFlashLoanLogic", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "asset", "type": "address" }], + "name": "getLiquidationGracePeriod", + "outputs": [{ "internalType": "uint40", "name": "", "type": "uint40" }], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getLiquidationLogic", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "getPoolLogic", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [{ "internalType": "uint16", "name": "id", "type": "uint16" }], + "name": "getReserveAddressById", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "asset", "type": "address" }], + "name": "getReserveData", + "outputs": [ + { + "components": [ + { + "components": [{ "internalType": "uint256", "name": "data", "type": "uint256" }], + "internalType": "struct DataTypes.ReserveConfigurationMap", + "name": "configuration", + "type": "tuple" + }, + { + "internalType": "uint128", + "name": "liquidityIndex", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "currentLiquidityRate", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "variableBorrowIndex", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "currentVariableBorrowRate", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "currentStableBorrowRate", + "type": "uint128" + }, + { + "internalType": "uint40", + "name": "lastUpdateTimestamp", + "type": "uint40" + }, + { "internalType": "uint16", "name": "id", "type": "uint16" }, + { + "internalType": "address", + "name": "aTokenAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "stableDebtTokenAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "variableDebtTokenAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "interestRateStrategyAddress", + "type": "address" + }, + { + "internalType": "uint128", + "name": "accruedToTreasury", + "type": "uint128" + }, + { "internalType": "uint128", "name": "unbacked", "type": "uint128" }, + { + "internalType": "uint128", + "name": "isolationModeTotalDebt", + "type": "uint128" + } + ], + "internalType": "struct DataTypes.ReserveDataLegacy", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "asset", "type": "address" }], + "name": "getReserveDataExtended", + "outputs": [ + { + "components": [ + { + "components": [{ "internalType": "uint256", "name": "data", "type": "uint256" }], + "internalType": "struct DataTypes.ReserveConfigurationMap", + "name": "configuration", + "type": "tuple" + }, + { + "internalType": "uint128", + "name": "liquidityIndex", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "currentLiquidityRate", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "variableBorrowIndex", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "currentVariableBorrowRate", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "__deprecatedStableBorrowRate", + "type": "uint128" + }, + { + "internalType": "uint40", + "name": "lastUpdateTimestamp", + "type": "uint40" + }, + { "internalType": "uint16", "name": "id", "type": "uint16" }, + { + "internalType": "uint40", + "name": "liquidationGracePeriodUntil", + "type": "uint40" + }, + { + "internalType": "address", + "name": "aTokenAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "__deprecatedStableDebtTokenAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "variableDebtTokenAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "interestRateStrategyAddress", + "type": "address" + }, + { + "internalType": "uint128", + "name": "accruedToTreasury", + "type": "uint128" + }, + { "internalType": "uint128", "name": "unbacked", "type": "uint128" }, + { + "internalType": "uint128", + "name": "isolationModeTotalDebt", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "virtualUnderlyingBalance", + "type": "uint128" + } + ], + "internalType": "struct DataTypes.ReserveData", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "asset", "type": "address" }], + "name": "getReserveNormalizedIncome", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "asset", "type": "address" }], + "name": "getReserveNormalizedVariableDebt", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getReservesCount", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getReservesList", + "outputs": [{ "internalType": "address[]", "name": "", "type": "address[]" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getSupplyLogic", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "user", "type": "address" }], + "name": "getUserAccountData", + "outputs": [ + { + "internalType": "uint256", + "name": "totalCollateralBase", + "type": "uint256" + }, + { "internalType": "uint256", "name": "totalDebtBase", "type": "uint256" }, + { + "internalType": "uint256", + "name": "availableBorrowsBase", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "currentLiquidationThreshold", + "type": "uint256" + }, + { "internalType": "uint256", "name": "ltv", "type": "uint256" }, + { "internalType": "uint256", "name": "healthFactor", "type": "uint256" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "user", "type": "address" }], + "name": "getUserConfiguration", + "outputs": [ + { + "components": [{ "internalType": "uint256", "name": "data", "type": "uint256" }], + "internalType": "struct DataTypes.UserConfigurationMap", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "user", "type": "address" }], + "name": "getUserEMode", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "asset", "type": "address" }], + "name": "getVirtualUnderlyingBalance", + "outputs": [{ "internalType": "uint128", "name": "", "type": "uint128" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "asset", "type": "address" }, + { "internalType": "address", "name": "aTokenAddress", "type": "address" }, + { + "internalType": "address", + "name": "variableDebtAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "interestRateStrategyAddress", + "type": "address" + } + ], + "name": "initReserve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IPoolAddressesProvider", + "name": "provider", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "collateralAsset", + "type": "address" + }, + { "internalType": "address", "name": "debtAsset", "type": "address" }, + { "internalType": "address", "name": "user", "type": "address" }, + { "internalType": "uint256", "name": "debtToCover", "type": "uint256" }, + { "internalType": "bool", "name": "receiveAToken", "type": "bool" } + ], + "name": "liquidationCall", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [{ "internalType": "address[]", "name": "assets", "type": "address[]" }], + "name": "mintToTreasury", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "asset", "type": "address" }, + { "internalType": "uint256", "name": "amount", "type": "uint256" }, + { "internalType": "address", "name": "onBehalfOf", "type": "address" }, + { "internalType": "uint16", "name": "referralCode", "type": "uint16" } + ], + "name": "mintUnbacked", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "asset", "type": "address" }, + { "internalType": "uint256", "name": "amount", "type": "uint256" }, + { + "internalType": "uint256", + "name": "interestRateMode", + "type": "uint256" + }, + { "internalType": "address", "name": "onBehalfOf", "type": "address" } + ], + "name": "repay", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "asset", "type": "address" }, + { "internalType": "uint256", "name": "amount", "type": "uint256" }, + { + "internalType": "uint256", + "name": "interestRateMode", + "type": "uint256" + } + ], + "name": "repayWithATokens", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "asset", "type": "address" }, + { "internalType": "uint256", "name": "amount", "type": "uint256" }, + { + "internalType": "uint256", + "name": "interestRateMode", + "type": "uint256" + }, + { "internalType": "address", "name": "onBehalfOf", "type": "address" }, + { "internalType": "uint256", "name": "deadline", "type": "uint256" }, + { "internalType": "uint8", "name": "permitV", "type": "uint8" }, + { "internalType": "bytes32", "name": "permitR", "type": "bytes32" }, + { "internalType": "bytes32", "name": "permitS", "type": "bytes32" } + ], + "name": "repayWithPermit", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "token", "type": "address" }, + { "internalType": "address", "name": "to", "type": "address" }, + { "internalType": "uint256", "name": "amount", "type": "uint256" } + ], + "name": "rescueTokens", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "asset", "type": "address" }], + "name": "resetIsolationModeTotalDebt", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "asset", "type": "address" }, + { + "components": [{ "internalType": "uint256", "name": "data", "type": "uint256" }], + "internalType": "struct DataTypes.ReserveConfigurationMap", + "name": "configuration", + "type": "tuple" + } + ], + "name": "setConfiguration", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "asset", "type": "address" }, + { "internalType": "uint40", "name": "until", "type": "uint40" } + ], + "name": "setLiquidationGracePeriod", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "asset", "type": "address" }, + { + "internalType": "address", + "name": "rateStrategyAddress", + "type": "address" + } + ], + "name": "setReserveInterestRateStrategyAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [{ "internalType": "uint8", "name": "categoryId", "type": "uint8" }], + "name": "setUserEMode", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "asset", "type": "address" }, + { "internalType": "bool", "name": "useAsCollateral", "type": "bool" } + ], + "name": "setUserUseReserveAsCollateral", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "asset", "type": "address" }, + { "internalType": "uint256", "name": "amount", "type": "uint256" }, + { "internalType": "address", "name": "onBehalfOf", "type": "address" }, + { "internalType": "uint16", "name": "referralCode", "type": "uint16" } + ], + "name": "supply", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "asset", "type": "address" }, + { "internalType": "uint256", "name": "amount", "type": "uint256" }, + { "internalType": "address", "name": "onBehalfOf", "type": "address" }, + { "internalType": "uint16", "name": "referralCode", "type": "uint16" }, + { "internalType": "uint256", "name": "deadline", "type": "uint256" }, + { "internalType": "uint8", "name": "permitV", "type": "uint8" }, + { "internalType": "bytes32", "name": "permitR", "type": "bytes32" }, + { "internalType": "bytes32", "name": "permitS", "type": "bytes32" } + ], + "name": "supplyWithPermit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "asset", "type": "address" }], + "name": "syncIndexesState", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "asset", "type": "address" }], + "name": "syncRatesState", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [{ "internalType": "uint256", "name": "protocolFee", "type": "uint256" }], + "name": "updateBridgeProtocolFee", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint128", + "name": "flashLoanPremiumTotal", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "flashLoanPremiumToProtocol", + "type": "uint128" + } + ], + "name": "updateFlashloanPremiums", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "asset", "type": "address" }, + { "internalType": "uint256", "name": "amount", "type": "uint256" }, + { "internalType": "address", "name": "to", "type": "address" } + ], + "name": "withdraw", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/packages/addresses/package.json b/packages/addresses/package.json index 8bf9df0f9..db68ecff2 100644 --- a/packages/addresses/package.json +++ b/packages/addresses/package.json @@ -1,6 +1,6 @@ { "name": "@oasisdex/addresses", - "version": "0.1.80", + "version": "0.1.87", "typings": "lib/index.d.ts", "types": "lib/index.d.ts", "main": "lib/index.js", diff --git a/packages/deploy-configurations/configs/arbitrum.conf.ts b/packages/deploy-configurations/configs/arbitrum.conf.ts index 01bfa51c9..19f0d35f8 100644 --- a/packages/deploy-configurations/configs/arbitrum.conf.ts +++ b/packages/deploy-configurations/configs/arbitrum.conf.ts @@ -101,6 +101,13 @@ export const config: SystemConfig = { history: [], constructorArgs: [], }, + AaveRewardsProxyActions: { + name: 'AaveRewardsProxyActions', + deploy: true, + address: '0x09e13fF37ad8d94381f8dE549D77e6F04cEFfA6F', + history: [], + constructorArgs: [], + }, }, actions: { ERC4626Deposit: { @@ -678,12 +685,16 @@ export const config: SystemConfig = { }, PoolDataProvider: { name: 'PoolDataProvider', - address: '0x69FA688f1Dc47d4B5d8029D5a35FB7a548310654', + address: '0x7F23D86Ee20D869112572136221e173428DD740B', }, L2Encoder: { name: 'L2Encoder', address: '0x9abADECD08572e0eA5aF4d47A9C7984a5AA503dC', }, + RewardsController: { + name: 'RewardsController', + address: '0x929EC64c34a17401F460460D4B9390518E5B473e', + }, }, }, spark: {}, diff --git a/packages/deploy-configurations/configs/base.conf.ts b/packages/deploy-configurations/configs/base.conf.ts index 383936444..0ffbf6b8f 100644 --- a/packages/deploy-configurations/configs/base.conf.ts +++ b/packages/deploy-configurations/configs/base.conf.ts @@ -101,6 +101,13 @@ export const config: SystemConfig = { history: [], constructorArgs: [], }, + AaveRewardsProxyActions: { + name: 'AaveRewardsProxyActions', + deploy: true, + address: '0x2b1c1925987009Fd39ced009a1b11Db21BE3c2AC', + history: [], + constructorArgs: [], + }, }, actions: { ERC4626Deposit: { @@ -339,6 +346,10 @@ export const config: SystemConfig = { name: 'CUSDCV3', address: '0xb125e6687d4313864e53df431d5425969c15eb2f', }, + CBBTC: { + name: 'CBBTC', + address: '0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf', + }, SNX: { name: 'SNX', address: '0x22e6966B799c4D5B13BE962E1D117b56327FDa66', @@ -834,12 +845,16 @@ export const config: SystemConfig = { }, PoolDataProvider: { name: 'PoolDataProvider', - address: '0x2d8A3C5677189723C4cB8873CfC9C8976FDF38Ac', + address: '0xd82a47fdebB5bf5329b09441C3DaB4b5df2153Ad', }, L2Encoder: { name: 'L2Encoder', address: '0x39e97c588B2907Fb67F44fea256Ae3BA064207C5', }, + RewardsController: { + name: 'RewardsController', + address: '0xf9cc4F0D883F1a1eb2c253bdb46c254Ca51E1F44', + }, }, }, spark: {}, diff --git a/packages/deploy-configurations/configs/goerli.conf.ts b/packages/deploy-configurations/configs/goerli.conf.ts index 84a9c208b..ed3eb87da 100644 --- a/packages/deploy-configurations/configs/goerli.conf.ts +++ b/packages/deploy-configurations/configs/goerli.conf.ts @@ -92,6 +92,13 @@ export const config: SystemConfig = { history: [], constructorArgs: [], }, + AaveRewardsProxyActions: { + name: 'AaveRewardsProxyActions', + deploy: true, + address: '', + history: [], + constructorArgs: [], + }, }, actions: { ERC4626Deposit: { @@ -590,6 +597,10 @@ export const config: SystemConfig = { name: 'L2Encoder', address: ADDRESS_ZERO, }, + RewardsController: { + name: 'RewardsController', + address: ADDRESS_ZERO, + }, }, }, maker: { diff --git a/packages/deploy-configurations/configs/hardhat.conf.ts b/packages/deploy-configurations/configs/hardhat.conf.ts index c6473f745..e142d3d6f 100644 --- a/packages/deploy-configurations/configs/hardhat.conf.ts +++ b/packages/deploy-configurations/configs/hardhat.conf.ts @@ -108,6 +108,13 @@ export const config: SystemConfig = { history: [], constructorArgs: [], }, + AaveRewardsProxyActions: { + name: 'AaveRewardsProxyActions', + deploy: true, + address: '', + history: [], + constructorArgs: [], + }, }, actions: { ERC4626Deposit: { @@ -778,12 +785,16 @@ export const config: SystemConfig = { }, PoolDataProvider: { name: 'PoolDataProvider', - address: '0x7B4EB56E7CD4b454BA8ff71E4518426369a138a3', + address: '0x41393e5e337606dc3821075Af65AeE84D7688CBD', }, L2Encoder: { name: 'L2Encoder', address: '0x0000000000000000000000000000000000000000', }, + RewardsController: { + name: 'RewardsController', + address: '0x8164Cc65827dcFe994AB23944CBC90e0aa80bFcb', + }, }, }, spark: { diff --git a/packages/deploy-configurations/configs/local.conf.ts b/packages/deploy-configurations/configs/local.conf.ts index 7008184af..c92a4537e 100644 --- a/packages/deploy-configurations/configs/local.conf.ts +++ b/packages/deploy-configurations/configs/local.conf.ts @@ -105,6 +105,13 @@ export const config: SystemConfig = { history: [], constructorArgs: [], }, + AaveRewardsProxyActions: { + name: 'AaveRewardsProxyActions', + deploy: true, + address: '', + history: [], + constructorArgs: [], + }, }, actions: { ERC4626Deposit: { @@ -746,12 +753,16 @@ export const config: SystemConfig = { }, PoolDataProvider: { name: 'PoolDataProvider', - address: '0x7B4EB56E7CD4b454BA8ff71E4518426369a138a3', + address: '0x41393e5e337606dc3821075Af65AeE84D7688CBD', }, L2Encoder: { name: 'L2Encoder', address: '0x0000000000000000000000000000000000000000', }, + RewardsController: { + name: 'RewardsController', + address: '0x8164Cc65827dcFe994AB23944CBC90e0aa80bFcb', + }, }, }, spark: {}, diff --git a/packages/deploy-configurations/configs/mainnet.conf.ts b/packages/deploy-configurations/configs/mainnet.conf.ts index 6e3d53751..ab6ec3974 100644 --- a/packages/deploy-configurations/configs/mainnet.conf.ts +++ b/packages/deploy-configurations/configs/mainnet.conf.ts @@ -2,9 +2,6 @@ import { loadContractNames } from '@deploy-configurations/constants' import { SystemConfig } from '@deploy-configurations/types/deployment-config' import { Network } from '@deploy-configurations/types/network' -import { commonDefaults } from './shared/common-defaults' -import { emptyAjnaPools } from './shared/empty-ajna-pools' - const SERVICE_REGISTRY_NAMES = loadContractNames(Network.MAINNET) export const config: SystemConfig = { @@ -102,6 +99,13 @@ export const config: SystemConfig = { history: [], constructorArgs: [], }, + AaveRewardsProxyActions: { + name: 'AaveRewardsProxyActions', + deploy: true, + address: '0x1498fEb3731b3ED60443F67dB323f0807d887a4a', + history: ['0x8aD75eFF83EbcB2E343b1b8d76eFBC796Cf38594'], + constructorArgs: [], + }, }, actions: { ERC4626Deposit: { @@ -406,7 +410,42 @@ export const config: SystemConfig = { }, }, common: { - ...commonDefaults, + ARB: { + name: 'ARB', + address: '0x0000000000000000000000000000000000000000', + }, + CRV: { + name: 'CRV', + address: '0xD533a949740bb3306d119CC777fa900bA034cd52', + }, + MKR: { + name: 'MKR', + address: '0x9f8F72aA9304c8B593d555F12eF6589cC3A579A2', + }, + OP: { + name: 'OP', + address: '0x0000000000000000000000000000000000000000', + }, + SUSD: { + name: 'SUSD', + address: '0x0000000000000000000000000000000000000000', + }, + SWBTC: { + name: 'SWBTC', + address: '0x8db2350d78abc13f5673a411d4700bcf87864dde', + }, + USDE: { + name: 'USDE', + address: '0x4c9edd5852cd905f086c759e8383e09bff1e68b3', + }, + RPL: { + name: 'RPL', + address: '0xd33526068d116ce69f19a9ee46f0bd304f21a51f', + }, + SUSDE: { + name: 'SUSDE', + address: '0x9d39a5de30e57443bff2a8307a4256c8797a3497', + }, CSETH: { name: 'CSETH', address: '0x5d74468b69073f809d4fae90afec439e69bf6263', @@ -435,22 +474,110 @@ export const config: SystemConfig = { name: 'XETH', address: '0xe063f04f280c60aeca68b38341c2eecbec703ae2', }, - ARB: { - name: 'ARB', - address: '0x0000000000000000000000000000000000000000', + PYUSD: { + name: 'PYUSD', + address: '0x6c3ea9036406852006290770bedfcaba0e23a0e8', }, - CRV: { - name: 'CRV', - address: '0xD533a949740bb3306d119CC777fa900bA034cd52', + USDEOracle: { + name: 'USDEOracle', + address: '0xaE4750d0813B5E37A51f7629beedd72AF1f9cA35', }, - OP: { - name: 'OP', - address: '0x0000000000000000000000000000000000000000', + SUSDEOracle: { + name: 'SUSDEOracle', + address: '0x5D916980D5Ae1737a8330Bf24dF812b2911Aae25', }, - SUSD: { - name: 'SUSD', + CRVUSD: { + name: 'CRVUSD', + address: '0xf939e0a03fb07f59a73314e73794be0e57ac1b4e', + }, + AETHSDAI: { + name: 'AETHSDAI', + address: '0x4C612E3B15b96Ff9A6faED838F8d07d479a8dD4c', + }, + AETHUSDC: { + name: 'AETHUSDC', + address: '0x98C23E9d8f34FEFb1B7BD6a91B7FF122F4e16F5c', + }, + AETHUSDT: { + name: 'AETHUSDT', + address: '0x23878914EFE38d27C4D67Ab83ed1b93A74D4086a', + }, + AETHDAI: { + name: 'AETHDAI', + address: '0x018008bfb33d285247A21d44E50697654f754e63', + }, + AETHPYUSD: { + name: 'AETHPYUSD', + address: '0x0C0d01AbF3e6aDfcA0989eBbA9d6e85dD58EaB1E', + }, + AETHLUSD: { + name: 'AETHLUSD', + address: '0x3Fe6a295459FAe07DF8A0ceCC36F37160FE86AA9', + }, + AUSDC: { + name: 'AUSDC', + address: '0xBcca60bB61934080951369a648Fb03DF4F96263C', + }, + AUSDT: { + name: 'AUSDT', + address: '0x3Ed3B47Dd13EC9a98b44e6204A523E766B225811', + }, + CUSDCV3: { + name: 'CUSDCV3', + address: '0xc3d688B66703497DAA19211EEdff47f25384cdc3', + }, + CDAI: { + name: 'CDAI', + address: '0x5d3a536E4D6DbD6114cc1Ead35777bAB948E3643', + }, + CUSDC: { + name: 'CUSDC', + address: '0x39AA39c021dfbaE8faC545936693aC917d5E7563', + }, + AETHWSTETH: { + name: 'AETHWSTETH', + address: '0x0B925eD163218f6662a35e0f0371Ac234f9E9371', + }, + AETHWETH: { + name: 'AETHWETH', + address: '0x4d5F47FA6A74757f35C14fD3a6Ef8E3C9BC514E8', + }, + AETHRETH: { + name: 'AETHRETH', + address: '0xCc9EE9483f662091a1de4795249E24aC0aC2630f', + }, + AETHCBETH: { + name: 'AETHCBETH', + address: '0x977b6fc5dE62598B08C85AC8Cf2b745874E8b78c', + }, + ASETH: { + name: 'ASETH', + address: '0x1982b2F5814301d4e9a8b0201555376e62F82428', + }, + AWETH: { + name: 'AWETH', + address: '0x030bA81f1c18d280636F32af80b9AAd02Cf0854e', + }, + CETH: { + name: 'CETH', + address: '0x4Ddc2D193948926D02f9B1fE9e1daa0718270ED5', + }, + BSDETH: { + name: 'BSDETH', address: '0x0000000000000000000000000000000000000000', }, + CWETHV3: { + name: 'CWETHV3', + address: '0xA17581A9E3356d9A858b789D68B4d866e593aE94', + }, + AETHWBTC: { + name: 'AETHWBTC', + address: '0x5Ee5bf7ae06D1Be5997A1A72006FE6C607eC6DE8', + }, + AWBTC: { + name: 'AWBTC', + address: '0xFC4B8ED459e00e5400be803A9BB3954234FD50e3', + }, DEGEN: { name: 'DEGEN', address: '0x0000000000000000000000000000000000000000', @@ -459,18 +586,62 @@ export const config: SystemConfig = { name: 'SNX', address: '0x0000000000000000000000000000000000000000', }, - SUSDE: { - name: 'SUSDE', - address: '0x9d39a5de30e57443bff2a8307a4256c8797a3497', - }, - RPL: { - name: 'RPL', - address: '0xd33526068d116ce69f19a9ee46f0bd304f21a51f', - }, ENA: { name: 'ENA', address: '0x57e114b691db790c35207b2e685d4a43181e6061', }, + AERO: { + name: 'AERO', + address: '0x0000000000000000000000000000000000000000', + }, + PRIME: { + name: 'PRIME', + address: '0x0000000000000000000000000000000000000000', + }, + USDA: { + name: 'USDA', + address: '0x0000206329b97DB379d5E1Bf586BbDB969C63274', + }, + SAFE: { + name: 'SAFE', + address: '0x5aFE3855358E112B5647B952709E6165e1c1eEEe', + }, + PTWEETH: { + name: 'PTWEETH', + address: '0xc69ad9bab1dee23f4605a82b3354f8e40d1e5966', + }, + WOETH: { + name: 'WOETH', + address: '0xdcee70654261af21c44c093c300ed3bb97b78192', + }, + RSETH: { + name: 'RSETH', + address: '0xa1290d69c65a6fe4df752f95823fae25cb99e5a7', + }, + 'UNI-V2': { + name: 'UNI-V2', + address: '0x9fdd7f845baca6d71d93f1619250c6f0b7a58842', + }, + SYRUPUSDC: { + name: 'SYRUPUSDC', + address: '0x80ac24aa929eaf5013f6436cda2a7ba190f5cc0b', + }, + ChainlinkPriceOracle_BTCUSD: { + name: 'ChainlinkPriceOracle_BTCUSD', + address: '0xF4030086522a5bEEa4988F8cA5B36dbC97BeE88c', + }, + RSWETH: { + name: 'RSWETH', + address: '0xFAe103DC9cf190eD75350761e95403b7b8aFa6c0', + }, + LBTC: { + name: 'LBTC', + address: '0x8236a87084f8b84306f72007f36f2618a5634494', + }, + WSUPEROETHB: { + name: 'WSUPEROETHB', + address: '0x0000000000000000000000000000000000000000', + }, GnosisSafe: { name: 'GnosisSafe', address: '0x85f9b7408afE6CEb5E46223451f5d4b832B522dc', @@ -576,10 +747,6 @@ export const config: SystemConfig = { name: 'ChainlinkPriceOracle_ETHUSD', address: '0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419', }, - ChainlinkPriceOracle_BTCUSD: { - name: 'ChainlinkPriceOracle_BTCUSD', - address: '0xF4030086522a5bEEa4988F8cA5B36dbC97BeE88c', - }, SdaiOracle: { name: 'SdaiOracle', address: '0xb9E6DBFa4De19CCed908BcbFe1d015190678AB5f', @@ -588,14 +755,6 @@ export const config: SystemConfig = { name: 'WSTETHOracle', address: '0x8B6851156023f4f5A66F68BEA80851c3D905Ac93', }, - USDEOracle: { - name: 'USDEOracle', - address: '0xaE4750d0813B5E37A51f7629beedd72AF1f9cA35', - }, - SUSDEOracle: { - name: 'SUSDEOracle', - address: '0x5D916980D5Ae1737a8330Bf24dF812b2911Aae25', - }, AAVE: { name: 'AAVE', address: '0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9', @@ -628,6 +787,10 @@ export const config: SystemConfig = { name: 'CBETH', address: '0xbe9895146f7af43049ca1c1ae358b0541ea49704', }, + CBBTC: { + name: 'CBBTC', + address: '0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf', + }, COMP: { name: 'COMP', address: '0xc00e94Cb662C3520282E6f5717214004A7f26888', @@ -697,10 +860,6 @@ export const config: SystemConfig = { name: 'MATIC', address: '0x7D1AfA7B718fb893dB30A3aBc0Cfc608AaCfeBB0', }, - MKR: { - name: 'MKR', - address: '0x9f8F72aA9304c8B593d555F12eF6589cC3A579A2', - }, MORPHO: { name: 'MORPHO', address: '0x9994e35db50125e0df82e4c2dde62496ce330999', @@ -717,14 +876,6 @@ export const config: SystemConfig = { name: 'PAXUSD', address: '0x8E870D67F660D95d5be530380D0eC0bd388289E1', }, - PTWEETH: { - name: 'PTWEETH', - address: '0xc69ad9bab1dee23f4605a82b3354f8e40d1e5966', - }, - PYUSD: { - name: 'PYUSD', - address: '0x6c3ea9036406852006290770bedfcaba0e23a0e8', - }, RENBTC: { name: 'RENBTC', address: '0xEB4C2781e4ebA804CE9a9803C67d0893436bB27D', @@ -741,14 +892,6 @@ export const config: SystemConfig = { name: 'RWA001', address: '0x10b2aA5D77Aa6484886d8e244f0686aB319a270d', }, - RSETH: { - name: 'RSETH', - address: '0xa1290d69c65a6fe4df752f95823fae25cb99e5a7', - }, - RSWETH: { - name: 'RSWETH', - address: '0xFAe103DC9cf190eD75350761e95403b7b8aFa6c0', - }, RWA002: { name: 'RWA002', address: '0xAAA760c2027817169D7C8DB0DC61A2fb4c19AC23', @@ -769,26 +912,10 @@ export const config: SystemConfig = { name: 'RWA006', address: '0x4EE03cfBF6E784c462839f5954d60f7C2B60b113', }, - SAFE: { - name: 'SAFE', - address: '0x5aFE3855358E112B5647B952709E6165e1c1eEEe', - }, - SYRUPUSDC: { - name: 'SYRUPUSDC', - address: '0x80ac24aa929eaf5013f6436cda2a7ba190f5cc0b', - }, SDAI: { name: 'SDAI', address: '0x83f20f44975d03b1b09e64809b757c47f942beea', }, - SWBTC: { - name: 'SWBTC', - address: '0x8db2350d78abc13f5673a411d4700bcf87864dde', - }, - LBTC: { - name: 'LBTC', - address: '0x8236a87084f8b84306f72007f36f2618a5634494', - }, STETH: { name: 'STETH', address: '0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84', @@ -850,19 +977,11 @@ export const config: SystemConfig = { name: 'UNIV2WBTCETH', address: '0xBb2b8038a1640196FbE3e38816F3e67Cba72D940', }, - USDA: { - name: 'USDA', - address: '0x0000206329b97DB379d5E1Bf586BbDB969C63274', - }, USDC: { name: 'USDC', address: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', serviceRegistryName: SERVICE_REGISTRY_NAMES.common.USDC, }, - USDE: { - name: 'USDE', - address: '0x4c9edd5852cd905f086c759e8383e09bff1e68b3', - }, 'USDC.E': { name: 'USDC.E', address: '0x0000000000000000000000000000000000000000', @@ -885,10 +1004,6 @@ export const config: SystemConfig = { address: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2', serviceRegistryName: SERVICE_REGISTRY_NAMES.common.WETH, }, - WOETH: { - name: 'WOETH', - address: '0xdcee70654261af21c44c093c300ed3bb97b78192', - }, WLD: { name: 'WLD', address: '0x163f8c2467924be0ae7b5347228cabf260318753', @@ -918,98 +1033,6 @@ export const config: SystemConfig = { name: 'ZRX', address: '0xE41d2489571d322189246DaFA5ebDe1F4699F498', }, - CRVUSD: { - name: 'CRVUSD', - address: '0xf939e0a03fb07f59a73314e73794be0e57ac1b4e', - }, - AETHSDAI: { - name: 'AETHSDAI', - address: '0x4C612E3B15b96Ff9A6faED838F8d07d479a8dD4c', - }, - AETHUSDC: { - name: 'AETHUSDC', - address: '0x98C23E9d8f34FEFb1B7BD6a91B7FF122F4e16F5c', - }, - AETHUSDT: { - name: 'AETHUSDT', - address: '0x23878914EFE38d27C4D67Ab83ed1b93A74D4086a', - }, - AETHDAI: { - name: 'AETHDAI', - address: '0x018008bfb33d285247A21d44E50697654f754e63', - }, - AETHPYUSD: { - name: 'AETHPYUSD', - address: '0x0C0d01AbF3e6aDfcA0989eBbA9d6e85dD58EaB1E', - }, - AETHLUSD: { - name: 'AETHLUSD', - address: '0x3Fe6a295459FAe07DF8A0ceCC36F37160FE86AA9', - }, - AUSDC: { - name: 'AUSDC', - address: '0xBcca60bB61934080951369a648Fb03DF4F96263C', - }, - AUSDT: { - name: 'AUSDT', - address: '0x3Ed3B47Dd13EC9a98b44e6204A523E766B225811', - }, - CUSDCV3: { - name: 'CUSDCV3', - address: '0xc3d688B66703497DAA19211EEdff47f25384cdc3', - }, - CDAI: { - name: 'CDAI', - address: '0x5d3a536E4D6DbD6114cc1Ead35777bAB948E3643', - }, - CUSDC: { - name: 'CUSDC', - address: '0x39AA39c021dfbaE8faC545936693aC917d5E7563', - }, - AETHWSTETH: { - name: 'AETHWSTETH', - address: '0x0B925eD163218f6662a35e0f0371Ac234f9E9371', - }, - AETHWETH: { - name: 'AETHWETH', - address: '0x4d5F47FA6A74757f35C14fD3a6Ef8E3C9BC514E8', - }, - AETHRETH: { - name: 'AETHRETH', - address: '0xCc9EE9483f662091a1de4795249E24aC0aC2630f', - }, - AETHCBETH: { - name: 'AETHCBETH', - address: '0x977b6fc5dE62598B08C85AC8Cf2b745874E8b78c', - }, - ASETH: { - name: 'ASETH', - address: '0x1982b2F5814301d4e9a8b0201555376e62F82428', - }, - AWETH: { - name: 'AWETH', - address: '0x030bA81f1c18d280636F32af80b9AAd02Cf0854e', - }, - CETH: { - name: 'CETH', - address: '0x4Ddc2D193948926D02f9B1fE9e1daa0718270ED5', - }, - CWETHV3: { - name: 'CWETHV3', - address: '0xA17581A9E3356d9A858b789D68B4d866e593aE94', - }, - AETHWBTC: { - name: 'AETHWBTC', - address: '0x5Ee5bf7ae06D1Be5997A1A72006FE6C607eC6DE8', - }, - AWBTC: { - name: 'AWBTC', - address: '0xFC4B8ED459e00e5400be803A9BB3954234FD50e3', - }, - 'UNI-V2': { - name: 'UNI-V2', - address: '0x9fdd7f845baca6d71d93f1619250c6f0b7a58842', - }, }, aave: { v2: { @@ -1044,12 +1067,16 @@ export const config: SystemConfig = { }, PoolDataProvider: { name: 'PoolDataProvider', - address: '0x7B4EB56E7CD4b454BA8ff71E4518426369a138a3', + address: '0x41393e5e337606dc3821075Af65AeE84D7688CBD', }, L2Encoder: { name: 'L2Encoder', address: '0x0000000000000000000000000000000000000000', }, + RewardsController: { + name: 'RewardsController', + address: '0x8164Cc65827dcFe994AB23944CBC90e0aa80bFcb', + }, }, }, spark: { @@ -1066,6 +1093,10 @@ export const config: SystemConfig = { name: 'PoolDataProvider', address: '0xFc21d6d146E6086B8359705C8b28512a983db0cb', }, + RewardsController: { + name: 'RewardsController', + address: '0x4370D3b6C9588E02ce9D22e684387859c7Ff5b34', + }, }, maker: { common: { @@ -1527,7 +1558,6 @@ export const config: SystemConfig = { }, }, ajna: { - ...emptyAjnaPools, AjnaPoolPairs_AJNADAI: { name: 'AjnaPoolPairs_AJNADAI', address: '0x2feef99a711d684e00a017c4ac587bea31f12875', @@ -1732,6 +1762,26 @@ export const config: SystemConfig = { name: 'AjnaPoolPairs_EZETHWETH', address: '0x95af0f183cee1d797c921f53090c73f310610e73', }, + AjnaPoolPairs_DEGENUSDC: { + name: 'AjnaPoolPairs_DEGENUSDC', + address: '0x0000000000000000000000000000000000000000', + }, + AjnaPoolPairs_DEGENCUSDCV3: { + name: 'AjnaPoolPairs_DEGENCUSDCV3', + address: '0x0000000000000000000000000000000000000000', + }, + AjnaPoolPairs_USDCDEGEN: { + name: 'AjnaPoolPairs_USDCDEGEN', + address: '0x0000000000000000000000000000000000000000', + }, + AjnaPoolPairs_SNXUSDC: { + name: 'AjnaPoolPairs_SNXUSDC', + address: '0x0000000000000000000000000000000000000000', + }, + AjnaPoolPairs_SNXCUSDCV3: { + name: 'AjnaPoolPairs_SNXCUSDCV3', + address: '0x0000000000000000000000000000000000000000', + }, AjnaPoolPairs_ENASDAI: { name: 'AjnaPoolPairs_ENASDAI', address: '0x4176747Bc01BE99f9e8FE78A7b2303d4662a2244', @@ -1740,6 +1790,14 @@ export const config: SystemConfig = { name: 'AjnaPoolPairs_SDAIENA', address: '0x52054b0f7f07bb8e6daa06d177ece312ccc1f685', }, + AjnaPoolPairs_AEROUSDC: { + name: 'AjnaPoolPairs_AEROUSDC', + address: '0x0000000000000000000000000000000000000000', + }, + AjnaPoolPairs_PRIMEUSDC: { + name: 'AjnaPoolPairs_PRIMEUSDC', + address: '0x0000000000000000000000000000000000000000', + }, AjnaPoolPairs_SAFEDAI: { name: 'AjnaPoolPairs_SAFEDAI', address: '0x37b5921f0da465df64637a418110a2e3aa90b209', @@ -1748,6 +1806,14 @@ export const config: SystemConfig = { name: 'AjnaPoolPairs_UNI-V2DAI', address: '0xc71ad394818474f87f27a5525243de52c278dcb8', }, + 'AjnaPoolPairs_MOOAURAGYROAUSDCN/AUSDTNUSDC': { + name: 'AjnaPoolPairs_MOOAURAGYROAUSDCN/AUSDTNUSDC', + address: '0x0000000000000000000000000000000000000000', + }, + AjnaPoolPairs_SUSDCYUSDC: { + name: 'AjnaPoolPairs_SUSDCYUSDC', + address: '0x0000000000000000000000000000000000000000', + }, AjnaPoolPairs_WOETHETH: { name: 'AjnaPoolPairs_WOETHETH', address: '0xDD433012C0d99AEbE83FFf55B4D405831DE85fbc', diff --git a/packages/deploy-configurations/configs/optimism.conf.ts b/packages/deploy-configurations/configs/optimism.conf.ts index a07d83c01..795eb23e4 100644 --- a/packages/deploy-configurations/configs/optimism.conf.ts +++ b/packages/deploy-configurations/configs/optimism.conf.ts @@ -102,6 +102,13 @@ export const config: SystemConfig = { history: [], constructorArgs: [], }, + AaveRewardsProxyActions: { + name: 'AaveRewardsProxyActions', + deploy: true, + address: '0x85859Ab683019a4E345D963E455B5e3Ce133Ef49', + history: [], + constructorArgs: [], + }, }, actions: { ERC4626Deposit: { @@ -729,12 +736,16 @@ export const config: SystemConfig = { }, PoolDataProvider: { name: 'PoolDataProvider', - address: '0x69FA688f1Dc47d4B5d8029D5a35FB7a548310654', + address: '0x7F23D86Ee20D869112572136221e173428DD740B', }, L2Encoder: { name: 'L2Encoder', address: '0x9abADECD08572e0eA5aF4d47A9C7984a5AA503dC', }, + RewardsController: { + name: 'RewardsController', + address: '0x929EC64c34a17401F460460D4B9390518E5B473e', + }, }, }, spark: {}, diff --git a/packages/deploy-configurations/configs/sepolia.conf.ts b/packages/deploy-configurations/configs/sepolia.conf.ts index 2d7e30a33..b6641cc74 100644 --- a/packages/deploy-configurations/configs/sepolia.conf.ts +++ b/packages/deploy-configurations/configs/sepolia.conf.ts @@ -92,6 +92,13 @@ export const config: SystemConfig = { history: [], constructorArgs: [], }, + AaveRewardsProxyActions: { + name: 'AaveRewardsProxyActions', + deploy: true, + address: '', + history: [], + constructorArgs: [], + }, }, actions: { ERC4626Deposit: { @@ -594,6 +601,10 @@ export const config: SystemConfig = { name: 'L2Encoder', address: ADDRESS_ZERO, }, + RewardsController: { + name: 'RewardsController', + address: '0x0000000000000000000000000000000000000000', + }, }, }, maker: { diff --git a/packages/deploy-configurations/configs/shared/common-defaults.ts b/packages/deploy-configurations/configs/shared/common-defaults.ts index de2a68746..127e9ce9d 100644 --- a/packages/deploy-configurations/configs/shared/common-defaults.ts +++ b/packages/deploy-configurations/configs/shared/common-defaults.ts @@ -236,4 +236,8 @@ export const commonDefaults = { name: 'WSUPEROETHB', address: ADDRESS_ZERO, }, + CBBTC: { + name: 'CBBTC', + address: ADDRESS_ZERO, + }, } as const diff --git a/packages/deploy-configurations/configs/tenderly.conf.ts b/packages/deploy-configurations/configs/tenderly.conf.ts index c7520f093..b24c06f05 100644 --- a/packages/deploy-configurations/configs/tenderly.conf.ts +++ b/packages/deploy-configurations/configs/tenderly.conf.ts @@ -133,6 +133,13 @@ export const config: SystemConfig = { history: [], constructorArgs: [], }, + AaveRewardsProxyActions: { + name: 'AaveRewardsProxyActions', + deploy: true, + address: '', + history: [], + constructorArgs: [], + }, }, actions: { ERC4626Deposit: { @@ -795,12 +802,16 @@ export const config: SystemConfig = { }, PoolDataProvider: { name: 'PoolDataProvider', - address: '0x7B4EB56E7CD4b454BA8ff71E4518426369a138a3', + address: '0x41393e5e337606dc3821075Af65AeE84D7688CBD', }, L2Encoder: { name: 'L2Encoder', address: '0x0000000000000000000000000000000000000000', }, + RewardsController: { + name: 'RewardsController', + address: '0x8164Cc65827dcFe994AB23944CBC90e0aa80bFcb', + }, }, }, spark: {}, diff --git a/packages/deploy-configurations/configs/test.conf.ts b/packages/deploy-configurations/configs/test.conf.ts index d53484a5f..152100336 100644 --- a/packages/deploy-configurations/configs/test.conf.ts +++ b/packages/deploy-configurations/configs/test.conf.ts @@ -133,6 +133,13 @@ export const config: SystemConfig = { history: [], constructorArgs: [], }, + AaveRewardsProxyActions: { + name: 'AaveRewardsProxyActions', + deploy: true, + address: '', + history: [], + constructorArgs: [], + }, }, actions: { ERC4626Deposit: { @@ -833,12 +840,16 @@ export const config: SystemConfig = { }, PoolDataProvider: { name: 'PoolDataProvider', - address: '0x7B4EB56E7CD4b454BA8ff71E4518426369a138a3', + address: '0x41393e5e337606dc3821075Af65AeE84D7688CBD', }, L2Encoder: { name: 'L2Encoder', address: '0x0000000000000000000000000000000000000000', }, + RewardsController: { + name: 'RewardsController', + address: '0x8164Cc65827dcFe994AB23944CBC90e0aa80bFcb', + }, }, }, spark: { @@ -855,6 +866,10 @@ export const config: SystemConfig = { name: 'PoolDataProvider', address: '0xFc21d6d146E6086B8359705C8b28512a983db0cb', }, + RewardsController: { + name: 'RewardsController', + address: '0x4370D3b6C9588E02ce9D22e684387859c7Ff5b34', + }, }, maker: { common: { diff --git a/packages/deploy-configurations/configs/test/arbitrum.conf.ts b/packages/deploy-configurations/configs/test/arbitrum.conf.ts index 514482bb1..5d2bf0272 100644 --- a/packages/deploy-configurations/configs/test/arbitrum.conf.ts +++ b/packages/deploy-configurations/configs/test/arbitrum.conf.ts @@ -101,6 +101,13 @@ export const config: SystemConfig = { history: [], constructorArgs: [], }, + AaveRewardsProxyActions: { + name: 'AaveRewardsProxyActions', + deploy: true, + address: '', + history: [], + constructorArgs: [], + }, }, actions: { ERC4626Deposit: { @@ -593,12 +600,16 @@ export const config: SystemConfig = { }, PoolDataProvider: { name: 'PoolDataProvider', - address: '0x69FA688f1Dc47d4B5d8029D5a35FB7a548310654', + address: '0x7F23D86Ee20D869112572136221e173428DD740B', }, L2Encoder: { name: 'L2Encoder', address: '0x9abADECD08572e0eA5aF4d47A9C7984a5AA503dC', }, + RewardsController: { + name: 'RewardsController', + address: '0x929EC64c34a17401F460460D4B9390518E5B473e', + }, }, }, spark: {}, diff --git a/packages/deploy-configurations/configs/test/mainnet.conf.ts b/packages/deploy-configurations/configs/test/mainnet.conf.ts index af9ffe35d..1911e741a 100644 --- a/packages/deploy-configurations/configs/test/mainnet.conf.ts +++ b/packages/deploy-configurations/configs/test/mainnet.conf.ts @@ -102,6 +102,13 @@ export const config: SystemConfig = { history: [], constructorArgs: [], }, + AaveRewardsProxyActions: { + name: 'AaveRewardsProxyActions', + deploy: true, + address: '', + history: [], + constructorArgs: [], + }, }, actions: { ERC4626Deposit: { @@ -648,12 +655,16 @@ export const config: SystemConfig = { }, PoolDataProvider: { name: 'PoolDataProvider', - address: '0x7B4EB56E7CD4b454BA8ff71E4518426369a138a3', + address: '0x41393e5e337606dc3821075Af65AeE84D7688CBD', }, L2Encoder: { name: 'L2Encoder', address: ADDRESS_ZERO, }, + RewardsController: { + name: 'RewardsController', + address: '0x8164Cc65827dcFe994AB23944CBC90e0aa80bFcb', + }, }, }, spark: { diff --git a/packages/deploy-configurations/configs/test/optimism.conf.ts b/packages/deploy-configurations/configs/test/optimism.conf.ts index 86c33e8f8..74effa491 100644 --- a/packages/deploy-configurations/configs/test/optimism.conf.ts +++ b/packages/deploy-configurations/configs/test/optimism.conf.ts @@ -101,6 +101,13 @@ export const config: SystemConfig = { history: [], constructorArgs: [], }, + AaveRewardsProxyActions: { + name: 'AaveRewardsProxyActions', + deploy: true, + address: '', + history: [], + constructorArgs: [], + }, }, actions: { ERC4626Deposit: { @@ -555,12 +562,16 @@ export const config: SystemConfig = { }, PoolDataProvider: { name: 'PoolDataProvider', - address: '0x69FA688f1Dc47d4B5d8029D5a35FB7a548310654', + address: '0x7F23D86Ee20D869112572136221e173428DD740B', }, L2Encoder: { name: 'L2Encoder', address: '0x9abADECD08572e0eA5aF4d47A9C7984a5AA503dC', }, + RewardsController: { + name: 'RewardsController', + address: '0x929EC64c34a17401F460460D4B9390518E5B473e', + }, }, }, spark: {}, diff --git a/packages/deploy-configurations/types/deployment-config/aave-protocol.ts b/packages/deploy-configurations/types/deployment-config/aave-protocol.ts index f2248e070..7fac502b8 100644 --- a/packages/deploy-configurations/types/deployment-config/aave-protocol.ts +++ b/packages/deploy-configurations/types/deployment-config/aave-protocol.ts @@ -2,7 +2,7 @@ import { AaveLikeProtocol } from './aave-like-protocol' import { ConfigEntry } from './config-entries' export type AaveV2Protocol = AaveLikeProtocol | 'WETHGateway' -export type AaveV3Protocol = AaveLikeProtocol | 'L2Encoder' +export type AaveV3Protocol = AaveLikeProtocol | 'L2Encoder' | 'RewardsController' export type AaveV2ProtocolContracts = Record export type AaveV3ProtocolContracts = Record diff --git a/packages/deploy-configurations/types/deployment-config/core.ts b/packages/deploy-configurations/types/deployment-config/core.ts index 23ccdcd82..3e3df7881 100644 --- a/packages/deploy-configurations/types/deployment-config/core.ts +++ b/packages/deploy-configurations/types/deployment-config/core.ts @@ -14,6 +14,7 @@ export type Core = | 'AccountFactory' | 'Swap' | 'ERC20ProxyActions' + | 'AaveRewardsProxyActions' export type CoreContracts = Record export type CoreMainnetOnlyContracts = Partial> diff --git a/packages/deploy-configurations/types/deployment-config/spark-protocol.ts b/packages/deploy-configurations/types/deployment-config/spark-protocol.ts index 3273ef380..bc7c39cf9 100644 --- a/packages/deploy-configurations/types/deployment-config/spark-protocol.ts +++ b/packages/deploy-configurations/types/deployment-config/spark-protocol.ts @@ -1,5 +1,5 @@ import { AaveLikeProtocol } from './aave-like-protocol' import { ConfigEntry } from './config-entries' -export type SparkProtocol = AaveLikeProtocol +export type SparkProtocol = AaveLikeProtocol | 'RewardsController' export type OptionalSparkProtocolContracts = Partial> diff --git a/packages/deploy-configurations/types/deployment-config/tokens.ts b/packages/deploy-configurations/types/deployment-config/tokens.ts index 285c4b817..f28067fdb 100644 --- a/packages/deploy-configurations/types/deployment-config/tokens.ts +++ b/packages/deploy-configurations/types/deployment-config/tokens.ts @@ -121,3 +121,4 @@ export type Tokens = | 'SYRUPUSDC' | 'LBTC' | 'WSUPEROETHB' + | 'CBBTC' diff --git a/packages/dma-common/test-utils/addresses.ts b/packages/dma-common/test-utils/addresses.ts index c2548370a..271d30d73 100644 --- a/packages/dma-common/test-utils/addresses.ts +++ b/packages/dma-common/test-utils/addresses.ts @@ -6,6 +6,8 @@ export type NetworkAddressesForNetwork = T extends Network.MA ? MainnetAddresses : T extends Network.OPTIMISM ? OptMainnetAddresses + : T extends Network.ARBITRUM + ? ArbMainnetAddresses : never export function addressesByNetwork(network: T): NetworkAddressesForNetwork { switch (network) { @@ -46,6 +48,7 @@ const testAddresses = { sparkPool: ADDRESSES[Network.MAINNET].spark.LendingPool, sparkOracle: ADDRESSES[Network.MAINNET].spark.Oracle, sparkPoolDataProvider: ADDRESSES[Network.MAINNET].spark.PoolDataProvider, + sparkRewardsController: ADDRESSES[Network.MAINNET].spark.RewardsController, }, [Network.OPTIMISM]: { DAI: ADDRESSES[Network.OPTIMISM].common.DAI, diff --git a/packages/dma-contracts/contracts/core/helpers/AaveRewardsProxyActions.sol b/packages/dma-contracts/contracts/core/helpers/AaveRewardsProxyActions.sol new file mode 100644 index 000000000..649c5a004 --- /dev/null +++ b/packages/dma-contracts/contracts/core/helpers/AaveRewardsProxyActions.sol @@ -0,0 +1,92 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity ^0.8.10; + +import { IRewardsController } from "../../interfaces/aaveV3/IRewardsController.sol"; +import { console } from "hardhat/console.sol"; + +interface IDataProvider { + function getReserveTokensAddresses( + address asset + ) external view returns (address, address, address); +} + +/** + * @title RewardsControllerProxyActions + * @dev A contract that provides helper functions for interacting with RewardsController through a proxy. + */ +contract AaveRewardsProxyActions { + /** + * @dev Claims rewards for the specified assets and amount. + * @param _rewardsController The address of the RewardsController contract. + * @param _assets List of asset addresses. + * @param _amount Amount of rewards to claim. + * @param _reward Address of the reward token. + * @return claimed The amount of rewards claimed. + */ + function claimRewards( + address _rewardsController, + address[] calldata _assets, + uint256 _amount, + address _reward + ) external returns (uint256 claimed) { + claimed = IRewardsController(_rewardsController).claimRewards( + _assets, + _amount, + msg.sender, + _reward + ); + return claimed; + } + + /** + * @dev Claims all rewards for the specified assets. + * @param _rewardsController The address of the RewardsController contract. + * @param _assets List of asset addresses. + * @return rewardsList List of reward token addresses. + * @return claimedAmounts List of claimed amounts corresponding to each reward token. + */ + function claimAllRewards( + address _rewardsController, + address[] calldata _assets + ) external returns (address[] memory rewardsList, uint256[] memory claimedAmounts) { + return IRewardsController(_rewardsController).claimAllRewards(_assets, msg.sender); + } + + /** + * @dev Gets all user rewards for the specified assets. + * @param _rewardsController The address of the RewardsController contract. + * @param _dataProvider The address of the DataProvider contract. + * @param _user The address of the user. + * @param _token The address of the token. + * @return rewardsList List of reward token addresses. + * @return unclaimedAmounts List of unclaimed amounts corresponding to each reward token. + * @dev This function is used to get all user rewards for the specified assets. + * @dev The function first gets the reserve tokens addresses for the specified token. + * @dev Then it creates an array of assets with the aToken and variableDebtToken. + * @dev Finally, it calls the getAllUserRewards function from the RewardsController contract. + */ + function getAllUserRewards( + address _rewardsController, + address _dataProvider, + address _user, + address _token + ) + external + view + returns ( + address[] memory rewardsList, + uint256[] memory unclaimedAmounts, + address[] memory assets + ) + { + IDataProvider dataProvider = IDataProvider(_dataProvider); + (address aToken, , address variableDebtToken) = dataProvider.getReserveTokensAddresses(_token); + assets = new address[](2); + assets[0] = aToken; + assets[1] = variableDebtToken; + (rewardsList, unclaimedAmounts) = IRewardsController(_rewardsController).getAllUserRewards( + assets, + _user + ); + } +} diff --git a/packages/dma-contracts/contracts/interfaces/aaveV3/IRewardsController.sol b/packages/dma-contracts/contracts/interfaces/aaveV3/IRewardsController.sol new file mode 100644 index 000000000..2ebb59064 --- /dev/null +++ b/packages/dma-contracts/contracts/interfaces/aaveV3/IRewardsController.sol @@ -0,0 +1,45 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity ^0.8.15; + +interface IRewardsController { + function claimRewards( + address[] calldata assets, + uint256 amount, + address to, + address reward + ) external returns (uint256); + + function claimRewardsOnBehalf( + address[] calldata assets, + uint256 amount, + address user, + address to, + address reward + ) external returns (uint256); + + function claimRewardsToSelf( + address[] calldata assets, + uint256 amount, + address reward + ) external returns (uint256); + + function claimAllRewards( + address[] calldata assets, + address to + ) external returns (address[] memory rewardsList, uint256[] memory claimedAmounts); + + function claimAllRewardsOnBehalf( + address[] calldata assets, + address user, + address to + ) external returns (address[] memory rewardsList, uint256[] memory claimedAmounts); + + function claimAllRewardsToSelf( + address[] calldata assets + ) external returns (address[] memory rewardsList, uint256[] memory claimedAmounts); + + function getAllUserRewards( + address[] calldata assets, + address user + ) external view returns (address[] memory rewardsList, uint256[] memory unclaimedAmounts); +} diff --git a/packages/dma-contracts/test/e2e/operations/spark-claim-rewards.ts b/packages/dma-contracts/test/e2e/operations/spark-claim-rewards.ts new file mode 100644 index 000000000..63ac4b7ad --- /dev/null +++ b/packages/dma-contracts/test/e2e/operations/spark-claim-rewards.ts @@ -0,0 +1,144 @@ +import { + AaveRewardsProxyActions, + AccountGuard, + ERC20, + ERC20__factory, + WETH, + WETH__factory, +} from '@abis/types/ethers-contracts' +import { ADDRESSES } from '@deploy-configurations/addresses' +import { DeployedSystem } from '@deploy-configurations/types/deployed-system' +import { Network } from '@deploy-configurations/types/network' +import { getNetwork } from '@deploy-configurations/utils/network' +import { addressesByNetwork } from '@dma-common/test-utils' +import { RuntimeConfig } from '@dma-common/types/common' +import { executeThroughDPMProxy } from '@dma-common/utils/execute' +import { restoreSnapshot, Snapshot } from '@dma-contracts/utils' +import { AaveLikeStrategyAddresses } from '@dma-library/operations/aave-like' +import { getAaveLikeSystemContracts } from '@dma-library/protocols/aave-like/utils' +import { impersonateAccount } from '@nomicfoundation/hardhat-network-helpers' +import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers' +import { expect } from 'chai' +import { ethers } from 'ethers' +import hre from 'hardhat' + +describe.only('AAVE V3 | Claim Rewards | E2E', async () => { + let snapshot: Snapshot + let address: string + let signer: SignerWithAddress + let WETH: WETH + let USDC: ERC20 + let config: RuntimeConfig + let system: DeployedSystem + let network: Network + let addresses: ReturnType + let aaveLikeAddresses: AaveLikeStrategyAddresses + + let rewardsControllerAddress: string + let rewardsControllerProxyActionsAddress: string + let rewardsControllerProxyActionsContract: AaveRewardsProxyActions + beforeEach(async () => { + ;({ snapshot } = await restoreSnapshot({ + hre, + blockNumber: 20978544, + useFallbackSwap: true, + })) + + signer = await SignerWithAddress.create( + snapshot.config.signer as ethers.providers.JsonRpcSigner, + ) + + address = await signer.getAddress() + + console.log('Address: ', address) + + system = snapshot.testSystem.deployment.system + config = snapshot.config + + network = await getNetwork(config.provider) + + WETH = WETH__factory.connect(ADDRESSES[network].common.WETH, config.signer) + USDC = ERC20__factory.connect(ADDRESSES[network].common.USDC, config.signer) + + addresses = addressesByNetwork(Network.MAINNET) + + aaveLikeAddresses = { + tokens: { + WETH: WETH.address, + DAI: ADDRESSES[network].common.DAI, + USDC: USDC.address, + ETH: ADDRESSES[network].common.ETH, + }, + operationExecutor: system.OperationExecutor.contract.address, + chainlinkEthUsdPriceFeed: addresses.chainlinkEthUsdPriceFeed, + oracle: ADDRESSES[network].spark.Oracle, + lendingPool: ADDRESSES[network].spark.LendingPool, + poolDataProvider: ADDRESSES[network].spark.PoolDataProvider, + } + rewardsControllerAddress = ADDRESSES[network].spark.RewardsController + // we use mainnet address since we user forked network and an existing dpm proxy + const accountGuardAddress = ADDRESSES['mainnet'].mpa.core.AccountGuard + rewardsControllerProxyActionsAddress = system.AaveRewardsProxyActions.contract.address + rewardsControllerProxyActionsContract = system.AaveRewardsProxyActions + .contract as AaveRewardsProxyActions + const accountGuard = (await hre.ethers.getContractAt( + 'AccountGuard', + accountGuardAddress, + )) as AccountGuard + const guardOwner = await accountGuard.owner() + await impersonateAccount(guardOwner) + const impersonatedSigner = await hre.ethers.getSigner(guardOwner) + await accountGuard + .connect(impersonatedSigner) + .setWhitelist(rewardsControllerProxyActionsAddress, true) + }) + + it('should claim rewards through proxy actions', async () => { + const IMPERSONATED_SPARK_OWNER = '0xb2a33ae0e07fd2ca8dbde9545f6ce0b3234dc4e8' + const PROXY = '0xda8203bbcff1ce6781e483078b72e6c56293d2e1' + const rewardToken = addresses.WSTETH + + await impersonateAccount(IMPERSONATED_SPARK_OWNER) + const impersonatedSigner = await hre.ethers.getSigner(IMPERSONATED_SPARK_OWNER) + // Prepare the calldata for claiming rewards + const { poolDataProvider } = await getAaveLikeSystemContracts( + aaveLikeAddresses, + // @ts-ignore + impersonatedSigner.provider, + 'Spark', + ) + const tokens = await poolDataProvider.getReserveTokensAddresses(addresses.WETH) + const assets = [tokens.spTokenAddress, tokens.variableDebtTokenAddress] + + const rewards = await rewardsControllerProxyActionsContract.getAllUserRewards( + rewardsControllerAddress, + ADDRESSES[network].spark.PoolDataProvider, + PROXY, + addresses.WETH, + ) + const calldata = rewardsControllerProxyActionsContract.interface.encodeFunctionData( + 'claimAllRewards', + [rewardsControllerAddress, assets], + ) + const rewardTokenBalanceBefore = await ERC20__factory.connect( + rewardToken, + impersonatedSigner, + ).balanceOf(IMPERSONATED_SPARK_OWNER) + // Execute the claim rewards operation through the proxy + const [success] = await executeThroughDPMProxy( + PROXY, + { + address: rewardsControllerProxyActionsAddress, + calldata: calldata, + }, + impersonatedSigner, + ) + const rewardBalanceAfter = await ERC20__factory.connect( + rewardToken, + impersonatedSigner, + ).balanceOf(IMPERSONATED_SPARK_OWNER) + expect(+rewardBalanceAfter.toString()).to.be.gt(+rewards[1].toString()) + expect(success).to.be.true + expect(rewardBalanceAfter).to.be.gt(rewardTokenBalanceBefore) + }) +}) diff --git a/packages/dma-contracts/test/e2e/strategies/aave/migrate.test.ts b/packages/dma-contracts/test/e2e/strategies/aave/migrate.test.ts index 1e453ce39..89470c6eb 100644 --- a/packages/dma-contracts/test/e2e/strategies/aave/migrate.test.ts +++ b/packages/dma-contracts/test/e2e/strategies/aave/migrate.test.ts @@ -27,7 +27,7 @@ import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers' import { expect } from 'chai' import { ethers } from 'ethers' import hre from 'hardhat' -describe.only('Migrate | AAVE V3 -> DPM | E2E', async () => { +describe('Migrate | AAVE V3 -> DPM | E2E', async () => { /* eslint-disable @typescript-eslint/no-unused-vars */ let snapshot: Snapshot let provider: ethers.providers.JsonRpcProvider diff --git a/packages/dma-contracts/test/e2e/strategies/common/migration.test.ts b/packages/dma-contracts/test/e2e/strategies/common/migration.test.ts index b6d498b19..d826acff0 100644 --- a/packages/dma-contracts/test/e2e/strategies/common/migration.test.ts +++ b/packages/dma-contracts/test/e2e/strategies/common/migration.test.ts @@ -29,7 +29,7 @@ import hre from 'hardhat' // 0x2bA1eefeBb0A1807D1Df52c7EFc1aBdc9FcF5475 aave weth vault @ block : 19468682 -describe.only('Migrate | AAVE V3 DsProxy -> DPM | E2E', async () => { +describe('Migrate | AAVE V3 DsProxy -> DPM | E2E', async () => { /* eslint-disable @typescript-eslint/no-unused-vars */ let snapshot: Snapshot let provider: ethers.providers.JsonRpcProvider diff --git a/packages/dma-library/package.json b/packages/dma-library/package.json index 417c83ee3..48a3ac1f7 100644 --- a/packages/dma-library/package.json +++ b/packages/dma-library/package.json @@ -1,6 +1,6 @@ { "name": "@oasisdex/dma-library", - "version": "0.6.66", + "version": "0.6.72", "typings": "lib/index.d.ts", "types": "lib/index.d.ts", "main": "lib/index.js", @@ -13,7 +13,7 @@ "lib/*" ], "scripts": { - "build": "npx parcel build ./src/index.ts --dist-dir ./lib --no-optimize", + "build": "npx parcel build ./src/index.ts --dist-dir ./lib", "build:dev": "npx parcel build ./src/index.ts --dist-dir ./lib --no-optimize --no-content-hash", "clean": "rm -rf lib && rm -f tsconfig.lint.tsbuildinfo", "lint": "yarn eslint . --ext .ts --max-warnings=0 && yarn tsc --build ./tsconfig.lint.json", diff --git a/packages/dma-library/src/protocols/aave/get-aave-protocol-data.ts b/packages/dma-library/src/protocols/aave/get-aave-protocol-data.ts index 2984a1ab4..f661ea33b 100644 --- a/packages/dma-library/src/protocols/aave/get-aave-protocol-data.ts +++ b/packages/dma-library/src/protocols/aave/get-aave-protocol-data.ts @@ -3,7 +3,6 @@ import { SharedAaveLikeProtocolDataArgs, } from '@dma-library/protocols/aave-like/types' import { - determineReserveEModeCategory, fetchAssetPrice, fetchReserveData, fetchUserReserveData, @@ -11,7 +10,6 @@ import { } from '@dma-library/protocols/aave-like/utils' import * as AaveCommon from '@dma-library/strategies/aave/common' import { AaveVersion } from '@dma-library/types/aave' -import BigNumber from 'bignumber.js' export type AaveV2ProtocolDataArgs = SharedAaveLikeProtocolDataArgs & { protocolVersion: AaveVersion.v2 @@ -104,8 +102,6 @@ export async function getAaveV3ProtocolData({ collateralReserveData, userDebtData, userCollateralData, - collateralEModeCategory, - debtEModeCategory, ] = await Promise.all([ fetchAssetPrice(oracle, flashloanTokenAddress), fetchAssetPrice(oracle, debtTokenAddress), @@ -114,22 +110,21 @@ export async function getAaveV3ProtocolData({ fetchReserveData(poolDataProvider, collateralTokenAddress), proxy ? fetchUserReserveData(poolDataProvider, debtTokenAddress, proxy) : undefined, proxy ? fetchUserReserveData(poolDataProvider, collateralTokenAddress, proxy) : undefined, - poolDataProvider.getReserveEModeCategory(collateralTokenAddress), - poolDataProvider.getReserveEModeCategory(debtTokenAddress), ]) - - const collateralEModeCategoryAsNumber = new BigNumber( - (await collateralEModeCategory).toString(), - ).toNumber() - const debtEModeCategoryAsNumber = new BigNumber((await debtEModeCategory).toString()).toNumber() - const reserveEModeCategory = determineReserveEModeCategory( - collateralEModeCategoryAsNumber, - debtEModeCategoryAsNumber, - ) + const allTokensSymbols = Object.keys(addresses.tokens) + const collateralTokenSymbol = allTokensSymbols.find(tokenSymbol => { + return addresses.tokens[tokenSymbol]?.toLowerCase() === collateralTokenAddress.toLowerCase() + }) + const debtTokenSymbol = allTokensSymbols.find(tokenSymbol => { + return addresses.tokens[tokenSymbol]?.toLowerCase() === debtTokenAddress.toLowerCase() + }) + const isCollateralEthCorrelated = collateralTokenSymbol?.toUpperCase().includes('ETH') || false + const isDebtEthCorrelated = debtTokenSymbol?.toUpperCase().includes('ETH') || false + const reserveEModeCategory = isCollateralEthCorrelated && isDebtEthCorrelated ? 1 : 0 let eModeCategoryData if (pool && reserveEModeCategory !== 0) { - eModeCategoryData = await pool.getEModeCategoryData(reserveEModeCategory) + eModeCategoryData = await pool.getEModeCategoryCollateralConfig(reserveEModeCategory) } return {