diff --git a/diffs/ARBITRUM_LINEA/AAVE_PROTOCOL_DATA_PROVIDER_DIFF.md b/diffs/ARBITRUM_LINEA/AAVE_PROTOCOL_DATA_PROVIDER_DIFF.md index bda958fa..912418ef 100644 --- a/diffs/ARBITRUM_LINEA/AAVE_PROTOCOL_DATA_PROVIDER_DIFF.md +++ b/diffs/ARBITRUM_LINEA/AAVE_PROTOCOL_DATA_PROVIDER_DIFF.md @@ -3,164 +3,5 @@ diff --git a/./downloads/ARBITRUM/AAVE_PROTOCOL_DATA_PROVIDER.sol b/./downloads/ index 8142191..9b34753 100644 --- a/./downloads/ARBITRUM/AAVE_PROTOCOL_DATA_PROVIDER.sol +++ b/./downloads/LINEA/AAVE_PROTOCOL_DATA_PROVIDER.sol -@@ -1,7 +1,7 @@ - // SPDX-License-Identifier: MIT - pragma solidity ^0.8.0 ^0.8.10; - --// downloads/ARBITRUM/AAVE_PROTOCOL_DATA_PROVIDER/AaveProtocolDataProvider/lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/dependencies/openzeppelin/contracts/IERC20.sol -+// downloads/LINEA/AAVE_PROTOCOL_DATA_PROVIDER/AaveProtocolDataProvider/src/contracts/dependencies/openzeppelin/contracts/IERC20.sol - - /** - * @dev Interface of the ERC20 standard as defined in the EIP. -@@ -77,7 +77,7 @@ interface IERC20 { - event Approval(address indexed owner, address indexed spender, uint256 value); - } - --// downloads/ARBITRUM/AAVE_PROTOCOL_DATA_PROVIDER/AaveProtocolDataProvider/lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/interfaces/IAaveIncentivesController.sol -+// downloads/LINEA/AAVE_PROTOCOL_DATA_PROVIDER/AaveProtocolDataProvider/src/contracts/interfaces/IAaveIncentivesController.sol - - /** - * @title IAaveIncentivesController -@@ -96,7 +96,7 @@ interface IAaveIncentivesController { - function handleAction(address user, uint256 totalSupply, uint256 userBalance) external; - } - --// downloads/ARBITRUM/AAVE_PROTOCOL_DATA_PROVIDER/AaveProtocolDataProvider/lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/interfaces/IPoolAddressesProvider.sol -+// downloads/LINEA/AAVE_PROTOCOL_DATA_PROVIDER/AaveProtocolDataProvider/src/contracts/interfaces/IPoolAddressesProvider.sol - - /** - * @title IPoolAddressesProvider -@@ -323,7 +323,7 @@ interface IPoolAddressesProvider { - function setPoolDataProvider(address newDataProvider) external; - } - --// downloads/ARBITRUM/AAVE_PROTOCOL_DATA_PROVIDER/AaveProtocolDataProvider/lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/interfaces/IScaledBalanceToken.sol -+// downloads/LINEA/AAVE_PROTOCOL_DATA_PROVIDER/AaveProtocolDataProvider/src/contracts/interfaces/IScaledBalanceToken.sol - - /** - * @title IScaledBalanceToken -@@ -395,7 +395,7 @@ interface IScaledBalanceToken { - function getPreviousIndex(address user) external view returns (uint256); - } - --// downloads/ARBITRUM/AAVE_PROTOCOL_DATA_PROVIDER/AaveProtocolDataProvider/lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/protocol/libraries/helpers/Errors.sol -+// downloads/LINEA/AAVE_PROTOCOL_DATA_PROVIDER/AaveProtocolDataProvider/src/contracts/protocol/libraries/helpers/Errors.sol - - /** - * @title Errors library -@@ -498,7 +498,7 @@ library Errors { - string public constant NOT_BORROWABLE_IN_EMODE = '100'; // Asset not borrowable in eMode - } - --// downloads/ARBITRUM/AAVE_PROTOCOL_DATA_PROVIDER/AaveProtocolDataProvider/lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/protocol/libraries/math/WadRayMath.sol -+// downloads/LINEA/AAVE_PROTOCOL_DATA_PROVIDER/AaveProtocolDataProvider/src/contracts/protocol/libraries/math/WadRayMath.sol - - /** - * @title WadRayMath library -@@ -624,7 +624,7 @@ library WadRayMath { - } - } - --// downloads/ARBITRUM/AAVE_PROTOCOL_DATA_PROVIDER/AaveProtocolDataProvider/lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/protocol/libraries/types/DataTypes.sol -+// downloads/LINEA/AAVE_PROTOCOL_DATA_PROVIDER/AaveProtocolDataProvider/src/contracts/protocol/libraries/types/DataTypes.sol - - library DataTypes { - /** -@@ -948,7 +948,7 @@ library DataTypes { - } - } - --// downloads/ARBITRUM/AAVE_PROTOCOL_DATA_PROVIDER/AaveProtocolDataProvider/lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/dependencies/openzeppelin/contracts/IERC20Detailed.sol -+// downloads/LINEA/AAVE_PROTOCOL_DATA_PROVIDER/AaveProtocolDataProvider/src/contracts/dependencies/openzeppelin/contracts/IERC20Detailed.sol - - interface IERC20Detailed is IERC20 { - function name() external view returns (string memory); -@@ -958,7 +958,7 @@ interface IERC20Detailed is IERC20 { - function decimals() external view returns (uint8); - } - --// downloads/ARBITRUM/AAVE_PROTOCOL_DATA_PROVIDER/AaveProtocolDataProvider/lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/interfaces/IPoolDataProvider.sol -+// downloads/LINEA/AAVE_PROTOCOL_DATA_PROVIDER/AaveProtocolDataProvider/src/contracts/interfaces/IPoolDataProvider.sol - - /** - * @title IPoolDataProvider -@@ -1206,7 +1206,7 @@ interface IPoolDataProvider { - function getVirtualUnderlyingBalance(address asset) external view returns (uint256); - } - --// downloads/ARBITRUM/AAVE_PROTOCOL_DATA_PROVIDER/AaveProtocolDataProvider/lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/interfaces/IPool.sol -+// downloads/LINEA/AAVE_PROTOCOL_DATA_PROVIDER/AaveProtocolDataProvider/src/contracts/interfaces/IPool.sol - - /** - * @title IPool -@@ -1765,6 +1765,7 @@ interface IPool { - - /** - * @notice Returns the state and configuration of the reserve, including extra data included with Aave v3.1 -+ * @dev DEPRECATED use independent getters instead (getReserveData, getLiquidationGracePeriod) - * @param asset The address of the underlying asset of the reserve - * @return The state and configuration data of the reserve with virtual accounting - */ -@@ -2036,7 +2037,7 @@ interface IPool { - function getSupplyLogic() external view returns (address); - } - --// downloads/ARBITRUM/AAVE_PROTOCOL_DATA_PROVIDER/AaveProtocolDataProvider/lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/protocol/libraries/configuration/ReserveConfiguration.sol -+// downloads/LINEA/AAVE_PROTOCOL_DATA_PROVIDER/AaveProtocolDataProvider/src/contracts/protocol/libraries/configuration/ReserveConfiguration.sol - - /** - * @title ReserveConfiguration library -@@ -2051,6 +2052,7 @@ library ReserveConfiguration { - uint256 internal constant ACTIVE_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFF; // prettier-ignore - uint256 internal constant FROZEN_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFDFFFFFFFFFFFFFF; // prettier-ignore - uint256 internal constant BORROWING_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFBFFFFFFFFFFFFFF; // prettier-ignore -+ // @notice there is an unoccupied hole of 1 bit at position 59 from pre 3.2 stableBorrowRateEnabled - uint256 internal constant PAUSED_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFF; // prettier-ignore - uint256 internal constant BORROWABLE_IN_ISOLATION_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFDFFFFFFFFFFFFFFF; // prettier-ignore - uint256 internal constant SILOED_BORROWING_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFBFFFFFFFFFFFFFFF; // prettier-ignore -@@ -2059,7 +2061,7 @@ library ReserveConfiguration { - uint256 internal constant BORROW_CAP_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000FFFFFFFFFFFFFFFFFFFF; // prettier-ignore - uint256 internal constant SUPPLY_CAP_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFF000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFF; // prettier-ignore - uint256 internal constant LIQUIDATION_PROTOCOL_FEE_MASK = 0xFFFFFFFFFFFFFFFFFFFFFF0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF; // prettier-ignore -- //@notice there is an unoccupied hole of 8 bits from 168 to 176 left from pre 3.2 eModeCategory -+ // @notice there is an unoccupied hole of 8 bits from 168 to 176 left from pre 3.2 eModeCategory - uint256 internal constant UNBACKED_MINT_CAP_MASK = 0xFFFFFFFFFFF000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF; // prettier-ignore - uint256 internal constant DEBT_CEILING_MASK = 0xF0000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF; // prettier-ignore - uint256 internal constant VIRTUAL_ACC_ACTIVE_MASK = 0xEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF; // prettier-ignore -@@ -2616,7 +2618,7 @@ library ReserveConfiguration { - } - } - --// downloads/ARBITRUM/AAVE_PROTOCOL_DATA_PROVIDER/AaveProtocolDataProvider/lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/protocol/libraries/configuration/UserConfiguration.sol -+// downloads/LINEA/AAVE_PROTOCOL_DATA_PROVIDER/AaveProtocolDataProvider/src/contracts/protocol/libraries/configuration/UserConfiguration.sol - - /** - * @title UserConfiguration library -@@ -2848,7 +2850,7 @@ library UserConfiguration { - } - } - --// downloads/ARBITRUM/AAVE_PROTOCOL_DATA_PROVIDER/AaveProtocolDataProvider/lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/interfaces/IInitializableDebtToken.sol -+// downloads/LINEA/AAVE_PROTOCOL_DATA_PROVIDER/AaveProtocolDataProvider/src/contracts/interfaces/IInitializableDebtToken.sol - - /** - * @title IInitializableDebtToken -@@ -2897,7 +2899,7 @@ interface IInitializableDebtToken { - ) external; - } - --// downloads/ARBITRUM/AAVE_PROTOCOL_DATA_PROVIDER/AaveProtocolDataProvider/lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/interfaces/IVariableDebtToken.sol -+// downloads/LINEA/AAVE_PROTOCOL_DATA_PROVIDER/AaveProtocolDataProvider/src/contracts/interfaces/IVariableDebtToken.sol - - /** - * @title IVariableDebtToken -@@ -2940,7 +2942,7 @@ interface IVariableDebtToken is IScaledBalanceToken, IInitializableDebtToken { - function UNDERLYING_ASSET_ADDRESS() external view returns (address); - } - --// downloads/ARBITRUM/AAVE_PROTOCOL_DATA_PROVIDER/AaveProtocolDataProvider/lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/helpers/AaveProtocolDataProvider.sol -+// downloads/LINEA/AAVE_PROTOCOL_DATA_PROVIDER/AaveProtocolDataProvider/src/contracts/helpers/AaveProtocolDataProvider.sol - - /** - * @title AaveProtocolDataProvider + ``` diff --git a/diffs/ARBITRUM_LINEA/ACL_MANAGER_DIFF.md b/diffs/ARBITRUM_LINEA/ACL_MANAGER_DIFF.md index 2318cd76..d527142e 100644 --- a/diffs/ARBITRUM_LINEA/ACL_MANAGER_DIFF.md +++ b/diffs/ARBITRUM_LINEA/ACL_MANAGER_DIFF.md @@ -3,242 +3,5 @@ diff --git a/./downloads/ARBITRUM/ACL_MANAGER.sol b/./downloads/LINEA/ACL_MANAGE index 9ff4476..c45f49c 100644 --- a/./downloads/ARBITRUM/ACL_MANAGER.sol +++ b/./downloads/LINEA/ACL_MANAGER.sol -@@ -1,7 +1,7 @@ - // SPDX-License-Identifier: BUSL-1.1 --pragma solidity =0.8.10; -+pragma solidity ^0.8.0 ^0.8.10; - --// downloads/ARBITRUM/ACL_MANAGER/ACLManager/@aave/core-v3/contracts/dependencies/openzeppelin/contracts/Context.sol -+// downloads/LINEA/ACL_MANAGER/ACLManager/src/contracts/dependencies/openzeppelin/contracts/Context.sol - - /* - * @dev Provides information about the current execution context, including the -@@ -24,7 +24,7 @@ abstract contract Context { - } - } - --// downloads/ARBITRUM/ACL_MANAGER/ACLManager/@aave/core-v3/contracts/dependencies/openzeppelin/contracts/IAccessControl.sol -+// downloads/LINEA/ACL_MANAGER/ACLManager/src/contracts/dependencies/openzeppelin/contracts/IAccessControl.sol - - /** - * @dev External interface of AccessControl declared to support ERC165 detection. -@@ -114,7 +114,7 @@ interface IAccessControl { - function renounceRole(bytes32 role, address account) external; - } - --// downloads/ARBITRUM/ACL_MANAGER/ACLManager/@aave/core-v3/contracts/dependencies/openzeppelin/contracts/IERC165.sol -+// downloads/LINEA/ACL_MANAGER/ACLManager/src/contracts/dependencies/openzeppelin/contracts/IERC165.sol - - /** - * @dev Interface of the ERC165 standard, as defined in the -@@ -137,7 +137,7 @@ interface IERC165 { - function supportsInterface(bytes4 interfaceId) external view returns (bool); - } - --// downloads/ARBITRUM/ACL_MANAGER/ACLManager/@aave/core-v3/contracts/dependencies/openzeppelin/contracts/Strings.sol -+// downloads/LINEA/ACL_MANAGER/ACLManager/src/contracts/dependencies/openzeppelin/contracts/Strings.sol - - /** - * @dev String operations. -@@ -202,13 +202,13 @@ library Strings { - } - } - --// downloads/ARBITRUM/ACL_MANAGER/ACLManager/@aave/core-v3/contracts/interfaces/IPoolAddressesProvider.sol -+// downloads/LINEA/ACL_MANAGER/ACLManager/src/contracts/interfaces/IPoolAddressesProvider.sol - - /** - * @title IPoolAddressesProvider - * @author Aave - * @notice Defines the basic interface for a Pool Addresses Provider. -- **/ -+ */ - interface IPoolAddressesProvider { - /** - * @dev Emitted when the market identifier is updated. -@@ -303,7 +303,7 @@ interface IPoolAddressesProvider { - /** - * @notice Returns the id of the Aave market to which this contract points to. - * @return The market id -- **/ -+ */ - function getMarketId() external view returns (string memory); - - /** -@@ -345,27 +345,27 @@ interface IPoolAddressesProvider { - /** - * @notice Returns the address of the Pool proxy. - * @return The Pool proxy address -- **/ -+ */ - function getPool() external view returns (address); - - /** - * @notice Updates the implementation of the Pool, or creates a proxy - * setting the new `pool` implementation when the function is called for the first time. - * @param newPoolImpl The new Pool implementation -- **/ -+ */ - function setPoolImpl(address newPoolImpl) external; - - /** - * @notice Returns the address of the PoolConfigurator proxy. - * @return The PoolConfigurator proxy address -- **/ -+ */ - function getPoolConfigurator() external view returns (address); - - /** - * @notice Updates the implementation of the PoolConfigurator, or creates a proxy - * setting the new `PoolConfigurator` implementation when the function is called for the first time. - * @param newPoolConfiguratorImpl The new PoolConfigurator implementation -- **/ -+ */ - function setPoolConfiguratorImpl(address newPoolConfiguratorImpl) external; - - /** -@@ -389,7 +389,7 @@ interface IPoolAddressesProvider { - /** - * @notice Updates the address of the ACL manager. - * @param newAclManager The address of the new ACLManager -- **/ -+ */ - function setACLManager(address newAclManager) external; - - /** -@@ -413,7 +413,7 @@ interface IPoolAddressesProvider { - /** - * @notice Updates the address of the price oracle sentinel. - * @param newPriceOracleSentinel The address of the new PriceOracleSentinel -- **/ -+ */ - function setPriceOracleSentinel(address newPriceOracleSentinel) external; - - /** -@@ -425,11 +425,11 @@ interface IPoolAddressesProvider { - /** - * @notice Updates the address of the data provider. - * @param newDataProvider The address of the new DataProvider -- **/ -+ */ - function setPoolDataProvider(address newDataProvider) external; - } - --// downloads/ARBITRUM/ACL_MANAGER/ACLManager/@aave/core-v3/contracts/protocol/libraries/helpers/Errors.sol -+// downloads/LINEA/ACL_MANAGER/ACLManager/src/contracts/protocol/libraries/helpers/Errors.sol - - /** - * @title Errors library -@@ -467,38 +467,33 @@ library Errors { - string public constant RESERVE_FROZEN = '28'; // 'Action cannot be performed because the reserve is frozen' - string public constant RESERVE_PAUSED = '29'; // 'Action cannot be performed because the reserve is paused' - string public constant BORROWING_NOT_ENABLED = '30'; // 'Borrowing is not enabled' -- string public constant STABLE_BORROWING_NOT_ENABLED = '31'; // 'Stable borrowing is not enabled' - string public constant NOT_ENOUGH_AVAILABLE_USER_BALANCE = '32'; // 'User cannot withdraw more than the available balance' - string public constant INVALID_INTEREST_RATE_MODE_SELECTED = '33'; // 'Invalid interest rate mode selected' - string public constant COLLATERAL_BALANCE_IS_ZERO = '34'; // 'The collateral balance is 0' - string public constant HEALTH_FACTOR_LOWER_THAN_LIQUIDATION_THRESHOLD = '35'; // 'Health factor is lesser than the liquidation threshold' - string public constant COLLATERAL_CANNOT_COVER_NEW_BORROW = '36'; // 'There is not enough collateral to cover a new borrow' - string public constant COLLATERAL_SAME_AS_BORROWING_CURRENCY = '37'; // 'Collateral is (mostly) the same currency that is being borrowed' -- string public constant AMOUNT_BIGGER_THAN_MAX_LOAN_SIZE_STABLE = '38'; // 'The requested amount is greater than the max loan size in stable rate mode' - string public constant NO_DEBT_OF_SELECTED_TYPE = '39'; // 'For repayment of a specific type of debt, the user needs to have debt that type' - string public constant NO_EXPLICIT_AMOUNT_TO_REPAY_ON_BEHALF = '40'; // 'To repay on behalf of a user an explicit amount to repay is needed' -- string public constant NO_OUTSTANDING_STABLE_DEBT = '41'; // 'User does not have outstanding stable rate debt on this reserve' - string public constant NO_OUTSTANDING_VARIABLE_DEBT = '42'; // 'User does not have outstanding variable rate debt on this reserve' - string public constant UNDERLYING_BALANCE_ZERO = '43'; // 'The underlying balance needs to be greater than 0' - string public constant INTEREST_RATE_REBALANCE_CONDITIONS_NOT_MET = '44'; // 'Interest rate rebalance conditions were not met' - string public constant HEALTH_FACTOR_NOT_BELOW_THRESHOLD = '45'; // 'Health factor is not below the threshold' - string public constant COLLATERAL_CANNOT_BE_LIQUIDATED = '46'; // 'The collateral chosen cannot be liquidated' - string public constant SPECIFIED_CURRENCY_NOT_BORROWED_BY_USER = '47'; // 'User did not borrow the specified currency' -- string public constant SAME_BLOCK_BORROW_REPAY = '48'; // 'Borrow and repay in same block is not allowed' - string public constant INCONSISTENT_FLASHLOAN_PARAMS = '49'; // 'Inconsistent flashloan parameters' - string public constant BORROW_CAP_EXCEEDED = '50'; // 'Borrow cap is exceeded' - string public constant SUPPLY_CAP_EXCEEDED = '51'; // 'Supply cap is exceeded' - string public constant UNBACKED_MINT_CAP_EXCEEDED = '52'; // 'Unbacked mint cap is exceeded' - string public constant DEBT_CEILING_EXCEEDED = '53'; // 'Debt ceiling is exceeded' -- string public constant ATOKEN_SUPPLY_NOT_ZERO = '54'; // 'AToken supply is not zero' -- string public constant STABLE_DEBT_NOT_ZERO = '55'; // 'Stable debt supply is not zero' -+ string public constant UNDERLYING_CLAIMABLE_RIGHTS_NOT_ZERO = '54'; // 'Claimable rights over underlying not zero (aToken supply or accruedToTreasury)' - string public constant VARIABLE_DEBT_SUPPLY_NOT_ZERO = '56'; // 'Variable debt supply is not zero' - string public constant LTV_VALIDATION_FAILED = '57'; // 'Ltv validation failed' - string public constant INCONSISTENT_EMODE_CATEGORY = '58'; // 'Inconsistent eMode category' - string public constant PRICE_ORACLE_SENTINEL_CHECK_FAILED = '59'; // 'Price oracle sentinel validation failed' - string public constant ASSET_NOT_BORROWABLE_IN_ISOLATION = '60'; // 'Asset is not borrowable in isolation mode' - string public constant RESERVE_ALREADY_INITIALIZED = '61'; // 'Reserve has already been initialized' -- string public constant USER_IN_ISOLATION_MODE = '62'; // 'User is in isolation mode' -+ string public constant USER_IN_ISOLATION_MODE_OR_LTV_ZERO = '62'; // 'User is in isolation mode or ltv is zero' - string public constant INVALID_LTV = '63'; // 'Invalid ltv parameter for the reserve' - string public constant INVALID_LIQ_THRESHOLD = '64'; // 'Invalid liquidity threshold parameter for the reserve' - string public constant INVALID_LIQ_BONUS = '65'; // 'Invalid liquidity bonus parameter for the reserve' -@@ -520,16 +515,24 @@ library Errors { - string public constant DEBT_CEILING_NOT_ZERO = '81'; // 'Debt ceiling is not zero' - string public constant ASSET_NOT_LISTED = '82'; // 'Asset is not listed' - string public constant INVALID_OPTIMAL_USAGE_RATIO = '83'; // 'Invalid optimal usage ratio' -- string public constant INVALID_OPTIMAL_STABLE_TO_TOTAL_DEBT_RATIO = '84'; // 'Invalid optimal stable to total debt ratio' - string public constant UNDERLYING_CANNOT_BE_RESCUED = '85'; // 'The underlying asset cannot be rescued' - string public constant ADDRESSES_PROVIDER_ALREADY_ADDED = '86'; // 'Reserve has already been added to reserve list' - string public constant POOL_ADDRESSES_DO_NOT_MATCH = '87'; // 'The token implementation pool address and the pool address provided by the initializing pool do not match' -- string public constant STABLE_BORROWING_ENABLED = '88'; // 'Stable borrowing is enabled' - string public constant SILOED_BORROWING_VIOLATION = '89'; // 'User is trying to borrow multiple assets including a siloed one' - string public constant RESERVE_DEBT_NOT_ZERO = '90'; // the total debt of the reserve needs to be 0 -+ string public constant FLASHLOAN_DISABLED = '91'; // FlashLoaning for this asset is disabled -+ string public constant INVALID_MAX_RATE = '92'; // The expect maximum borrow rate is invalid -+ string public constant WITHDRAW_TO_ATOKEN = '93'; // Withdrawing to the aToken is not allowed -+ string public constant SUPPLY_TO_ATOKEN = '94'; // Supplying to the aToken is not allowed -+ string public constant SLOPE_2_MUST_BE_GTE_SLOPE_1 = '95'; // Variable interest rate slope 2 can not be lower than slope 1 -+ string public constant CALLER_NOT_RISK_OR_POOL_OR_EMERGENCY_ADMIN = '96'; // 'The caller of the function is not a risk, pool or emergency admin' -+ string public constant LIQUIDATION_GRACE_SENTINEL_CHECK_FAILED = '97'; // 'Liquidation grace sentinel validation failed' -+ string public constant INVALID_GRACE_PERIOD = '98'; // Grace period above a valid range -+ string public constant INVALID_FREEZE_STATE = '99'; // Reserve is already in the passed freeze state -+ string public constant NOT_BORROWABLE_IN_EMODE = '100'; // Asset not borrowable in eMode - } - --// downloads/ARBITRUM/ACL_MANAGER/ACLManager/@aave/core-v3/contracts/dependencies/openzeppelin/contracts/ERC165.sol -+// downloads/LINEA/ACL_MANAGER/ACLManager/src/contracts/dependencies/openzeppelin/contracts/ERC165.sol - - /** - * @dev Implementation of the {IERC165} interface. -@@ -554,13 +557,13 @@ abstract contract ERC165 is IERC165 { - } - } - --// downloads/ARBITRUM/ACL_MANAGER/ACLManager/@aave/core-v3/contracts/interfaces/IACLManager.sol -+// downloads/LINEA/ACL_MANAGER/ACLManager/src/contracts/interfaces/IACLManager.sol - - /** - * @title IACLManager - * @author Aave - * @notice Defines the basic interface for the ACL Manager -- **/ -+ */ - interface IACLManager { - /** - * @notice Returns the contract address of the PoolAddressesProvider -@@ -676,7 +679,7 @@ interface IACLManager { - function addFlashBorrower(address borrower) external; - - /** -- * @notice Removes an admin as FlashBorrower -+ * @notice Removes an address as FlashBorrower - * @param borrower The address of the FlashBorrower to remove - */ - function removeFlashBorrower(address borrower) external; -@@ -727,7 +730,7 @@ interface IACLManager { - function isAssetListingAdmin(address admin) external view returns (bool); - } - --// downloads/ARBITRUM/ACL_MANAGER/ACLManager/@aave/core-v3/contracts/dependencies/openzeppelin/contracts/AccessControl.sol -+// downloads/LINEA/ACL_MANAGER/ACLManager/src/contracts/dependencies/openzeppelin/contracts/AccessControl.sol - - /** - * @dev Contract module that allows children to implement role-based access -@@ -937,7 +940,7 @@ abstract contract AccessControl is Context, IAccessControl, ERC165 { - } - } - --// downloads/ARBITRUM/ACL_MANAGER/ACLManager/@aave/core-v3/contracts/protocol/configuration/ACLManager.sol -+// downloads/LINEA/ACL_MANAGER/ACLManager/src/contracts/protocol/configuration/ACLManager.sol - - /** - * @title ACLManager + ``` diff --git a/diffs/ARBITRUM_LINEA/BORROW_LOGIC_DIFF.md b/diffs/ARBITRUM_LINEA/BORROW_LOGIC_DIFF.md index 9b70e3f0..cf366471 100644 --- a/diffs/ARBITRUM_LINEA/BORROW_LOGIC_DIFF.md +++ b/diffs/ARBITRUM_LINEA/BORROW_LOGIC_DIFF.md @@ -3,335 +3,5 @@ diff --git a/./downloads/ARBITRUM/BORROW_LOGIC.sol b/./downloads/LINEA/BORROW_LO index 58a8929..9ef522e 100644 --- a/./downloads/ARBITRUM/BORROW_LOGIC.sol +++ b/./downloads/LINEA/BORROW_LOGIC.sol -@@ -1,7 +1,7 @@ - // SPDX-License-Identifier: BUSL-1.1 - pragma solidity ^0.8.0 ^0.8.10; - --// downloads/ARBITRUM/BORROW_LOGIC/BorrowLogic/src/contracts/dependencies/openzeppelin/contracts/Address.sol -+// downloads/LINEA/BORROW_LOGIC/BorrowLogic/src/contracts/dependencies/openzeppelin/contracts/Address.sol - - // OpenZeppelin Contracts v4.4.1 (utils/Address.sol) - -@@ -221,7 +221,7 @@ library Address { - } - } - --// downloads/ARBITRUM/BORROW_LOGIC/BorrowLogic/src/contracts/dependencies/openzeppelin/contracts/Context.sol -+// downloads/LINEA/BORROW_LOGIC/BorrowLogic/src/contracts/dependencies/openzeppelin/contracts/Context.sol - - /* - * @dev Provides information about the current execution context, including the -@@ -244,7 +244,7 @@ abstract contract Context { - } - } - --// downloads/ARBITRUM/BORROW_LOGIC/BorrowLogic/src/contracts/dependencies/openzeppelin/contracts/IAccessControl.sol -+// downloads/LINEA/BORROW_LOGIC/BorrowLogic/src/contracts/dependencies/openzeppelin/contracts/IAccessControl.sol - - /** - * @dev External interface of AccessControl declared to support ERC165 detection. -@@ -334,7 +334,7 @@ interface IAccessControl { - function renounceRole(bytes32 role, address account) external; - } - --// downloads/ARBITRUM/BORROW_LOGIC/BorrowLogic/src/contracts/dependencies/openzeppelin/contracts/IERC20.sol -+// downloads/LINEA/BORROW_LOGIC/BorrowLogic/src/contracts/dependencies/openzeppelin/contracts/IERC20.sol - - /** - * @dev Interface of the ERC20 standard as defined in the EIP. -@@ -410,7 +410,7 @@ interface IERC20 { - event Approval(address indexed owner, address indexed spender, uint256 value); - } - --// downloads/ARBITRUM/BORROW_LOGIC/BorrowLogic/src/contracts/dependencies/openzeppelin/contracts/SafeCast.sol -+// downloads/LINEA/BORROW_LOGIC/BorrowLogic/src/contracts/dependencies/openzeppelin/contracts/SafeCast.sol - - // OpenZeppelin Contracts v4.4.1 (utils/math/SafeCast.sol) - -@@ -666,7 +666,7 @@ library SafeCast { - } - } - --// downloads/ARBITRUM/BORROW_LOGIC/BorrowLogic/src/contracts/interfaces/IAaveIncentivesController.sol -+// downloads/LINEA/BORROW_LOGIC/BorrowLogic/src/contracts/interfaces/IAaveIncentivesController.sol - - /** - * @title IAaveIncentivesController -@@ -685,7 +685,7 @@ interface IAaveIncentivesController { - function handleAction(address user, uint256 totalSupply, uint256 userBalance) external; - } - --// downloads/ARBITRUM/BORROW_LOGIC/BorrowLogic/src/contracts/interfaces/IPoolAddressesProvider.sol -+// downloads/LINEA/BORROW_LOGIC/BorrowLogic/src/contracts/interfaces/IPoolAddressesProvider.sol - - /** - * @title IPoolAddressesProvider -@@ -912,7 +912,7 @@ interface IPoolAddressesProvider { - function setPoolDataProvider(address newDataProvider) external; - } - --// downloads/ARBITRUM/BORROW_LOGIC/BorrowLogic/src/contracts/interfaces/IPriceOracleGetter.sol -+// downloads/LINEA/BORROW_LOGIC/BorrowLogic/src/contracts/interfaces/IPriceOracleGetter.sol - - /** - * @title IPriceOracleGetter -@@ -942,7 +942,7 @@ interface IPriceOracleGetter { - function getAssetPrice(address asset) external view returns (uint256); - } - --// downloads/ARBITRUM/BORROW_LOGIC/BorrowLogic/src/contracts/interfaces/IScaledBalanceToken.sol -+// downloads/LINEA/BORROW_LOGIC/BorrowLogic/src/contracts/interfaces/IScaledBalanceToken.sol - - /** - * @title IScaledBalanceToken -@@ -1014,7 +1014,7 @@ interface IScaledBalanceToken { - function getPreviousIndex(address user) external view returns (uint256); - } - --// downloads/ARBITRUM/BORROW_LOGIC/BorrowLogic/src/contracts/protocol/libraries/helpers/Errors.sol -+// downloads/LINEA/BORROW_LOGIC/BorrowLogic/src/contracts/protocol/libraries/helpers/Errors.sol - - /** - * @title Errors library -@@ -1117,7 +1117,7 @@ library Errors { - string public constant NOT_BORROWABLE_IN_EMODE = '100'; // Asset not borrowable in eMode - } - --// downloads/ARBITRUM/BORROW_LOGIC/BorrowLogic/src/contracts/protocol/libraries/math/PercentageMath.sol -+// downloads/LINEA/BORROW_LOGIC/BorrowLogic/src/contracts/protocol/libraries/math/PercentageMath.sol - - /** - * @title PercentageMath library -@@ -1178,7 +1178,7 @@ library PercentageMath { - } - } - --// downloads/ARBITRUM/BORROW_LOGIC/BorrowLogic/src/contracts/protocol/libraries/math/WadRayMath.sol -+// downloads/LINEA/BORROW_LOGIC/BorrowLogic/src/contracts/protocol/libraries/math/WadRayMath.sol - - /** - * @title WadRayMath library -@@ -1304,7 +1304,7 @@ library WadRayMath { - } - } - --// downloads/ARBITRUM/BORROW_LOGIC/BorrowLogic/src/contracts/protocol/libraries/types/DataTypes.sol -+// downloads/LINEA/BORROW_LOGIC/BorrowLogic/src/contracts/protocol/libraries/types/DataTypes.sol - - library DataTypes { - /** -@@ -1628,7 +1628,7 @@ library DataTypes { - } - } - --// downloads/ARBITRUM/BORROW_LOGIC/BorrowLogic/src/contracts/dependencies/gnosis/contracts/GPv2SafeERC20.sol -+// downloads/LINEA/BORROW_LOGIC/BorrowLogic/src/contracts/dependencies/gnosis/contracts/GPv2SafeERC20.sol - - /// @title Gnosis Protocol v2 Safe ERC20 Transfer Library - /// @author Gnosis Developers -@@ -1741,7 +1741,7 @@ library GPv2SafeERC20 { - } - } - --// downloads/ARBITRUM/BORROW_LOGIC/BorrowLogic/src/contracts/dependencies/openzeppelin/contracts/IERC20Detailed.sol -+// downloads/LINEA/BORROW_LOGIC/BorrowLogic/src/contracts/dependencies/openzeppelin/contracts/IERC20Detailed.sol - - interface IERC20Detailed is IERC20 { - function name() external view returns (string memory); -@@ -1751,7 +1751,7 @@ interface IERC20Detailed is IERC20 { - function decimals() external view returns (uint8); - } - --// downloads/ARBITRUM/BORROW_LOGIC/BorrowLogic/src/contracts/interfaces/IACLManager.sol -+// downloads/LINEA/BORROW_LOGIC/BorrowLogic/src/contracts/interfaces/IACLManager.sol - - /** - * @title IACLManager -@@ -1924,7 +1924,7 @@ interface IACLManager { - function isAssetListingAdmin(address admin) external view returns (bool); - } - --// downloads/ARBITRUM/BORROW_LOGIC/BorrowLogic/src/contracts/interfaces/IPriceOracleSentinel.sol -+// downloads/LINEA/BORROW_LOGIC/BorrowLogic/src/contracts/interfaces/IPriceOracleSentinel.sol - - /** - * @title IPriceOracleSentinel -@@ -1989,7 +1989,7 @@ interface IPriceOracleSentinel { - function getGracePeriod() external view returns (uint256); - } - --// downloads/ARBITRUM/BORROW_LOGIC/BorrowLogic/src/contracts/interfaces/IReserveInterestRateStrategy.sol -+// downloads/LINEA/BORROW_LOGIC/BorrowLogic/src/contracts/interfaces/IReserveInterestRateStrategy.sol - - /** - * @title IReserveInterestRateStrategy -@@ -2016,7 +2016,7 @@ interface IReserveInterestRateStrategy { - ) external view returns (uint256, uint256); - } - --// downloads/ARBITRUM/BORROW_LOGIC/BorrowLogic/src/contracts/protocol/libraries/math/MathUtils.sol -+// downloads/LINEA/BORROW_LOGIC/BorrowLogic/src/contracts/protocol/libraries/math/MathUtils.sol - - /** - * @title MathUtils library -@@ -2113,7 +2113,7 @@ library MathUtils { - } - } - --// downloads/ARBITRUM/BORROW_LOGIC/BorrowLogic/src/contracts/interfaces/IPool.sol -+// downloads/LINEA/BORROW_LOGIC/BorrowLogic/src/contracts/interfaces/IPool.sol - - /** - * @title IPool -@@ -2672,6 +2672,7 @@ interface IPool { - - /** - * @notice Returns the state and configuration of the reserve, including extra data included with Aave v3.1 -+ * @dev DEPRECATED use independent getters instead (getReserveData, getLiquidationGracePeriod) - * @param asset The address of the underlying asset of the reserve - * @return The state and configuration data of the reserve with virtual accounting - */ -@@ -2943,7 +2944,7 @@ interface IPool { - function getSupplyLogic() external view returns (address); - } - --// downloads/ARBITRUM/BORROW_LOGIC/BorrowLogic/src/contracts/protocol/libraries/configuration/ReserveConfiguration.sol -+// downloads/LINEA/BORROW_LOGIC/BorrowLogic/src/contracts/protocol/libraries/configuration/ReserveConfiguration.sol - - /** - * @title ReserveConfiguration library -@@ -2958,6 +2959,7 @@ library ReserveConfiguration { - uint256 internal constant ACTIVE_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFF; // prettier-ignore - uint256 internal constant FROZEN_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFDFFFFFFFFFFFFFF; // prettier-ignore - uint256 internal constant BORROWING_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFBFFFFFFFFFFFFFF; // prettier-ignore -+ // @notice there is an unoccupied hole of 1 bit at position 59 from pre 3.2 stableBorrowRateEnabled - uint256 internal constant PAUSED_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFF; // prettier-ignore - uint256 internal constant BORROWABLE_IN_ISOLATION_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFDFFFFFFFFFFFFFFF; // prettier-ignore - uint256 internal constant SILOED_BORROWING_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFBFFFFFFFFFFFFFFF; // prettier-ignore -@@ -2966,7 +2968,7 @@ library ReserveConfiguration { - uint256 internal constant BORROW_CAP_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000FFFFFFFFFFFFFFFFFFFF; // prettier-ignore - uint256 internal constant SUPPLY_CAP_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFF000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFF; // prettier-ignore - uint256 internal constant LIQUIDATION_PROTOCOL_FEE_MASK = 0xFFFFFFFFFFFFFFFFFFFFFF0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF; // prettier-ignore -- //@notice there is an unoccupied hole of 8 bits from 168 to 176 left from pre 3.2 eModeCategory -+ // @notice there is an unoccupied hole of 8 bits from 168 to 176 left from pre 3.2 eModeCategory - uint256 internal constant UNBACKED_MINT_CAP_MASK = 0xFFFFFFFFFFF000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF; // prettier-ignore - uint256 internal constant DEBT_CEILING_MASK = 0xF0000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF; // prettier-ignore - uint256 internal constant VIRTUAL_ACC_ACTIVE_MASK = 0xEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF; // prettier-ignore -@@ -3523,7 +3525,7 @@ library ReserveConfiguration { - } - } - --// downloads/ARBITRUM/BORROW_LOGIC/BorrowLogic/src/contracts/protocol/libraries/configuration/EModeConfiguration.sol -+// downloads/LINEA/BORROW_LOGIC/BorrowLogic/src/contracts/protocol/libraries/configuration/EModeConfiguration.sol - - /** - * @title EModeConfiguration library -@@ -3572,7 +3574,7 @@ library EModeConfiguration { - } - } - --// downloads/ARBITRUM/BORROW_LOGIC/BorrowLogic/src/contracts/protocol/libraries/configuration/UserConfiguration.sol -+// downloads/LINEA/BORROW_LOGIC/BorrowLogic/src/contracts/protocol/libraries/configuration/UserConfiguration.sol - - /** - * @title UserConfiguration library -@@ -3804,7 +3806,7 @@ library UserConfiguration { - } - } - --// downloads/ARBITRUM/BORROW_LOGIC/BorrowLogic/src/contracts/interfaces/IInitializableAToken.sol -+// downloads/LINEA/BORROW_LOGIC/BorrowLogic/src/contracts/interfaces/IInitializableAToken.sol - - /** - * @title IInitializableAToken -@@ -3857,7 +3859,7 @@ interface IInitializableAToken { - ) external; - } - --// downloads/ARBITRUM/BORROW_LOGIC/BorrowLogic/src/contracts/interfaces/IInitializableDebtToken.sol -+// downloads/LINEA/BORROW_LOGIC/BorrowLogic/src/contracts/interfaces/IInitializableDebtToken.sol - - /** - * @title IInitializableDebtToken -@@ -3906,7 +3908,7 @@ interface IInitializableDebtToken { - ) external; - } - --// downloads/ARBITRUM/BORROW_LOGIC/BorrowLogic/src/contracts/protocol/libraries/logic/IsolationModeLogic.sol -+// downloads/LINEA/BORROW_LOGIC/BorrowLogic/src/contracts/protocol/libraries/logic/IsolationModeLogic.sol - - /** - * @title IsolationModeLogic library -@@ -3965,7 +3967,7 @@ library IsolationModeLogic { - } - } - --// downloads/ARBITRUM/BORROW_LOGIC/BorrowLogic/src/contracts/interfaces/IVariableDebtToken.sol -+// downloads/LINEA/BORROW_LOGIC/BorrowLogic/src/contracts/interfaces/IVariableDebtToken.sol - - /** - * @title IVariableDebtToken -@@ -4008,7 +4010,7 @@ interface IVariableDebtToken is IScaledBalanceToken, IInitializableDebtToken { - function UNDERLYING_ASSET_ADDRESS() external view returns (address); - } - --// downloads/ARBITRUM/BORROW_LOGIC/BorrowLogic/src/contracts/interfaces/IAToken.sol -+// downloads/LINEA/BORROW_LOGIC/BorrowLogic/src/contracts/interfaces/IAToken.sol - - /** - * @title IAToken -@@ -4142,7 +4144,7 @@ interface IAToken is IERC20, IScaledBalanceToken, IInitializableAToken { - function rescueTokens(address token, address to, uint256 amount) external; - } - --// downloads/ARBITRUM/BORROW_LOGIC/BorrowLogic/src/contracts/protocol/tokenization/base/IncentivizedERC20.sol -+// downloads/LINEA/BORROW_LOGIC/BorrowLogic/src/contracts/protocol/tokenization/base/IncentivizedERC20.sol - - /** - * @title IncentivizedERC20 -@@ -4365,7 +4367,7 @@ abstract contract IncentivizedERC20 is Context, IERC20Detailed { - } - } - --// downloads/ARBITRUM/BORROW_LOGIC/BorrowLogic/src/contracts/protocol/libraries/logic/ReserveLogic.sol -+// downloads/LINEA/BORROW_LOGIC/BorrowLogic/src/contracts/protocol/libraries/logic/ReserveLogic.sol - - /** - * @title ReserveLogic library -@@ -4666,7 +4668,7 @@ library ReserveLogic { - } - } - --// downloads/ARBITRUM/BORROW_LOGIC/BorrowLogic/src/contracts/protocol/libraries/logic/EModeLogic.sol -+// downloads/LINEA/BORROW_LOGIC/BorrowLogic/src/contracts/protocol/libraries/logic/EModeLogic.sol - - /** - * @title EModeLogic library -@@ -4728,7 +4730,7 @@ library EModeLogic { - } - } - --// downloads/ARBITRUM/BORROW_LOGIC/BorrowLogic/src/contracts/protocol/libraries/logic/GenericLogic.sol -+// downloads/LINEA/BORROW_LOGIC/BorrowLogic/src/contracts/protocol/libraries/logic/GenericLogic.sol - - /** - * @title GenericLogic library -@@ -4972,7 +4974,7 @@ library GenericLogic { - } - } - --// downloads/ARBITRUM/BORROW_LOGIC/BorrowLogic/src/contracts/protocol/libraries/logic/ValidationLogic.sol -+// downloads/LINEA/BORROW_LOGIC/BorrowLogic/src/contracts/protocol/libraries/logic/ValidationLogic.sol - - /** - * @title ReserveLogic library -@@ -5592,7 +5594,7 @@ library ValidationLogic { - } - } - --// downloads/ARBITRUM/BORROW_LOGIC/BorrowLogic/src/contracts/protocol/libraries/logic/BorrowLogic.sol -+// downloads/LINEA/BORROW_LOGIC/BorrowLogic/src/contracts/protocol/libraries/logic/BorrowLogic.sol - - /** - * @title BorrowLogic library + ``` diff --git a/diffs/ARBITRUM_LINEA/BRIDGE_LOGIC_DIFF.md b/diffs/ARBITRUM_LINEA/BRIDGE_LOGIC_DIFF.md index a63fcd68..6d75b125 100644 --- a/diffs/ARBITRUM_LINEA/BRIDGE_LOGIC_DIFF.md +++ b/diffs/ARBITRUM_LINEA/BRIDGE_LOGIC_DIFF.md @@ -3,326 +3,5 @@ diff --git a/./downloads/ARBITRUM/BRIDGE_LOGIC.sol b/./downloads/LINEA/BRIDGE_LO index 9220f63..ffa3a45 100644 --- a/./downloads/ARBITRUM/BRIDGE_LOGIC.sol +++ b/./downloads/LINEA/BRIDGE_LOGIC.sol -@@ -1,7 +1,7 @@ - // SPDX-License-Identifier: BUSL-1.1 - pragma solidity ^0.8.0 ^0.8.10; - --// downloads/ARBITRUM/BRIDGE_LOGIC/BridgeLogic/src/contracts/dependencies/openzeppelin/contracts/Address.sol -+// downloads/LINEA/BRIDGE_LOGIC/BridgeLogic/src/contracts/dependencies/openzeppelin/contracts/Address.sol - - // OpenZeppelin Contracts v4.4.1 (utils/Address.sol) - -@@ -221,7 +221,7 @@ library Address { - } - } - --// downloads/ARBITRUM/BRIDGE_LOGIC/BridgeLogic/src/contracts/dependencies/openzeppelin/contracts/Context.sol -+// downloads/LINEA/BRIDGE_LOGIC/BridgeLogic/src/contracts/dependencies/openzeppelin/contracts/Context.sol - - /* - * @dev Provides information about the current execution context, including the -@@ -244,7 +244,7 @@ abstract contract Context { - } - } - --// downloads/ARBITRUM/BRIDGE_LOGIC/BridgeLogic/src/contracts/dependencies/openzeppelin/contracts/IAccessControl.sol -+// downloads/LINEA/BRIDGE_LOGIC/BridgeLogic/src/contracts/dependencies/openzeppelin/contracts/IAccessControl.sol - - /** - * @dev External interface of AccessControl declared to support ERC165 detection. -@@ -334,7 +334,7 @@ interface IAccessControl { - function renounceRole(bytes32 role, address account) external; - } - --// downloads/ARBITRUM/BRIDGE_LOGIC/BridgeLogic/src/contracts/dependencies/openzeppelin/contracts/IERC20.sol -+// downloads/LINEA/BRIDGE_LOGIC/BridgeLogic/src/contracts/dependencies/openzeppelin/contracts/IERC20.sol - - /** - * @dev Interface of the ERC20 standard as defined in the EIP. -@@ -410,7 +410,7 @@ interface IERC20 { - event Approval(address indexed owner, address indexed spender, uint256 value); - } - --// downloads/ARBITRUM/BRIDGE_LOGIC/BridgeLogic/src/contracts/dependencies/openzeppelin/contracts/SafeCast.sol -+// downloads/LINEA/BRIDGE_LOGIC/BridgeLogic/src/contracts/dependencies/openzeppelin/contracts/SafeCast.sol - - // OpenZeppelin Contracts v4.4.1 (utils/math/SafeCast.sol) - -@@ -666,7 +666,7 @@ library SafeCast { - } - } - --// downloads/ARBITRUM/BRIDGE_LOGIC/BridgeLogic/src/contracts/interfaces/IAaveIncentivesController.sol -+// downloads/LINEA/BRIDGE_LOGIC/BridgeLogic/src/contracts/interfaces/IAaveIncentivesController.sol - - /** - * @title IAaveIncentivesController -@@ -685,7 +685,7 @@ interface IAaveIncentivesController { - function handleAction(address user, uint256 totalSupply, uint256 userBalance) external; - } - --// downloads/ARBITRUM/BRIDGE_LOGIC/BridgeLogic/src/contracts/interfaces/IPoolAddressesProvider.sol -+// downloads/LINEA/BRIDGE_LOGIC/BridgeLogic/src/contracts/interfaces/IPoolAddressesProvider.sol - - /** - * @title IPoolAddressesProvider -@@ -912,7 +912,7 @@ interface IPoolAddressesProvider { - function setPoolDataProvider(address newDataProvider) external; - } - --// downloads/ARBITRUM/BRIDGE_LOGIC/BridgeLogic/src/contracts/interfaces/IPriceOracleGetter.sol -+// downloads/LINEA/BRIDGE_LOGIC/BridgeLogic/src/contracts/interfaces/IPriceOracleGetter.sol - - /** - * @title IPriceOracleGetter -@@ -942,7 +942,7 @@ interface IPriceOracleGetter { - function getAssetPrice(address asset) external view returns (uint256); - } - --// downloads/ARBITRUM/BRIDGE_LOGIC/BridgeLogic/src/contracts/interfaces/IScaledBalanceToken.sol -+// downloads/LINEA/BRIDGE_LOGIC/BridgeLogic/src/contracts/interfaces/IScaledBalanceToken.sol - - /** - * @title IScaledBalanceToken -@@ -1014,7 +1014,7 @@ interface IScaledBalanceToken { - function getPreviousIndex(address user) external view returns (uint256); - } - --// downloads/ARBITRUM/BRIDGE_LOGIC/BridgeLogic/src/contracts/protocol/libraries/helpers/Errors.sol -+// downloads/LINEA/BRIDGE_LOGIC/BridgeLogic/src/contracts/protocol/libraries/helpers/Errors.sol - - /** - * @title Errors library -@@ -1117,7 +1117,7 @@ library Errors { - string public constant NOT_BORROWABLE_IN_EMODE = '100'; // Asset not borrowable in eMode - } - --// downloads/ARBITRUM/BRIDGE_LOGIC/BridgeLogic/src/contracts/protocol/libraries/math/PercentageMath.sol -+// downloads/LINEA/BRIDGE_LOGIC/BridgeLogic/src/contracts/protocol/libraries/math/PercentageMath.sol - - /** - * @title PercentageMath library -@@ -1178,7 +1178,7 @@ library PercentageMath { - } - } - --// downloads/ARBITRUM/BRIDGE_LOGIC/BridgeLogic/src/contracts/protocol/libraries/math/WadRayMath.sol -+// downloads/LINEA/BRIDGE_LOGIC/BridgeLogic/src/contracts/protocol/libraries/math/WadRayMath.sol - - /** - * @title WadRayMath library -@@ -1304,7 +1304,7 @@ library WadRayMath { - } - } - --// downloads/ARBITRUM/BRIDGE_LOGIC/BridgeLogic/src/contracts/protocol/libraries/types/DataTypes.sol -+// downloads/LINEA/BRIDGE_LOGIC/BridgeLogic/src/contracts/protocol/libraries/types/DataTypes.sol - - library DataTypes { - /** -@@ -1628,7 +1628,7 @@ library DataTypes { - } - } - --// downloads/ARBITRUM/BRIDGE_LOGIC/BridgeLogic/src/contracts/dependencies/gnosis/contracts/GPv2SafeERC20.sol -+// downloads/LINEA/BRIDGE_LOGIC/BridgeLogic/src/contracts/dependencies/gnosis/contracts/GPv2SafeERC20.sol - - /// @title Gnosis Protocol v2 Safe ERC20 Transfer Library - /// @author Gnosis Developers -@@ -1741,7 +1741,7 @@ library GPv2SafeERC20 { - } - } - --// downloads/ARBITRUM/BRIDGE_LOGIC/BridgeLogic/src/contracts/dependencies/openzeppelin/contracts/IERC20Detailed.sol -+// downloads/LINEA/BRIDGE_LOGIC/BridgeLogic/src/contracts/dependencies/openzeppelin/contracts/IERC20Detailed.sol - - interface IERC20Detailed is IERC20 { - function name() external view returns (string memory); -@@ -1751,7 +1751,7 @@ interface IERC20Detailed is IERC20 { - function decimals() external view returns (uint8); - } - --// downloads/ARBITRUM/BRIDGE_LOGIC/BridgeLogic/src/contracts/interfaces/IACLManager.sol -+// downloads/LINEA/BRIDGE_LOGIC/BridgeLogic/src/contracts/interfaces/IACLManager.sol - - /** - * @title IACLManager -@@ -1924,7 +1924,7 @@ interface IACLManager { - function isAssetListingAdmin(address admin) external view returns (bool); - } - --// downloads/ARBITRUM/BRIDGE_LOGIC/BridgeLogic/src/contracts/interfaces/IPriceOracleSentinel.sol -+// downloads/LINEA/BRIDGE_LOGIC/BridgeLogic/src/contracts/interfaces/IPriceOracleSentinel.sol - - /** - * @title IPriceOracleSentinel -@@ -1989,7 +1989,7 @@ interface IPriceOracleSentinel { - function getGracePeriod() external view returns (uint256); - } - --// downloads/ARBITRUM/BRIDGE_LOGIC/BridgeLogic/src/contracts/interfaces/IReserveInterestRateStrategy.sol -+// downloads/LINEA/BRIDGE_LOGIC/BridgeLogic/src/contracts/interfaces/IReserveInterestRateStrategy.sol - - /** - * @title IReserveInterestRateStrategy -@@ -2016,7 +2016,7 @@ interface IReserveInterestRateStrategy { - ) external view returns (uint256, uint256); - } - --// downloads/ARBITRUM/BRIDGE_LOGIC/BridgeLogic/src/contracts/protocol/libraries/math/MathUtils.sol -+// downloads/LINEA/BRIDGE_LOGIC/BridgeLogic/src/contracts/protocol/libraries/math/MathUtils.sol - - /** - * @title MathUtils library -@@ -2113,7 +2113,7 @@ library MathUtils { - } - } - --// downloads/ARBITRUM/BRIDGE_LOGIC/BridgeLogic/src/contracts/interfaces/IPool.sol -+// downloads/LINEA/BRIDGE_LOGIC/BridgeLogic/src/contracts/interfaces/IPool.sol - - /** - * @title IPool -@@ -2672,6 +2672,7 @@ interface IPool { - - /** - * @notice Returns the state and configuration of the reserve, including extra data included with Aave v3.1 -+ * @dev DEPRECATED use independent getters instead (getReserveData, getLiquidationGracePeriod) - * @param asset The address of the underlying asset of the reserve - * @return The state and configuration data of the reserve with virtual accounting - */ -@@ -2943,7 +2944,7 @@ interface IPool { - function getSupplyLogic() external view returns (address); - } - --// downloads/ARBITRUM/BRIDGE_LOGIC/BridgeLogic/src/contracts/protocol/libraries/configuration/ReserveConfiguration.sol -+// downloads/LINEA/BRIDGE_LOGIC/BridgeLogic/src/contracts/protocol/libraries/configuration/ReserveConfiguration.sol - - /** - * @title ReserveConfiguration library -@@ -2958,6 +2959,7 @@ library ReserveConfiguration { - uint256 internal constant ACTIVE_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFF; // prettier-ignore - uint256 internal constant FROZEN_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFDFFFFFFFFFFFFFF; // prettier-ignore - uint256 internal constant BORROWING_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFBFFFFFFFFFFFFFF; // prettier-ignore -+ // @notice there is an unoccupied hole of 1 bit at position 59 from pre 3.2 stableBorrowRateEnabled - uint256 internal constant PAUSED_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFF; // prettier-ignore - uint256 internal constant BORROWABLE_IN_ISOLATION_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFDFFFFFFFFFFFFFFF; // prettier-ignore - uint256 internal constant SILOED_BORROWING_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFBFFFFFFFFFFFFFFF; // prettier-ignore -@@ -2966,7 +2968,7 @@ library ReserveConfiguration { - uint256 internal constant BORROW_CAP_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000FFFFFFFFFFFFFFFFFFFF; // prettier-ignore - uint256 internal constant SUPPLY_CAP_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFF000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFF; // prettier-ignore - uint256 internal constant LIQUIDATION_PROTOCOL_FEE_MASK = 0xFFFFFFFFFFFFFFFFFFFFFF0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF; // prettier-ignore -- //@notice there is an unoccupied hole of 8 bits from 168 to 176 left from pre 3.2 eModeCategory -+ // @notice there is an unoccupied hole of 8 bits from 168 to 176 left from pre 3.2 eModeCategory - uint256 internal constant UNBACKED_MINT_CAP_MASK = 0xFFFFFFFFFFF000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF; // prettier-ignore - uint256 internal constant DEBT_CEILING_MASK = 0xF0000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF; // prettier-ignore - uint256 internal constant VIRTUAL_ACC_ACTIVE_MASK = 0xEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF; // prettier-ignore -@@ -3523,7 +3525,7 @@ library ReserveConfiguration { - } - } - --// downloads/ARBITRUM/BRIDGE_LOGIC/BridgeLogic/src/contracts/protocol/libraries/configuration/EModeConfiguration.sol -+// downloads/LINEA/BRIDGE_LOGIC/BridgeLogic/src/contracts/protocol/libraries/configuration/EModeConfiguration.sol - - /** - * @title EModeConfiguration library -@@ -3572,7 +3574,7 @@ library EModeConfiguration { - } - } - --// downloads/ARBITRUM/BRIDGE_LOGIC/BridgeLogic/src/contracts/protocol/libraries/configuration/UserConfiguration.sol -+// downloads/LINEA/BRIDGE_LOGIC/BridgeLogic/src/contracts/protocol/libraries/configuration/UserConfiguration.sol - - /** - * @title UserConfiguration library -@@ -3804,7 +3806,7 @@ library UserConfiguration { - } - } - --// downloads/ARBITRUM/BRIDGE_LOGIC/BridgeLogic/src/contracts/interfaces/IInitializableAToken.sol -+// downloads/LINEA/BRIDGE_LOGIC/BridgeLogic/src/contracts/interfaces/IInitializableAToken.sol - - /** - * @title IInitializableAToken -@@ -3857,7 +3859,7 @@ interface IInitializableAToken { - ) external; - } - --// downloads/ARBITRUM/BRIDGE_LOGIC/BridgeLogic/src/contracts/interfaces/IInitializableDebtToken.sol -+// downloads/LINEA/BRIDGE_LOGIC/BridgeLogic/src/contracts/interfaces/IInitializableDebtToken.sol - - /** - * @title IInitializableDebtToken -@@ -3906,7 +3908,7 @@ interface IInitializableDebtToken { - ) external; - } - --// downloads/ARBITRUM/BRIDGE_LOGIC/BridgeLogic/src/contracts/interfaces/IVariableDebtToken.sol -+// downloads/LINEA/BRIDGE_LOGIC/BridgeLogic/src/contracts/interfaces/IVariableDebtToken.sol - - /** - * @title IVariableDebtToken -@@ -3949,7 +3951,7 @@ interface IVariableDebtToken is IScaledBalanceToken, IInitializableDebtToken { - function UNDERLYING_ASSET_ADDRESS() external view returns (address); - } - --// downloads/ARBITRUM/BRIDGE_LOGIC/BridgeLogic/src/contracts/interfaces/IAToken.sol -+// downloads/LINEA/BRIDGE_LOGIC/BridgeLogic/src/contracts/interfaces/IAToken.sol - - /** - * @title IAToken -@@ -4083,7 +4085,7 @@ interface IAToken is IERC20, IScaledBalanceToken, IInitializableAToken { - function rescueTokens(address token, address to, uint256 amount) external; - } - --// downloads/ARBITRUM/BRIDGE_LOGIC/BridgeLogic/src/contracts/protocol/tokenization/base/IncentivizedERC20.sol -+// downloads/LINEA/BRIDGE_LOGIC/BridgeLogic/src/contracts/protocol/tokenization/base/IncentivizedERC20.sol - - /** - * @title IncentivizedERC20 -@@ -4306,7 +4308,7 @@ abstract contract IncentivizedERC20 is Context, IERC20Detailed { - } - } - --// downloads/ARBITRUM/BRIDGE_LOGIC/BridgeLogic/src/contracts/protocol/libraries/logic/ReserveLogic.sol -+// downloads/LINEA/BRIDGE_LOGIC/BridgeLogic/src/contracts/protocol/libraries/logic/ReserveLogic.sol - - /** - * @title ReserveLogic library -@@ -4607,7 +4609,7 @@ library ReserveLogic { - } - } - --// downloads/ARBITRUM/BRIDGE_LOGIC/BridgeLogic/src/contracts/protocol/libraries/logic/EModeLogic.sol -+// downloads/LINEA/BRIDGE_LOGIC/BridgeLogic/src/contracts/protocol/libraries/logic/EModeLogic.sol - - /** - * @title EModeLogic library -@@ -4669,7 +4671,7 @@ library EModeLogic { - } - } - --// downloads/ARBITRUM/BRIDGE_LOGIC/BridgeLogic/src/contracts/protocol/libraries/logic/GenericLogic.sol -+// downloads/LINEA/BRIDGE_LOGIC/BridgeLogic/src/contracts/protocol/libraries/logic/GenericLogic.sol - - /** - * @title GenericLogic library -@@ -4913,7 +4915,7 @@ library GenericLogic { - } - } - --// downloads/ARBITRUM/BRIDGE_LOGIC/BridgeLogic/src/contracts/protocol/libraries/logic/ValidationLogic.sol -+// downloads/LINEA/BRIDGE_LOGIC/BridgeLogic/src/contracts/protocol/libraries/logic/ValidationLogic.sol - - /** - * @title ReserveLogic library -@@ -5533,7 +5535,7 @@ library ValidationLogic { - } - } - --// downloads/ARBITRUM/BRIDGE_LOGIC/BridgeLogic/src/contracts/protocol/libraries/logic/BridgeLogic.sol -+// downloads/LINEA/BRIDGE_LOGIC/BridgeLogic/src/contracts/protocol/libraries/logic/BridgeLogic.sol - - library BridgeLogic { - using ReserveLogic for DataTypes.ReserveCache; + ``` diff --git a/diffs/ARBITRUM_LINEA/COLLECTOR_IMPL_DIFF.md b/diffs/ARBITRUM_LINEA/COLLECTOR_IMPL_DIFF.md index 724ff5b2..eb8e30eb 100644 --- a/diffs/ARBITRUM_LINEA/COLLECTOR_IMPL_DIFF.md +++ b/diffs/ARBITRUM_LINEA/COLLECTOR_IMPL_DIFF.md @@ -3,615 +3,25 @@ diff --git a/./downloads/ARBITRUM/COLLECTOR_IMPL.sol b/./downloads/LINEA/COLLECT index 752e048..80c907f 100644 --- a/./downloads/ARBITRUM/COLLECTOR_IMPL.sol +++ b/./downloads/LINEA/COLLECTOR_IMPL.sol -@@ -1,7 +1,7 @@ - // SPDX-License-Identifier: MIT --pragma solidity >=0.6.0 ^0.8.0 ^0.8.1; -+pragma solidity ^0.8.0 ^0.8.10; - --// downloads/ARBITRUM/COLLECTOR_IMPL/Collector/src/libs/ReentrancyGuard.sol -+// downloads/LINEA/COLLECTOR_IMPL/Collector/src/contracts/dependencies/openzeppelin/ReentrancyGuard.sol - - // OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol) - -@@ -71,52 +71,9 @@ abstract contract ReentrancyGuard { - } - } - --// downloads/ARBITRUM/COLLECTOR_IMPL/Collector/src/libs/VersionedInitializable.sol -+// downloads/LINEA/COLLECTOR_IMPL/Collector/src/contracts/dependencies/openzeppelin/contracts/Address.sol - --/** -- * @title VersionedInitializable -- * -- * @dev Helper contract to support initializer functions. To use it, replace -- * the constructor with a function that has the `initializer` modifier. -- * WARNING: Unlike constructors, initializer functions must be manually -- * invoked. This applies both to deploying an Initializable contract, as well -- * as extending an Initializable contract via inheritance. -- * WARNING: When used with inheritance, manual care must be taken to not invoke -- * a parent initializer twice, or ensure that all initializers are idempotent, -- * because this is not dealt with automatically as with constructors. -- * -- * @author Aave, inspired by the OpenZeppelin Initializable contract -- */ --abstract contract VersionedInitializable { -- /** -- * @dev Indicates that the contract has been initialized. -- */ -- uint256 internal lastInitializedRevision = 0; -- -- /** -- * @dev Modifier to use in the initializer function of a contract. -- */ -- modifier initializer() { -- uint256 revision = getRevision(); -- require(revision > lastInitializedRevision, 'Contract instance has already been initialized'); -- -- lastInitializedRevision = revision; -- -- _; -- } -- -- /// @dev returns the revision number of the contract. -- /// Needs to be defined in the inherited class as a constant. -- function getRevision() internal pure virtual returns (uint256); -- -- // Reserved storage space to allow for layout changes in the future. -- uint256[50] private ______gap; --} -- --// lib/solidity-utils/src/contracts/oz-common/Address.sol -- --// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol) --// From commit https://github.com/OpenZeppelin/openzeppelin-contracts/commit/8b778fa20d6d76340c5fac1ed66c80273f05b95a -+// OpenZeppelin Contracts v4.4.1 (utils/Address.sol) - - /** - * @dev Collection of functions related to the address type -@@ -138,22 +95,17 @@ library Address { - * - an address where a contract will be created - * - an address where a contract lived, but was destroyed - * ==== -- * -- * [IMPORTANT] -- * ==== -- * You shouldn't rely on `isContract` to protect against flash loan attacks! -- * -- * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets -- * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract -- * constructor. -- * ==== - */ - function isContract(address account) internal view returns (bool) { -- // This method relies on extcodesize/address.code.length, which returns 0 -- // for contracts in construction, since the code is only stored at the end -- // of the constructor execution. -+ // This method relies on extcodesize, which returns 0 for contracts in -+ // construction, since the code is only stored at the end of the -+ // constructor execution. - -- return account.code.length > 0; -+ uint256 size; -+ assembly { -+ size := extcodesize(account) -+ } -+ return size > 0; - } - - /** -@@ -198,7 +150,7 @@ library Address { - * _Available since v3.1._ - */ - function functionCall(address target, bytes memory data) internal returns (bytes memory) { -- return functionCallWithValue(target, data, 0, 'Address: low-level call failed'); -+ return functionCall(target, data, 'Address: low-level call failed'); - } - - /** -@@ -247,8 +199,10 @@ library Address { - string memory errorMessage - ) internal returns (bytes memory) { - require(address(this).balance >= value, 'Address: insufficient balance for call'); -+ require(isContract(target), 'Address: call to non-contract'); -+ - (bool success, bytes memory returndata) = target.call{value: value}(data); -- return verifyCallResultFromTarget(target, success, returndata, errorMessage); -+ return verifyCallResult(success, returndata, errorMessage); - } - - /** -@@ -275,8 +229,10 @@ library Address { - bytes memory data, - string memory errorMessage - ) internal view returns (bytes memory) { -+ require(isContract(target), 'Address: static call to non-contract'); -+ - (bool success, bytes memory returndata) = target.staticcall(data); -- return verifyCallResultFromTarget(target, success, returndata, errorMessage); -+ return verifyCallResult(success, returndata, errorMessage); - } - - /** -@@ -300,37 +256,15 @@ library Address { - bytes memory data, - string memory errorMessage - ) internal returns (bytes memory) { -+ require(isContract(target), 'Address: delegate call to non-contract'); -+ - (bool success, bytes memory returndata) = target.delegatecall(data); -- return verifyCallResultFromTarget(target, success, returndata, errorMessage); -+ return verifyCallResult(success, returndata, errorMessage); - } - - /** -- * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling -- * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. -- * -- * _Available since v4.8._ -- */ -- function verifyCallResultFromTarget( -- address target, -- bool success, -- bytes memory returndata, -- string memory errorMessage -- ) internal view returns (bytes memory) { -- if (success) { -- if (returndata.length == 0) { -- // only check isContract if the call was successful and the return data is empty -- // otherwise we already know that it was a contract -- require(isContract(target), 'Address: call to non-contract'); -- } -- return returndata; -- } else { -- _revert(returndata, errorMessage); -- } -- } -- -- /** -- * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the -- * revert reason or using the provided one. -+ * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the -+ * revert reason using the provided one. - * - * _Available since v4.3._ - */ -@@ -342,48 +276,27 @@ library Address { - if (success) { - return returndata; - } else { -- _revert(returndata, errorMessage); -- } -- } -+ // Look for revert reason and bubble it up if present -+ if (returndata.length > 0) { -+ // The easiest way to bubble the revert reason is using memory via assembly - -- function _revert(bytes memory returndata, string memory errorMessage) private pure { -- // Look for revert reason and bubble it up if present -- if (returndata.length > 0) { -- // The easiest way to bubble the revert reason is using memory via assembly -- /// @solidity memory-safe-assembly -- assembly { -- let returndata_size := mload(returndata) -- revert(add(32, returndata), returndata_size) -+ assembly { -+ let returndata_size := mload(returndata) -+ revert(add(32, returndata), returndata_size) -+ } -+ } else { -+ revert(errorMessage); - } -- } else { -- revert(errorMessage); - } - } - } - --// lib/solidity-utils/src/contracts/oz-common/interfaces/IERC20.sol -- --// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) --// From commit https://github.com/OpenZeppelin/openzeppelin-contracts/commit/a035b235b4f2c9af4ba88edc4447f02e37f8d124 -+// downloads/LINEA/COLLECTOR_IMPL/Collector/src/contracts/dependencies/openzeppelin/contracts/IERC20.sol - - /** - * @dev Interface of the ERC20 standard as defined in the EIP. - */ - interface IERC20 { -- /** -- * @dev Emitted when `value` tokens are moved from one account (`from`) to -- * another (`to`). -- * -- * Note that `value` may be zero. -- */ -- event Transfer(address indexed from, address indexed to, uint256 value); -- -- /** -- * @dev Emitted when the allowance of a `spender` for an `owner` is set by -- * a call to {approve}. `value` is the new allowance. -- */ -- event Approval(address indexed owner, address indexed spender, uint256 value); -- - /** - * @dev Returns the amount of tokens in existence. - */ -@@ -395,13 +308,13 @@ interface IERC20 { - function balanceOf(address account) external view returns (uint256); - - /** -- * @dev Moves `amount` tokens from the caller's account to `to`. -+ * @dev Moves `amount` tokens from the caller's account to `recipient`. - * - * Returns a boolean value indicating whether the operation succeeded. - * - * Emits a {Transfer} event. - */ -- function transfer(address to, uint256 amount) external returns (bool); -+ function transfer(address recipient, uint256 amount) external returns (bool); - - /** - * @dev Returns the remaining number of tokens that `spender` will be -@@ -429,7 +342,7 @@ interface IERC20 { - function approve(address spender, uint256 amount) external returns (bool); - - /** -- * @dev Moves `amount` tokens from `from` to `to` using the -+ * @dev Moves `amount` tokens from `sender` to `recipient` using the - * allowance mechanism. `amount` is then deducted from the caller's - * allowance. - * -@@ -437,71 +350,101 @@ interface IERC20 { - * - * Emits a {Transfer} event. - */ -- function transferFrom(address from, address to, uint256 amount) external returns (bool); -+ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); -+ -+ /** -+ * @dev Emitted when `value` tokens are moved from one account (`from`) to -+ * another (`to`). -+ * -+ * Note that `value` may be zero. -+ */ -+ event Transfer(address indexed from, address indexed to, uint256 value); -+ -+ /** -+ * @dev Emitted when the allowance of a `spender` for an `owner` is set by -+ * a call to {approve}. `value` is the new allowance. -+ */ -+ event Approval(address indexed owner, address indexed spender, uint256 value); - } - --// lib/solidity-utils/src/contracts/oz-common/interfaces/IERC20Permit.sol -- --// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/IERC20Permit.sol) --// Modified from https://github.com/OpenZeppelin/openzeppelin-contracts/commit/00cbf5a236564c3b7aacdad1f378cae22d890ca6 -+// downloads/LINEA/COLLECTOR_IMPL/Collector/src/contracts/misc/aave-upgradeability/VersionedInitializable.sol - - /** -- * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in -- * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. -- * -- * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by -- * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't -- * need to send a transaction, and thus is not required to hold Ether at all. -+ * @title VersionedInitializable -+ * @author Aave, inspired by the OpenZeppelin Initializable contract -+ * @notice Helper contract to implement initializer functions. To use it, replace -+ * the constructor with a function that has the `initializer` modifier. -+ * @dev WARNING: Unlike constructors, initializer functions must be manually -+ * invoked. This applies both to deploying an Initializable contract, as well -+ * as extending an Initializable contract via inheritance. -+ * WARNING: When used with inheritance, manual care must be taken to not invoke -+ * a parent initializer twice, or ensure that all initializers are idempotent, -+ * because this is not dealt with automatically as with constructors. - */ --interface IERC20Permit { -+abstract contract VersionedInitializable { - /** -- * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, -- * given ``owner``'s signed approval. -- * -- * IMPORTANT: The same issues {IERC20-approve} has related to transaction -- * ordering also apply here. -- * -- * Emits an {Approval} event. -- * -- * Requirements: -- * -- * - `spender` cannot be the zero address. -- * - `deadline` must be a timestamp in the future. -- * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` -- * over the EIP712-formatted function arguments. -- * - the signature must use ``owner``'s current nonce (see {nonces}). -- * -- * For more information on the signature format, see the -- * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP -- * section]. -+ * @dev Indicates that the contract has been initialized. - */ -- function permit( -- address owner, -- address spender, -- uint256 value, -- uint256 deadline, -- uint8 v, -- bytes32 r, -- bytes32 s -- ) external; -+ uint256 private lastInitializedRevision = 0; - - /** -- * @dev Returns the current nonce for `owner`. This value must be -- * included whenever a signature is generated for {permit}. -- * -- * Every successful call to {permit} increases ``owner``'s nonce by one. This -- * prevents a signature from being used multiple times. -+ * @dev Indicates that the contract is in the process of being initialized. - */ -- function nonces(address owner) external view returns (uint256); -+ bool private initializing; - - /** -- * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. -+ * @dev Modifier to use in the initializer function of a contract. - */ -- // solhint-disable-next-line func-name-mixedcase -- function DOMAIN_SEPARATOR() external view returns (bytes32); -+ modifier initializer() { -+ uint256 revision = getRevision(); -+ require( -+ initializing || isConstructor() || revision > lastInitializedRevision, -+ 'Contract instance has already been initialized' -+ ); -+ -+ bool isTopLevelCall = !initializing; -+ if (isTopLevelCall) { -+ initializing = true; -+ lastInitializedRevision = revision; -+ } -+ -+ _; -+ -+ if (isTopLevelCall) { -+ initializing = false; -+ } -+ } -+ -+ /** -+ * @notice Returns the revision number of the contract -+ * @dev Needs to be defined in the inherited class as a constant. -+ * @return The revision number -+ */ -+ function getRevision() internal pure virtual returns (uint256); -+ -+ /** -+ * @notice Returns true if and only if the function is running in the constructor -+ * @return True if the function is running in the constructor -+ */ -+ function isConstructor() private view returns (bool) { -+ // extcodesize checks the size of the code stored in an address, and -+ // address returns the current address. Since the code is still not -+ // deployed when running a constructor, any checks on its code size will -+ // yield zero, making it an effective way to detect if a contract is -+ // under construction or not. -+ uint256 cs; -+ //solium-disable-next-line -+ assembly { -+ cs := extcodesize(address()) -+ } -+ return cs == 0; -+ } -+ -+ // Reserved storage space to allow for layout changes in the future. -+ uint256[50] private ______gap; - } - --// downloads/ARBITRUM/COLLECTOR_IMPL/Collector/src/interfaces/ICollector.sol -+// downloads/LINEA/COLLECTOR_IMPL/Collector/src/contracts/treasury/ICollector.sol - - interface ICollector { - struct Stream { -@@ -673,10 +616,9 @@ interface ICollector { - function getNextStreamId() external view returns (uint256); - } - --// lib/solidity-utils/src/contracts/oz-common/SafeERC20.sol -+// downloads/LINEA/COLLECTOR_IMPL/Collector/src/contracts/dependencies/openzeppelin/contracts/SafeERC20.sol - --// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/utils/SafeERC20.sol) --// Modified From commit https://github.com/OpenZeppelin/openzeppelin-contracts/commit/00cbf5a236564c3b7aacdad1f378cae22d890ca6 -+// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol) - - /** - * @title SafeERC20 -@@ -690,96 +632,52 @@ interface ICollector { - library SafeERC20 { - using Address for address; - -- /** -- * @dev An operation with an ERC20 token failed. -- */ -- error SafeERC20FailedOperation(address token); -- -- /** -- * @dev Indicates a failed `decreaseAllowance` request. -- */ -- error SafeERC20FailedDecreaseAllowance( -- address spender, -- uint256 currentAllowance, -- uint256 requestedDecrease -- ); -- -- /** -- * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value, -- * non-reverting calls are assumed to be successful. -- */ - function safeTransfer(IERC20 token, address to, uint256 value) internal { -- _callOptionalReturn(token, abi.encodeCall(token.transfer, (to, value))); -+ _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); - } - -- /** -- * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the -- * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful. -- */ - function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { -- _callOptionalReturn(token, abi.encodeCall(token.transferFrom, (from, to, value))); -+ _callOptionalReturn( -+ token, -+ abi.encodeWithSelector(token.transferFrom.selector, from, to, value) -+ ); - } - - /** -- * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value, -- * non-reverting calls are assumed to be successful. -+ * @dev Deprecated. This function has issues similar to the ones found in -+ * {IERC20-approve}, and its usage is discouraged. -+ * -+ * Whenever possible, use {safeIncreaseAllowance} and -+ * {safeDecreaseAllowance} instead. - */ -+ function safeApprove(IERC20 token, address spender, uint256 value) internal { -+ // safeApprove should only be called when setting an initial allowance, -+ // or when resetting it to zero. To increase and decrease it, use -+ // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' -+ require( -+ (value == 0) || (token.allowance(address(this), spender) == 0), -+ 'SafeERC20: approve from non-zero to non-zero allowance' -+ ); -+ _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); -+ } -+ - function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { -- uint256 oldAllowance = token.allowance(address(this), spender); -- forceApprove(token, spender, oldAllowance + value); -+ uint256 newAllowance = token.allowance(address(this), spender) + value; -+ _callOptionalReturn( -+ token, -+ abi.encodeWithSelector(token.approve.selector, spender, newAllowance) -+ ); - } - -- /** -- * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no value, -- * non-reverting calls are assumed to be successful. -- */ -- function safeDecreaseAllowance( -- IERC20 token, -- address spender, -- uint256 requestedDecrease -- ) internal { -+ function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { - unchecked { -- uint256 currentAllowance = token.allowance(address(this), spender); -- if (currentAllowance < requestedDecrease) { -- revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease); -- } -- forceApprove(token, spender, currentAllowance - requestedDecrease); -- } -- } -- -- /** -- * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value, -- * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval -- * to be set to zero before setting it to a non-zero value, such as USDT. -- */ -- function forceApprove(IERC20 token, address spender, uint256 value) internal { -- bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value)); -- -- if (!_callOptionalReturnBool(token, approvalCall)) { -- _callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0))); -- _callOptionalReturn(token, approvalCall); -- } -- } -- -- /** -- * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`. -- * Revert on invalid signature. -- */ -- function safePermit( -- IERC20Permit token, -- address owner, -- address spender, -- uint256 value, -- uint256 deadline, -- uint8 v, -- bytes32 r, -- bytes32 s -- ) internal { -- uint256 nonceBefore = token.nonces(owner); -- token.permit(owner, spender, value, deadline, v, r, s); -- uint256 nonceAfter = token.nonces(owner); -- if (nonceAfter != nonceBefore + 1) { -- revert SafeERC20FailedOperation(address(token)); -+ uint256 oldAllowance = token.allowance(address(this), spender); -+ require(oldAllowance >= value, 'SafeERC20: decreased allowance below zero'); -+ uint256 newAllowance = oldAllowance - value; -+ _callOptionalReturn( -+ token, -+ abi.encodeWithSelector(token.approve.selector, spender, newAllowance) -+ ); - } - } - -@@ -791,37 +689,18 @@ library SafeERC20 { - */ - function _callOptionalReturn(IERC20 token, bytes memory data) private { - // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since -- // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that -+ // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that - // the target address contains contract code and also asserts for success in the low-level call. - -- bytes memory returndata = address(token).functionCall(data); -- if (returndata.length != 0 && !abi.decode(returndata, (bool))) { -- revert SafeERC20FailedOperation(address(token)); -+ bytes memory returndata = address(token).functionCall(data, 'SafeERC20: low-level call failed'); -+ if (returndata.length > 0) { -+ // Return data is optional -+ require(abi.decode(returndata, (bool)), 'SafeERC20: ERC20 operation did not succeed'); - } - } -- -- /** -- * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement -- * on the return value: the return value is optional (but if data is returned, it must not be false). -- * @param token The token targeted by the call. -- * @param data The call data (encoded using abi.encode or one of its variants). -- * -- * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead. -- */ -- function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) { -- // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since -- // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false -- // and not revert is the subcall reverts. -- -- (bool success, bytes memory returndata) = address(token).call(data); -- return -- success && -- (returndata.length == 0 || abi.decode(returndata, (bool))) && -- address(token).code.length > 0; -- } - } - + -// downloads/ARBITRUM/COLLECTOR_IMPL/Collector/src/contracts/Collector.sol +// downloads/LINEA/COLLECTOR_IMPL/Collector/src/contracts/treasury/Collector.sol - + /** * @title Collector @@ -903,8 +782,6 @@ contract Collector is VersionedInitializable, ICollector, ReentrancyGuard { _nextStreamId = nextStreamId; } - + - // can be removed after first deployment - _initGuard(); _setFundsAdmin(fundsAdmin); } - + @@ -1021,9 +898,6 @@ contract Collector is VersionedInitializable, ICollector, ReentrancyGuard { } } - + - /// @dev needed in order to receive ETH from the Aave v1 ecosystem reserve - receive() external payable {} - diff --git a/diffs/ARBITRUM_LINEA/CONFIGURATOR_LOGIC_DIFF.md b/diffs/ARBITRUM_LINEA/CONFIGURATOR_LOGIC_DIFF.md index 4203b8a0..5a33f407 100644 --- a/diffs/ARBITRUM_LINEA/CONFIGURATOR_LOGIC_DIFF.md +++ b/diffs/ARBITRUM_LINEA/CONFIGURATOR_LOGIC_DIFF.md @@ -3,879 +3,10 @@ diff --git a/./downloads/ARBITRUM/CONFIGURATOR_LOGIC.sol b/./downloads/LINEA/CON index b92a1a1..22e067d 100644 --- a/./downloads/ARBITRUM/CONFIGURATOR_LOGIC.sol +++ b/./downloads/LINEA/CONFIGURATOR_LOGIC.sol -@@ -1,7 +1,7 @@ - // SPDX-License-Identifier: BUSL-1.1 - pragma solidity ^0.8.0 ^0.8.10; - --// downloads/ARBITRUM/CONFIGURATOR_LOGIC/ConfiguratorLogic/src/core/contracts/dependencies/openzeppelin/contracts/Address.sol -+// downloads/LINEA/CONFIGURATOR_LOGIC/ConfiguratorLogic/src/contracts/dependencies/openzeppelin/contracts/Address.sol - - // OpenZeppelin Contracts v4.4.1 (utils/Address.sol) - -@@ -221,7 +221,7 @@ library Address { - } - } - --// downloads/ARBITRUM/CONFIGURATOR_LOGIC/ConfiguratorLogic/src/core/contracts/dependencies/openzeppelin/contracts/IERC20.sol -+// downloads/LINEA/CONFIGURATOR_LOGIC/ConfiguratorLogic/src/contracts/dependencies/openzeppelin/contracts/IERC20.sol - - /** - * @dev Interface of the ERC20 standard as defined in the EIP. -@@ -297,7 +297,7 @@ interface IERC20 { - event Approval(address indexed owner, address indexed spender, uint256 value); - } - --// downloads/ARBITRUM/CONFIGURATOR_LOGIC/ConfiguratorLogic/src/core/contracts/dependencies/openzeppelin/upgradeability/Proxy.sol -+// downloads/LINEA/CONFIGURATOR_LOGIC/ConfiguratorLogic/src/contracts/dependencies/openzeppelin/upgradeability/Proxy.sol - - /** - * @title Proxy -@@ -378,7 +378,7 @@ abstract contract Proxy { - } - } - --// downloads/ARBITRUM/CONFIGURATOR_LOGIC/ConfiguratorLogic/src/core/contracts/interfaces/IAaveIncentivesController.sol -+// downloads/LINEA/CONFIGURATOR_LOGIC/ConfiguratorLogic/src/contracts/interfaces/IAaveIncentivesController.sol - - /** - * @title IAaveIncentivesController -@@ -397,7 +397,7 @@ interface IAaveIncentivesController { - function handleAction(address user, uint256 totalSupply, uint256 userBalance) external; - } - --// downloads/ARBITRUM/CONFIGURATOR_LOGIC/ConfiguratorLogic/src/core/contracts/interfaces/IPoolAddressesProvider.sol -+// downloads/LINEA/CONFIGURATOR_LOGIC/ConfiguratorLogic/src/contracts/interfaces/IPoolAddressesProvider.sol - - /** - * @title IPoolAddressesProvider -@@ -624,7 +624,7 @@ interface IPoolAddressesProvider { - function setPoolDataProvider(address newDataProvider) external; - } - --// downloads/ARBITRUM/CONFIGURATOR_LOGIC/ConfiguratorLogic/src/core/contracts/protocol/libraries/helpers/Errors.sol -+// downloads/LINEA/CONFIGURATOR_LOGIC/ConfiguratorLogic/src/contracts/protocol/libraries/helpers/Errors.sol - - /** - * @title Errors library -@@ -662,17 +662,14 @@ library Errors { - string public constant RESERVE_FROZEN = '28'; // 'Action cannot be performed because the reserve is frozen' - string public constant RESERVE_PAUSED = '29'; // 'Action cannot be performed because the reserve is paused' - string public constant BORROWING_NOT_ENABLED = '30'; // 'Borrowing is not enabled' -- string public constant STABLE_BORROWING_NOT_ENABLED = '31'; // 'Stable borrowing is not enabled' - string public constant NOT_ENOUGH_AVAILABLE_USER_BALANCE = '32'; // 'User cannot withdraw more than the available balance' - string public constant INVALID_INTEREST_RATE_MODE_SELECTED = '33'; // 'Invalid interest rate mode selected' - string public constant COLLATERAL_BALANCE_IS_ZERO = '34'; // 'The collateral balance is 0' - string public constant HEALTH_FACTOR_LOWER_THAN_LIQUIDATION_THRESHOLD = '35'; // 'Health factor is lesser than the liquidation threshold' - string public constant COLLATERAL_CANNOT_COVER_NEW_BORROW = '36'; // 'There is not enough collateral to cover a new borrow' - string public constant COLLATERAL_SAME_AS_BORROWING_CURRENCY = '37'; // 'Collateral is (mostly) the same currency that is being borrowed' -- string public constant AMOUNT_BIGGER_THAN_MAX_LOAN_SIZE_STABLE = '38'; // 'The requested amount is greater than the max loan size in stable rate mode' - string public constant NO_DEBT_OF_SELECTED_TYPE = '39'; // 'For repayment of a specific type of debt, the user needs to have debt that type' - string public constant NO_EXPLICIT_AMOUNT_TO_REPAY_ON_BEHALF = '40'; // 'To repay on behalf of a user an explicit amount to repay is needed' -- string public constant NO_OUTSTANDING_STABLE_DEBT = '41'; // 'User does not have outstanding stable rate debt on this reserve' - string public constant NO_OUTSTANDING_VARIABLE_DEBT = '42'; // 'User does not have outstanding variable rate debt on this reserve' - string public constant UNDERLYING_BALANCE_ZERO = '43'; // 'The underlying balance needs to be greater than 0' - string public constant INTEREST_RATE_REBALANCE_CONDITIONS_NOT_MET = '44'; // 'Interest rate rebalance conditions were not met' -@@ -685,7 +682,6 @@ library Errors { - string public constant UNBACKED_MINT_CAP_EXCEEDED = '52'; // 'Unbacked mint cap is exceeded' - string public constant DEBT_CEILING_EXCEEDED = '53'; // 'Debt ceiling is exceeded' - string public constant UNDERLYING_CLAIMABLE_RIGHTS_NOT_ZERO = '54'; // 'Claimable rights over underlying not zero (aToken supply or accruedToTreasury)' -- string public constant STABLE_DEBT_NOT_ZERO = '55'; // 'Stable debt supply is not zero' - string public constant VARIABLE_DEBT_SUPPLY_NOT_ZERO = '56'; // 'Variable debt supply is not zero' - string public constant LTV_VALIDATION_FAILED = '57'; // 'Ltv validation failed' - string public constant INCONSISTENT_EMODE_CATEGORY = '58'; // 'Inconsistent eMode category' -@@ -714,11 +710,9 @@ library Errors { - string public constant DEBT_CEILING_NOT_ZERO = '81'; // 'Debt ceiling is not zero' - string public constant ASSET_NOT_LISTED = '82'; // 'Asset is not listed' - string public constant INVALID_OPTIMAL_USAGE_RATIO = '83'; // 'Invalid optimal usage ratio' -- string public constant INVALID_OPTIMAL_STABLE_TO_TOTAL_DEBT_RATIO = '84'; // 'Invalid optimal stable to total debt ratio' - string public constant UNDERLYING_CANNOT_BE_RESCUED = '85'; // 'The underlying asset cannot be rescued' - string public constant ADDRESSES_PROVIDER_ALREADY_ADDED = '86'; // 'Reserve has already been added to reserve list' - string public constant POOL_ADDRESSES_DO_NOT_MATCH = '87'; // 'The token implementation pool address and the pool address provided by the initializing pool do not match' -- string public constant STABLE_BORROWING_ENABLED = '88'; // 'Stable borrowing is enabled' - string public constant SILOED_BORROWING_VIOLATION = '89'; // 'User is trying to borrow multiple assets including a siloed one' - string public constant RESERVE_DEBT_NOT_ZERO = '90'; // the total debt of the reserve needs to be 0 - string public constant FLASHLOAN_DISABLED = '91'; // FlashLoaning for this asset is disabled -@@ -730,14 +724,14 @@ library Errors { - string public constant LIQUIDATION_GRACE_SENTINEL_CHECK_FAILED = '97'; // 'Liquidation grace sentinel validation failed' - string public constant INVALID_GRACE_PERIOD = '98'; // Grace period above a valid range - string public constant INVALID_FREEZE_STATE = '99'; // Reserve is already in the passed freeze state -+ string public constant NOT_BORROWABLE_IN_EMODE = '100'; // Asset not borrowable in eMode - } - --// downloads/ARBITRUM/CONFIGURATOR_LOGIC/ConfiguratorLogic/src/core/contracts/protocol/libraries/types/ConfiguratorInputTypes.sol -+// downloads/LINEA/CONFIGURATOR_LOGIC/ConfiguratorLogic/src/contracts/protocol/libraries/types/ConfiguratorInputTypes.sol - - library ConfiguratorInputTypes { - struct InitReserveInput { - address aTokenImpl; -- address stableDebtTokenImpl; - address variableDebtTokenImpl; - bool useVirtualBalance; - address interestRateStrategyAddress; -@@ -748,8 +742,6 @@ library ConfiguratorInputTypes { - string aTokenSymbol; - string variableDebtTokenName; - string variableDebtTokenSymbol; -- string stableDebtTokenName; -- string stableDebtTokenSymbol; - bytes params; - bytes interestRateData; - } -@@ -774,7 +766,7 @@ library ConfiguratorInputTypes { - } - } - --// downloads/ARBITRUM/CONFIGURATOR_LOGIC/ConfiguratorLogic/src/core/contracts/protocol/libraries/types/DataTypes.sol -+// downloads/LINEA/CONFIGURATOR_LOGIC/ConfiguratorLogic/src/contracts/protocol/libraries/types/DataTypes.sol - - library DataTypes { - /** -@@ -792,7 +784,7 @@ library DataTypes { - uint128 variableBorrowIndex; - //the current variable borrow rate. Expressed in ray - uint128 currentVariableBorrowRate; -- //the current stable borrow rate. Expressed in ray -+ // DEPRECATED on v3.2.0 - uint128 currentStableBorrowRate; - //timestamp of last update - uint40 lastUpdateTimestamp; -@@ -800,7 +792,7 @@ library DataTypes { - uint16 id; - //aToken address - address aTokenAddress; -- //stableDebtToken address -+ // DEPRECATED on v3.2.0 - address stableDebtTokenAddress; - //variableDebtToken address - address variableDebtTokenAddress; -@@ -825,8 +817,8 @@ library DataTypes { - uint128 variableBorrowIndex; - //the current variable borrow rate. Expressed in ray - uint128 currentVariableBorrowRate; -- //the current stable borrow rate. Expressed in ray -- uint128 currentStableBorrowRate; -+ // DEPRECATED on v3.2.0 -+ uint128 __deprecatedStableBorrowRate; - //timestamp of last update - uint40 lastUpdateTimestamp; - //the id of the reserve. Represents the position in the list of the active reserves -@@ -835,8 +827,8 @@ library DataTypes { - uint40 liquidationGracePeriodUntil; - //aToken address - address aTokenAddress; -- //stableDebtToken address -- address stableDebtTokenAddress; -+ // DEPRECATED on v3.2.0 -+ address __deprecatedStableDebtTokenAddress; - //variableDebtToken address - address variableDebtTokenAddress; - //address of the interest rate strategy -@@ -859,7 +851,7 @@ library DataTypes { - //bit 56: reserve is active - //bit 57: reserve is frozen - //bit 58: borrowing is enabled -- //bit 59: stable rate borrowing enabled -+ //bit 59: DEPRECATED: stable rate borrowing enabled - //bit 60: asset is paused - //bit 61: borrowing in isolation mode is enabled - //bit 62: siloed borrowing enabled -@@ -868,7 +860,7 @@ library DataTypes { - //bit 80-115: borrow cap in whole tokens, borrowCap == 0 => no cap - //bit 116-151: supply cap in whole tokens, supplyCap == 0 => no cap - //bit 152-167: liquidation protocol fee -- //bit 168-175: eMode category -+ //bit 168-175: DEPRECATED: eMode category - //bit 176-211: unbacked mint cap in whole tokens, unbackedMintCap == 0 => minting disabled - //bit 212-251: debt ceiling for isolation mode with (ReserveConfiguration::DEBT_CEILING_DECIMALS) decimals - //bit 252: virtual accounting is enabled for the reserve -@@ -886,30 +878,49 @@ library DataTypes { - uint256 data; - } - -- struct EModeCategory { -+ // DEPRECATED: kept for backwards compatibility, might be removed in a future version -+ struct EModeCategoryLegacy { - // each eMode category has a custom ltv and liquidation threshold - uint16 ltv; - uint16 liquidationThreshold; - uint16 liquidationBonus; -- // each eMode category may or may not have a custom oracle to override the individual assets price oracles -+ // DEPRECATED - address priceSource; - string label; - } - -+ struct CollateralConfig { -+ uint16 ltv; -+ uint16 liquidationThreshold; -+ uint16 liquidationBonus; -+ } -+ -+ struct EModeCategoryBaseConfiguration { -+ uint16 ltv; -+ uint16 liquidationThreshold; -+ uint16 liquidationBonus; -+ string label; -+ } -+ -+ struct EModeCategory { -+ // each eMode category has a custom ltv and liquidation threshold -+ uint16 ltv; -+ uint16 liquidationThreshold; -+ uint16 liquidationBonus; -+ uint128 collateralBitmap; -+ string label; -+ uint128 borrowableBitmap; -+ } -+ - enum InterestRateMode { - NONE, -- STABLE, -+ __DEPRECATED, - VARIABLE - } - - struct ReserveCache { - uint256 currScaledVariableDebt; - uint256 nextScaledVariableDebt; -- uint256 currPrincipalStableDebt; -- uint256 currAvgStableBorrowRate; -- uint256 currTotalStableDebt; -- uint256 nextAvgStableBorrowRate; -- uint256 nextTotalStableDebt; - uint256 currLiquidityIndex; - uint256 nextLiquidityIndex; - uint256 currVariableBorrowIndex; -@@ -919,10 +930,8 @@ library DataTypes { - uint256 reserveFactor; - ReserveConfigurationMap reserveConfiguration; - address aTokenAddress; -- address stableDebtTokenAddress; - address variableDebtTokenAddress; - uint40 reserveLastUpdateTimestamp; -- uint40 stableDebtLastUpdateTimestamp; - } - - struct ExecuteLiquidationCallParams { -@@ -952,7 +961,6 @@ library DataTypes { - InterestRateMode interestRateMode; - uint16 referralCode; - bool releaseUnderlying; -- uint256 maxStableRateBorrowSizePercent; - uint256 reservesCount; - address oracle; - uint8 userEModeCategory; -@@ -1004,7 +1012,6 @@ library DataTypes { - uint16 referralCode; - uint256 flashLoanPremiumToProtocol; - uint256 flashLoanPremiumTotal; -- uint256 maxStableRateBorrowSizePercent; - uint256 reservesCount; - address addressesProvider; - address pool; -@@ -1046,7 +1053,6 @@ library DataTypes { - address userAddress; - uint256 amount; - InterestRateMode interestRateMode; -- uint256 maxStableLoanPercent; - uint256 reservesCount; - address oracle; - uint8 userEModeCategory; -@@ -1067,9 +1073,7 @@ library DataTypes { - uint256 unbacked; - uint256 liquidityAdded; - uint256 liquidityTaken; -- uint256 totalStableDebt; -- uint256 totalVariableDebt; -- uint256 averageStableBorrowRate; -+ uint256 totalDebt; - uint256 reserveFactor; - address reserve; - bool usingVirtualBalance; -@@ -1079,7 +1083,6 @@ library DataTypes { - struct InitReserveParams { - address asset; - address aTokenAddress; -- address stableDebtAddress; - address variableDebtAddress; - address interestRateStrategyAddress; - uint16 reservesCount; -@@ -1087,7 +1090,7 @@ library DataTypes { - } - } - --// downloads/ARBITRUM/CONFIGURATOR_LOGIC/ConfiguratorLogic/src/core/contracts/dependencies/openzeppelin/contracts/IERC20Detailed.sol -+// downloads/LINEA/CONFIGURATOR_LOGIC/ConfiguratorLogic/src/contracts/dependencies/openzeppelin/contracts/IERC20Detailed.sol - - interface IERC20Detailed is IERC20 { - function name() external view returns (string memory); -@@ -1097,7 +1100,7 @@ interface IERC20Detailed is IERC20 { - function decimals() external view returns (uint8); - } - --// downloads/ARBITRUM/CONFIGURATOR_LOGIC/ConfiguratorLogic/src/core/contracts/interfaces/IReserveInterestRateStrategy.sol -+// downloads/LINEA/CONFIGURATOR_LOGIC/ConfiguratorLogic/src/contracts/interfaces/IReserveInterestRateStrategy.sol - - /** - * @title IReserveInterestRateStrategy -@@ -1117,15 +1120,14 @@ interface IReserveInterestRateStrategy { - * @notice Calculates the interest rates depending on the reserve's state and configurations - * @param params The parameters needed to calculate interest rates - * @return liquidityRate The liquidity rate expressed in ray -- * @return stableBorrowRate The stable borrow rate expressed in ray - * @return variableBorrowRate The variable borrow rate expressed in ray - */ - function calculateInterestRates( - DataTypes.CalculateInterestRatesParams memory params -- ) external view returns (uint256, uint256, uint256); -+ ) external view returns (uint256, uint256); - } - --// downloads/ARBITRUM/CONFIGURATOR_LOGIC/ConfiguratorLogic/src/core/contracts/dependencies/openzeppelin/upgradeability/BaseUpgradeabilityProxy.sol -+// downloads/LINEA/CONFIGURATOR_LOGIC/ConfiguratorLogic/src/contracts/dependencies/openzeppelin/upgradeability/BaseUpgradeabilityProxy.sol - - /** - * @title BaseUpgradeabilityProxy -@@ -1188,7 +1190,7 @@ contract BaseUpgradeabilityProxy is Proxy { - } - } - --// downloads/ARBITRUM/CONFIGURATOR_LOGIC/ConfiguratorLogic/src/core/contracts/interfaces/IPool.sol -+// downloads/LINEA/CONFIGURATOR_LOGIC/ConfiguratorLogic/src/contracts/interfaces/IPool.sol - - /** - * @title IPool -@@ -1253,7 +1255,7 @@ interface IPool { - * initiator of the transaction on flashLoan() - * @param onBehalfOf The address that will be getting the debt - * @param amount The amount borrowed out -- * @param interestRateMode The rate mode: 1 for Stable, 2 for Variable -+ * @param interestRateMode The rate mode: 2 for Variable, 1 is deprecated (changed on v3.2.0) - * @param borrowRate The numeric rate at which the user has borrowed, expressed in ray - * @param referralCode The referral code used - */ -@@ -1283,18 +1285,6 @@ interface IPool { - bool useATokens - ); - -- /** -- * @dev Emitted on swapBorrowRateMode() -- * @param reserve The address of the underlying asset of the reserve -- * @param user The address of the user swapping his rate mode -- * @param interestRateMode The current interest rate mode of the position being swapped: 1 for Stable, 2 for Variable -- */ -- event SwapBorrowRateMode( -- address indexed reserve, -- address indexed user, -- DataTypes.InterestRateMode interestRateMode -- ); -- - /** - * @dev Emitted on borrow(), repay() and liquidationCall() when using isolated assets - * @param asset The address of the underlying asset of the reserve -@@ -1323,20 +1313,14 @@ interface IPool { - */ - event ReserveUsedAsCollateralDisabled(address indexed reserve, address indexed user); - -- /** -- * @dev Emitted on rebalanceStableBorrowRate() -- * @param reserve The address of the underlying asset of the reserve -- * @param user The address of the user for which the rebalance has been executed -- */ -- event RebalanceStableBorrowRate(address indexed reserve, address indexed user); -- - /** - * @dev Emitted on flashLoan() - * @param target The address of the flash loan receiver contract - * @param initiator The address initiating the flash loan - * @param asset The address of the asset being flash borrowed - * @param amount The amount flash borrowed -- * @param interestRateMode The flashloan mode: 0 for regular flashloan, 1 for Stable debt, 2 for Variable debt -+ * @param interestRateMode The flashloan mode: 0 for regular flashloan, -+ * 1 for Stable (Deprecated on v3.2.0), 2 for Variable - * @param premium The fee flash borrowed - * @param referralCode The referral code used - */ -@@ -1375,7 +1359,7 @@ interface IPool { - * @dev Emitted when the state of a reserve is updated. - * @param reserve The address of the underlying asset of the reserve - * @param liquidityRate The next liquidity rate -- * @param stableBorrowRate The next stable borrow rate -+ * @param stableBorrowRate The next stable borrow rate @note deprecated on v3.2.0 - * @param variableBorrowRate The next variable borrow rate - * @param liquidityIndex The next liquidity index - * @param variableBorrowIndex The next variable borrow index -@@ -1474,13 +1458,12 @@ interface IPool { - - /** - * @notice Allows users to borrow a specific `amount` of the reserve underlying asset, provided that the borrower -- * already supplied enough collateral, or he was given enough allowance by a credit delegator on the -- * corresponding debt token (StableDebtToken or VariableDebtToken) -+ * already supplied enough collateral, or he was given enough allowance by a credit delegator on the VariableDebtToken - * - E.g. User borrows 100 USDC passing as `onBehalfOf` his own address, receiving the 100 USDC in his wallet -- * and 100 stable/variable debt tokens, depending on the `interestRateMode` -+ * and 100 variable debt tokens - * @param asset The address of the underlying asset to borrow - * @param amount The amount to be borrowed -- * @param interestRateMode The interest rate mode at which the user wants to borrow: 1 for Stable, 2 for Variable -+ * @param interestRateMode 2 for Variable, 1 is deprecated on v3.2.0 - * @param referralCode The code used to register the integrator originating the operation, for potential rewards. - * 0 if the action is executed directly by the user, without any middle-man - * @param onBehalfOf The address of the user who will receive the debt. Should be the address of the borrower itself -@@ -1497,11 +1480,11 @@ interface IPool { - - /** - * @notice Repays a borrowed `amount` on a specific reserve, burning the equivalent debt tokens owned -- * - E.g. User repays 100 USDC, burning 100 variable/stable debt tokens of the `onBehalfOf` address -+ * - E.g. User repays 100 USDC, burning 100 variable debt tokens of the `onBehalfOf` address - * @param asset The address of the borrowed underlying asset previously borrowed - * @param amount The amount to repay - * - Send the value type(uint256).max in order to repay the whole debt for `asset` on the specific `debtMode` -- * @param interestRateMode The interest rate mode at of the debt the user wants to repay: 1 for Stable, 2 for Variable -+ * @param interestRateMode 2 for Variable, 1 is deprecated on v3.2.0 - * @param onBehalfOf The address of the user who will get his debt reduced/removed. Should be the address of the - * user calling the function if he wants to reduce/remove his own debt, or the address of any other - * other borrower whose debt should be removed -@@ -1520,7 +1503,7 @@ interface IPool { - * @param asset The address of the borrowed underlying asset previously borrowed - * @param amount The amount to repay - * - Send the value type(uint256).max in order to repay the whole debt for `asset` on the specific `debtMode` -- * @param interestRateMode The interest rate mode at of the debt the user wants to repay: 1 for Stable, 2 for Variable -+ * @param interestRateMode 2 for Variable, 1 is deprecated on v3.2.0 - * @param onBehalfOf Address of the user who will get his debt reduced/removed. Should be the address of the - * user calling the function if he wants to reduce/remove his own debt, or the address of any other - * other borrower whose debt should be removed -@@ -1544,13 +1527,13 @@ interface IPool { - /** - * @notice Repays a borrowed `amount` on a specific reserve using the reserve aTokens, burning the - * equivalent debt tokens -- * - E.g. User repays 100 USDC using 100 aUSDC, burning 100 variable/stable debt tokens -+ * - E.g. User repays 100 USDC using 100 aUSDC, burning 100 variable debt tokens - * @dev Passing uint256.max as amount will clean up any residual aToken dust balance, if the user aToken - * balance is not enough to cover the whole debt - * @param asset The address of the borrowed underlying asset previously borrowed - * @param amount The amount to repay - * - Send the value type(uint256).max in order to repay the whole debt for `asset` on the specific `debtMode` -- * @param interestRateMode The interest rate mode at of the debt the user wants to repay: 1 for Stable, 2 for Variable -+ * @param interestRateMode DEPRECATED in v3.2.0 - * @return The final amount repaid - */ - function repayWithATokens( -@@ -1559,32 +1542,6 @@ interface IPool { - uint256 interestRateMode - ) external returns (uint256); - -- /** -- * @notice Allows a borrower to swap his debt between stable and variable mode, or vice versa -- * @param asset The address of the underlying asset borrowed -- * @param interestRateMode The current interest rate mode of the position being swapped: 1 for Stable, 2 for Variable -- */ -- function swapBorrowRateMode(address asset, uint256 interestRateMode) external; -- -- /** -- * @notice Permissionless method which allows anyone to swap a users stable debt to variable debt -- * @dev Introduced in favor of stable rate deprecation -- * @param asset The address of the underlying asset borrowed -- * @param user The address of the user whose debt will be swapped from stable to variable -- */ -- function swapToVariable(address asset, address user) external; -- -- /** -- * @notice Rebalances the stable interest rate of a user to the current stable rate defined on the reserve. -- * - Users can be rebalanced if the following conditions are satisfied: -- * 1. Usage ratio is above 95% -- * 2. the current supply APY is below REBALANCE_UP_THRESHOLD * maxVariableBorrowRate, which means that too -- * much has been borrowed at a stable rate and suppliers are not earning enough -- * @param asset The address of the underlying asset borrowed -- * @param user The address of the user to be rebalanced -- */ -- function rebalanceStableBorrowRate(address asset, address user) external; -- - /** - * @notice Allows suppliers to enable/disable a specific supplied asset as collateral - * @param asset The address of the underlying asset supplied -@@ -1621,9 +1578,9 @@ interface IPool { - * @param amounts The amounts of the assets being flash-borrowed - * @param interestRateModes Types of the debt to open if the flash loan is not returned: - * 0 -> Don't open any debt, just revert if funds can't be transferred from the receiver -- * 1 -> Open debt at stable rate for the value of the amount flash-borrowed to the `onBehalfOf` address -+ * 1 -> Deprecated on v3.2.0 - * 2 -> Open debt at variable rate for the value of the amount flash-borrowed to the `onBehalfOf` address -- * @param onBehalfOf The address that will receive the debt in the case of using on `modes` 1 or 2 -+ * @param onBehalfOf The address that will receive the debt in the case of using 2 on `modes` - * @param params Variadic packed params to pass to the receiver as extra information - * @param referralCode The code used to register the integrator originating the operation, for potential rewards. - * 0 if the action is executed directly by the user, without any middle-man -@@ -1688,14 +1645,12 @@ interface IPool { - * @dev Only callable by the PoolConfigurator contract - * @param asset The address of the underlying asset of the reserve - * @param aTokenAddress The address of the aToken that will be assigned to the reserve -- * @param stableDebtAddress The address of the StableDebtToken that will be assigned to the reserve - * @param variableDebtAddress The address of the VariableDebtToken that will be assigned to the reserve - * @param interestRateStrategyAddress The address of the interest rate strategy contract - */ - function initReserve( - address asset, - address aTokenAddress, -- address stableDebtAddress, - address variableDebtAddress, - address interestRateStrategyAddress - ) external; -@@ -1703,6 +1658,7 @@ interface IPool { - /** - * @notice Drop a reserve - * @dev Only callable by the PoolConfigurator contract -+ * @dev Does not reset eMode flags, which must be considered when reusing the same reserve id for a different reserve. - * @param asset The address of the underlying asset of the reserve - */ - function dropReserve(address asset) external; -@@ -1793,6 +1749,7 @@ interface IPool { - - /** - * @notice Returns the state and configuration of the reserve, including extra data included with Aave v3.1 -+ * @dev DEPRECATED use independent getters instead (getReserveData, getLiquidationGracePeriod) - * @param asset The address of the underlying asset of the reserve - * @return The state and configuration data of the reserve with virtual accounting - */ -@@ -1875,20 +1832,70 @@ interface IPool { - ) external; - - /** -- * @notice Configures a new category for the eMode. -+ * @notice Configures a new or alters an existing collateral configuration of an eMode. - * @dev In eMode, the protocol allows very high borrowing power to borrow assets of the same category. - * The category 0 is reserved as it's the default for volatile assets - * @param id The id of the category - * @param config The configuration of the category - */ -- function configureEModeCategory(uint8 id, DataTypes.EModeCategory memory config) external; -+ function configureEModeCategory( -+ uint8 id, -+ DataTypes.EModeCategoryBaseConfiguration memory config -+ ) external; -+ -+ /** -+ * @notice Replaces the current eMode collateralBitmap. -+ * @param id The id of the category -+ * @param collateralBitmap The collateralBitmap of the category -+ */ -+ function configureEModeCategoryCollateralBitmap(uint8 id, uint128 collateralBitmap) external; -+ -+ /** -+ * @notice Replaces the current eMode borrowableBitmap. -+ * @param id The id of the category -+ * @param borrowableBitmap The borrowableBitmap of the category -+ */ -+ function configureEModeCategoryBorrowableBitmap(uint8 id, uint128 borrowableBitmap) external; - - /** - * @notice Returns the data of an eMode category -+ * @dev DEPRECATED use independent getters instead - * @param id The id of the category - * @return The configuration data of the category - */ -- function getEModeCategoryData(uint8 id) external view returns (DataTypes.EModeCategory memory); -+ function getEModeCategoryData( -+ uint8 id -+ ) external view returns (DataTypes.EModeCategoryLegacy memory); -+ -+ /** -+ * @notice Returns the label of an eMode category -+ * @param id The id of the category -+ * @return The label of the category -+ */ -+ function getEModeCategoryLabel(uint8 id) external view returns (string memory); -+ -+ /** -+ * @notice Returns the collateral config of an eMode category -+ * @param id The id of the category -+ * @return The ltv,lt,lb of the category -+ */ -+ function getEModeCategoryCollateralConfig( -+ uint8 id -+ ) external view returns (DataTypes.CollateralConfig memory); -+ -+ /** -+ * @notice Returns the collateralBitmap of an eMode category -+ * @param id The id of the category -+ * @return The collateralBitmap of the category -+ */ -+ function getEModeCategoryCollateralBitmap(uint8 id) external view returns (uint128); -+ -+ /** -+ * @notice Returns the borrowableBitmap of an eMode category -+ * @param id The id of the category -+ * @return The borrowableBitmap of the category -+ */ -+ function getEModeCategoryBorrowableBitmap(uint8 id) external view returns (uint128); - - /** - * @notice Allows a user to use the protocol in eMode -@@ -1926,12 +1933,6 @@ interface IPool { - **/ - function getLiquidationGracePeriod(address asset) external returns (uint40); - -- /** -- * @notice Returns the percentage of available liquidity that can be borrowed at once at stable rate -- * @return The percentage of available liquidity to borrow, expressed in bps -- */ -- function MAX_STABLE_RATE_BORROW_SIZE_PERCENT() external view returns (uint256); -- - /** - * @notice Returns the total fee on flash loans - * @return The total fee on flashloans -@@ -1987,40 +1988,40 @@ interface IPool { - /** - * @notice Gets the address of the external FlashLoanLogic - */ -- function getFlashLoanLogic() external returns (address); -+ function getFlashLoanLogic() external view returns (address); - - /** - * @notice Gets the address of the external BorrowLogic - */ -- function getBorrowLogic() external returns (address); -+ function getBorrowLogic() external view returns (address); - - /** - * @notice Gets the address of the external BridgeLogic - */ -- function getBridgeLogic() external returns (address); -+ function getBridgeLogic() external view returns (address); - - /** - * @notice Gets the address of the external EModeLogic - */ -- function getEModeLogic() external returns (address); -+ function getEModeLogic() external view returns (address); - - /** - * @notice Gets the address of the external LiquidationLogic - */ -- function getLiquidationLogic() external returns (address); -+ function getLiquidationLogic() external view returns (address); - - /** - * @notice Gets the address of the external PoolLogic - */ -- function getPoolLogic() external returns (address); -+ function getPoolLogic() external view returns (address); - - /** - * @notice Gets the address of the external SupplyLogic - */ -- function getSupplyLogic() external returns (address); -+ function getSupplyLogic() external view returns (address); - } - --// downloads/ARBITRUM/CONFIGURATOR_LOGIC/ConfiguratorLogic/src/core/contracts/protocol/libraries/configuration/ReserveConfiguration.sol -+// downloads/LINEA/CONFIGURATOR_LOGIC/ConfiguratorLogic/src/contracts/protocol/libraries/configuration/ReserveConfiguration.sol - - /** - * @title ReserveConfiguration library -@@ -2035,7 +2036,7 @@ library ReserveConfiguration { - uint256 internal constant ACTIVE_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFF; // prettier-ignore - uint256 internal constant FROZEN_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFDFFFFFFFFFFFFFF; // prettier-ignore - uint256 internal constant BORROWING_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFBFFFFFFFFFFFFFF; // prettier-ignore -- uint256 internal constant STABLE_BORROWING_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFFFFFFFFF; // prettier-ignore -+ // @notice there is an unoccupied hole of 1 bit at position 59 from pre 3.2 stableBorrowRateEnabled - uint256 internal constant PAUSED_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFF; // prettier-ignore - uint256 internal constant BORROWABLE_IN_ISOLATION_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFDFFFFFFFFFFFFFFF; // prettier-ignore - uint256 internal constant SILOED_BORROWING_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFBFFFFFFFFFFFFFFF; // prettier-ignore -@@ -2044,7 +2045,7 @@ library ReserveConfiguration { - uint256 internal constant BORROW_CAP_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000FFFFFFFFFFFFFFFFFFFF; // prettier-ignore - uint256 internal constant SUPPLY_CAP_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFF000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFF; // prettier-ignore - uint256 internal constant LIQUIDATION_PROTOCOL_FEE_MASK = 0xFFFFFFFFFFFFFFFFFFFFFF0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF; // prettier-ignore -- uint256 internal constant EMODE_CATEGORY_MASK = 0xFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF; // prettier-ignore -+ // @notice there is an unoccupied hole of 8 bits from 168 to 176 left from pre 3.2 eModeCategory - uint256 internal constant UNBACKED_MINT_CAP_MASK = 0xFFFFFFFFFFF000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF; // prettier-ignore - uint256 internal constant DEBT_CEILING_MASK = 0xF0000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF; // prettier-ignore - uint256 internal constant VIRTUAL_ACC_ACTIVE_MASK = 0xEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF; // prettier-ignore -@@ -2056,7 +2057,6 @@ library ReserveConfiguration { - uint256 internal constant IS_ACTIVE_START_BIT_POSITION = 56; - uint256 internal constant IS_FROZEN_START_BIT_POSITION = 57; - uint256 internal constant BORROWING_ENABLED_START_BIT_POSITION = 58; -- uint256 internal constant STABLE_BORROWING_ENABLED_START_BIT_POSITION = 59; - uint256 internal constant IS_PAUSED_START_BIT_POSITION = 60; - uint256 internal constant BORROWABLE_IN_ISOLATION_START_BIT_POSITION = 61; - uint256 internal constant SILOED_BORROWING_START_BIT_POSITION = 62; -@@ -2065,7 +2065,7 @@ library ReserveConfiguration { - uint256 internal constant BORROW_CAP_START_BIT_POSITION = 80; - uint256 internal constant SUPPLY_CAP_START_BIT_POSITION = 116; - uint256 internal constant LIQUIDATION_PROTOCOL_FEE_START_BIT_POSITION = 152; -- uint256 internal constant EMODE_CATEGORY_START_BIT_POSITION = 168; -+ //@notice there is an unoccupied hole of 8 bits from 168 to 176 left from pre 3.2 eModeCategory - uint256 internal constant UNBACKED_MINT_CAP_START_BIT_POSITION = 176; - uint256 internal constant DEBT_CEILING_START_BIT_POSITION = 212; - uint256 internal constant VIRTUAL_ACC_START_BIT_POSITION = 252; -@@ -2078,7 +2078,6 @@ library ReserveConfiguration { - uint256 internal constant MAX_VALID_BORROW_CAP = 68719476735; - uint256 internal constant MAX_VALID_SUPPLY_CAP = 68719476735; - uint256 internal constant MAX_VALID_LIQUIDATION_PROTOCOL_FEE = 65535; -- uint256 internal constant MAX_VALID_EMODE_CATEGORY = 255; - uint256 internal constant MAX_VALID_UNBACKED_MINT_CAP = 68719476735; - uint256 internal constant MAX_VALID_DEBT_CEILING = 1099511627775; - -@@ -2329,31 +2328,6 @@ library ReserveConfiguration { - return (self.data & ~BORROWING_MASK) != 0; - } - -- /** -- * @notice Enables or disables stable rate borrowing on the reserve -- * @param self The reserve configuration -- * @param enabled True if the stable rate borrowing needs to be enabled, false otherwise -- */ -- function setStableRateBorrowingEnabled( -- DataTypes.ReserveConfigurationMap memory self, -- bool enabled -- ) internal pure { -- self.data = -- (self.data & STABLE_BORROWING_MASK) | -- (uint256(enabled ? 1 : 0) << STABLE_BORROWING_ENABLED_START_BIT_POSITION); -- } -- -- /** -- * @notice Gets the stable rate borrowing state of the reserve -- * @param self The reserve configuration -- * @return The stable rate borrowing state -- */ -- function getStableRateBorrowingEnabled( -- DataTypes.ReserveConfigurationMap memory self -- ) internal pure returns (bool) { -- return (self.data & ~STABLE_BORROWING_MASK) != 0; -- } -- - /** - * @notice Sets the reserve factor of the reserve - * @param self The reserve configuration -@@ -2514,31 +2488,6 @@ library ReserveConfiguration { - return (self.data & ~UNBACKED_MINT_CAP_MASK) >> UNBACKED_MINT_CAP_START_BIT_POSITION; - } - -- /** -- * @notice Sets the eMode asset category -- * @param self The reserve configuration -- * @param category The asset category when the user selects the eMode -- */ -- function setEModeCategory( -- DataTypes.ReserveConfigurationMap memory self, -- uint256 category -- ) internal pure { -- require(category <= MAX_VALID_EMODE_CATEGORY, Errors.INVALID_EMODE_CATEGORY); -- -- self.data = (self.data & EMODE_CATEGORY_MASK) | (category << EMODE_CATEGORY_START_BIT_POSITION); -- } -- -- /** -- * @dev Gets the eMode asset category -- * @param self The reserve configuration -- * @return The eMode category for the asset -- */ -- function getEModeCategory( -- DataTypes.ReserveConfigurationMap memory self -- ) internal pure returns (uint256) { -- return (self.data & ~EMODE_CATEGORY_MASK) >> EMODE_CATEGORY_START_BIT_POSITION; -- } -- - /** - * @notice Sets the flashloanable flag for the reserve - * @param self The reserve configuration -@@ -2597,19 +2546,17 @@ library ReserveConfiguration { - * @return The state flag representing active - * @return The state flag representing frozen - * @return The state flag representing borrowing enabled -- * @return The state flag representing stableRateBorrowing enabled - * @return The state flag representing paused - */ - function getFlags( - DataTypes.ReserveConfigurationMap memory self -- ) internal pure returns (bool, bool, bool, bool, bool) { -+ ) internal pure returns (bool, bool, bool, bool) { - uint256 dataLocal = self.data; - - return ( - (dataLocal & ~ACTIVE_MASK) != 0, - (dataLocal & ~FROZEN_MASK) != 0, - (dataLocal & ~BORROWING_MASK) != 0, -- (dataLocal & ~STABLE_BORROWING_MASK) != 0, - (dataLocal & ~PAUSED_MASK) != 0 - ); - } -@@ -2622,11 +2569,10 @@ library ReserveConfiguration { - * @return The state param representing liquidation bonus - * @return The state param representing reserve decimals - * @return The state param representing reserve factor -- * @return The state param representing eMode category - */ - function getParams( - DataTypes.ReserveConfigurationMap memory self -- ) internal pure returns (uint256, uint256, uint256, uint256, uint256, uint256) { -+ ) internal pure returns (uint256, uint256, uint256, uint256, uint256) { - uint256 dataLocal = self.data; - - return ( -@@ -2634,8 +2580,7 @@ library ReserveConfiguration { - (dataLocal & ~LIQUIDATION_THRESHOLD_MASK) >> LIQUIDATION_THRESHOLD_START_BIT_POSITION, - (dataLocal & ~LIQUIDATION_BONUS_MASK) >> LIQUIDATION_BONUS_START_BIT_POSITION, - (dataLocal & ~DECIMALS_MASK) >> RESERVE_DECIMALS_START_BIT_POSITION, -- (dataLocal & ~RESERVE_FACTOR_MASK) >> RESERVE_FACTOR_START_BIT_POSITION, -- (dataLocal & ~EMODE_CATEGORY_MASK) >> EMODE_CATEGORY_START_BIT_POSITION -+ (dataLocal & ~RESERVE_FACTOR_MASK) >> RESERVE_FACTOR_START_BIT_POSITION - ); - } - -@@ -2657,7 +2602,7 @@ library ReserveConfiguration { - } - } - --// downloads/ARBITRUM/CONFIGURATOR_LOGIC/ConfiguratorLogic/src/core/contracts/dependencies/openzeppelin/upgradeability/InitializableUpgradeabilityProxy.sol -+// downloads/LINEA/CONFIGURATOR_LOGIC/ConfiguratorLogic/src/contracts/dependencies/openzeppelin/upgradeability/InitializableUpgradeabilityProxy.sol - - /** - * @title InitializableUpgradeabilityProxy -@@ -2684,7 +2629,7 @@ contract InitializableUpgradeabilityProxy is BaseUpgradeabilityProxy { - } - } - --// downloads/ARBITRUM/CONFIGURATOR_LOGIC/ConfiguratorLogic/src/core/contracts/protocol/libraries/aave-upgradeability/BaseImmutableAdminUpgradeabilityProxy.sol -+// downloads/LINEA/CONFIGURATOR_LOGIC/ConfiguratorLogic/src/contracts/misc/aave-upgradeability/BaseImmutableAdminUpgradeabilityProxy.sol - - /** - * @title BaseImmutableAdminUpgradeabilityProxy -@@ -2767,7 +2712,7 @@ contract BaseImmutableAdminUpgradeabilityProxy is BaseUpgradeabilityProxy { - } - } - --// downloads/ARBITRUM/CONFIGURATOR_LOGIC/ConfiguratorLogic/src/core/contracts/interfaces/IInitializableAToken.sol -+// downloads/LINEA/CONFIGURATOR_LOGIC/ConfiguratorLogic/src/contracts/interfaces/IInitializableAToken.sol - - /** - * @title IInitializableAToken -@@ -2820,7 +2765,7 @@ interface IInitializableAToken { - ) external; - } - --// downloads/ARBITRUM/CONFIGURATOR_LOGIC/ConfiguratorLogic/src/core/contracts/interfaces/IInitializableDebtToken.sol -+// downloads/LINEA/CONFIGURATOR_LOGIC/ConfiguratorLogic/src/contracts/interfaces/IInitializableDebtToken.sol - - /** - * @title IInitializableDebtToken -@@ -2869,7 +2814,7 @@ interface IInitializableDebtToken { - ) external; - } - --// downloads/ARBITRUM/CONFIGURATOR_LOGIC/ConfiguratorLogic/src/core/contracts/protocol/libraries/aave-upgradeability/InitializableImmutableAdminUpgradeabilityProxy.sol -+// downloads/LINEA/CONFIGURATOR_LOGIC/ConfiguratorLogic/src/contracts/misc/aave-upgradeability/InitializableImmutableAdminUpgradeabilityProxy.sol - - /** - * @title InitializableAdminUpgradeabilityProxy -@@ -2894,7 +2839,7 @@ contract InitializableImmutableAdminUpgradeabilityProxy is - } - } - + -// downloads/ARBITRUM/CONFIGURATOR_LOGIC/ConfiguratorLogic/src/core/contracts/protocol/libraries/logic/ConfiguratorLogic.sol +// downloads/LINEA/CONFIGURATOR_LOGIC/ConfiguratorLogic/src/contracts/protocol/libraries/logic/ConfiguratorLogic.sol - + /** * @title ConfiguratorLogic library @@ -2917,11 +2862,6 @@ library ConfiguratorLogic { @@ -892,7 +23,7 @@ index b92a1a1..22e067d 100644 address indexed proxy, @@ -2929,7 +2869,7 @@ library ConfiguratorLogic { ); - + /** - * @notice Initialize a reserve by creating and initializing aToken, stable debt token and variable debt token + * @notice Initialize a reserve by creating and initializing aToken and variable debt token @@ -902,7 +33,7 @@ index b92a1a1..22e067d 100644 @@ -2957,20 +2897,6 @@ library ConfiguratorLogic { ) ); - + - address stableDebtTokenProxyAddress = _initTokenWithProxy( - input.stableDebtTokenImpl, - abi.encodeWithSelector( @@ -940,16 +71,16 @@ index b92a1a1..22e067d 100644 @@ -3030,7 +2955,7 @@ library ConfiguratorLogic { ) external { DataTypes.ReserveDataLegacy memory reserveData = cachedPool.getReserveData(input.asset); - + - (, , , uint256 decimals, , ) = cachedPool.getConfiguration(input.asset).getParams(); + (, , , uint256 decimals, ) = cachedPool.getConfiguration(input.asset).getParams(); - + bytes memory encodedCall = abi.encodeWithSelector( IInitializableAToken.initialize.selector, @@ -3049,44 +2974,6 @@ library ConfiguratorLogic { emit ATokenUpgraded(input.asset, reserveData.aTokenAddress, input.implementation); } - + - /** - * @notice Updates the stable debt token implementation and initializes it - * @dev Emits the `StableDebtTokenUpgraded` event @@ -994,10 +125,10 @@ index b92a1a1..22e067d 100644 @@ -3099,7 +2986,7 @@ library ConfiguratorLogic { ) external { DataTypes.ReserveDataLegacy memory reserveData = cachedPool.getReserveData(input.asset); - + - (, , , uint256 decimals, , ) = cachedPool.getConfiguration(input.asset).getParams(); + (, , , uint256 decimals, ) = cachedPool.getConfiguration(input.asset).getParams(); - + bytes memory encodedCall = abi.encodeWithSelector( IInitializableDebtToken.initialize.selector, ``` diff --git a/diffs/ARBITRUM_LINEA/DEFAULT_A_TOKEN_IMPL_DIFF.md b/diffs/ARBITRUM_LINEA/DEFAULT_A_TOKEN_IMPL_DIFF.md index 8e5b155c..93c64bc9 100644 --- a/diffs/ARBITRUM_LINEA/DEFAULT_A_TOKEN_IMPL_DIFF.md +++ b/diffs/ARBITRUM_LINEA/DEFAULT_A_TOKEN_IMPL_DIFF.md @@ -3,805 +3,10 @@ diff --git a/./downloads/ARBITRUM/DEFAULT_A_TOKEN_IMPL.sol b/./downloads/LINEA/D index efb0fd4..fd9dc66 100644 --- a/./downloads/ARBITRUM/DEFAULT_A_TOKEN_IMPL.sol +++ b/./downloads/LINEA/DEFAULT_A_TOKEN_IMPL.sol -@@ -1,7 +1,7 @@ - // SPDX-License-Identifier: BUSL-1.1 --pragma solidity =0.8.10 ^0.8.0; -+pragma solidity ^0.8.0 ^0.8.10; - --// downloads/ARBITRUM/DEFAULT_A_TOKEN_IMPL/AToken/lib/aave-v3-core/contracts/dependencies/openzeppelin/contracts/Context.sol -+// downloads/LINEA/DEFAULT_A_TOKEN_IMPL/ATokenInstance/src/contracts/dependencies/openzeppelin/contracts/Context.sol - - /* - * @dev Provides information about the current execution context, including the -@@ -24,7 +24,7 @@ abstract contract Context { - } - } - --// downloads/ARBITRUM/DEFAULT_A_TOKEN_IMPL/AToken/lib/aave-v3-core/contracts/dependencies/openzeppelin/contracts/IERC20.sol -+// downloads/LINEA/DEFAULT_A_TOKEN_IMPL/ATokenInstance/src/contracts/dependencies/openzeppelin/contracts/IERC20.sol - - /** - * @dev Interface of the ERC20 standard as defined in the EIP. -@@ -100,7 +100,7 @@ interface IERC20 { - event Approval(address indexed owner, address indexed spender, uint256 value); - } - --// downloads/ARBITRUM/DEFAULT_A_TOKEN_IMPL/AToken/lib/aave-v3-core/contracts/dependencies/openzeppelin/contracts/SafeCast.sol -+// downloads/LINEA/DEFAULT_A_TOKEN_IMPL/ATokenInstance/src/contracts/dependencies/openzeppelin/contracts/SafeCast.sol - - // OpenZeppelin Contracts v4.4.1 (utils/math/SafeCast.sol) - -@@ -356,7 +356,7 @@ library SafeCast { - } - } - --// downloads/ARBITRUM/DEFAULT_A_TOKEN_IMPL/AToken/lib/aave-v3-core/contracts/interfaces/IAaveIncentivesController.sol -+// downloads/LINEA/DEFAULT_A_TOKEN_IMPL/ATokenInstance/src/contracts/interfaces/IAaveIncentivesController.sol - - /** - * @title IAaveIncentivesController -@@ -375,7 +375,7 @@ interface IAaveIncentivesController { - function handleAction(address user, uint256 totalSupply, uint256 userBalance) external; - } - --// downloads/ARBITRUM/DEFAULT_A_TOKEN_IMPL/AToken/lib/aave-v3-core/contracts/interfaces/IPoolAddressesProvider.sol -+// downloads/LINEA/DEFAULT_A_TOKEN_IMPL/ATokenInstance/src/contracts/interfaces/IPoolAddressesProvider.sol - - /** - * @title IPoolAddressesProvider -@@ -602,7 +602,7 @@ interface IPoolAddressesProvider { - function setPoolDataProvider(address newDataProvider) external; - } - --// downloads/ARBITRUM/DEFAULT_A_TOKEN_IMPL/AToken/lib/aave-v3-core/contracts/interfaces/IScaledBalanceToken.sol -+// downloads/LINEA/DEFAULT_A_TOKEN_IMPL/ATokenInstance/src/contracts/interfaces/IScaledBalanceToken.sol - - /** - * @title IScaledBalanceToken -@@ -674,7 +674,7 @@ interface IScaledBalanceToken { - function getPreviousIndex(address user) external view returns (uint256); - } - --// downloads/ARBITRUM/DEFAULT_A_TOKEN_IMPL/AToken/lib/aave-v3-core/contracts/protocol/libraries/aave-upgradeability/VersionedInitializable.sol -+// downloads/LINEA/DEFAULT_A_TOKEN_IMPL/ATokenInstance/src/contracts/misc/aave-upgradeability/VersionedInitializable.sol - - /** - * @title VersionedInitializable -@@ -751,7 +751,7 @@ abstract contract VersionedInitializable { - uint256[50] private ______gap; - } - --// downloads/ARBITRUM/DEFAULT_A_TOKEN_IMPL/AToken/lib/aave-v3-core/contracts/protocol/libraries/helpers/Errors.sol -+// downloads/LINEA/DEFAULT_A_TOKEN_IMPL/ATokenInstance/src/contracts/protocol/libraries/helpers/Errors.sol - - /** - * @title Errors library -@@ -789,17 +789,14 @@ library Errors { - string public constant RESERVE_FROZEN = '28'; // 'Action cannot be performed because the reserve is frozen' - string public constant RESERVE_PAUSED = '29'; // 'Action cannot be performed because the reserve is paused' - string public constant BORROWING_NOT_ENABLED = '30'; // 'Borrowing is not enabled' -- string public constant STABLE_BORROWING_NOT_ENABLED = '31'; // 'Stable borrowing is not enabled' - string public constant NOT_ENOUGH_AVAILABLE_USER_BALANCE = '32'; // 'User cannot withdraw more than the available balance' - string public constant INVALID_INTEREST_RATE_MODE_SELECTED = '33'; // 'Invalid interest rate mode selected' - string public constant COLLATERAL_BALANCE_IS_ZERO = '34'; // 'The collateral balance is 0' - string public constant HEALTH_FACTOR_LOWER_THAN_LIQUIDATION_THRESHOLD = '35'; // 'Health factor is lesser than the liquidation threshold' - string public constant COLLATERAL_CANNOT_COVER_NEW_BORROW = '36'; // 'There is not enough collateral to cover a new borrow' - string public constant COLLATERAL_SAME_AS_BORROWING_CURRENCY = '37'; // 'Collateral is (mostly) the same currency that is being borrowed' -- string public constant AMOUNT_BIGGER_THAN_MAX_LOAN_SIZE_STABLE = '38'; // 'The requested amount is greater than the max loan size in stable rate mode' - string public constant NO_DEBT_OF_SELECTED_TYPE = '39'; // 'For repayment of a specific type of debt, the user needs to have debt that type' - string public constant NO_EXPLICIT_AMOUNT_TO_REPAY_ON_BEHALF = '40'; // 'To repay on behalf of a user an explicit amount to repay is needed' -- string public constant NO_OUTSTANDING_STABLE_DEBT = '41'; // 'User does not have outstanding stable rate debt on this reserve' - string public constant NO_OUTSTANDING_VARIABLE_DEBT = '42'; // 'User does not have outstanding variable rate debt on this reserve' - string public constant UNDERLYING_BALANCE_ZERO = '43'; // 'The underlying balance needs to be greater than 0' - string public constant INTEREST_RATE_REBALANCE_CONDITIONS_NOT_MET = '44'; // 'Interest rate rebalance conditions were not met' -@@ -812,7 +809,6 @@ library Errors { - string public constant UNBACKED_MINT_CAP_EXCEEDED = '52'; // 'Unbacked mint cap is exceeded' - string public constant DEBT_CEILING_EXCEEDED = '53'; // 'Debt ceiling is exceeded' - string public constant UNDERLYING_CLAIMABLE_RIGHTS_NOT_ZERO = '54'; // 'Claimable rights over underlying not zero (aToken supply or accruedToTreasury)' -- string public constant STABLE_DEBT_NOT_ZERO = '55'; // 'Stable debt supply is not zero' - string public constant VARIABLE_DEBT_SUPPLY_NOT_ZERO = '56'; // 'Variable debt supply is not zero' - string public constant LTV_VALIDATION_FAILED = '57'; // 'Ltv validation failed' - string public constant INCONSISTENT_EMODE_CATEGORY = '58'; // 'Inconsistent eMode category' -@@ -841,17 +837,24 @@ library Errors { - string public constant DEBT_CEILING_NOT_ZERO = '81'; // 'Debt ceiling is not zero' - string public constant ASSET_NOT_LISTED = '82'; // 'Asset is not listed' - string public constant INVALID_OPTIMAL_USAGE_RATIO = '83'; // 'Invalid optimal usage ratio' -- string public constant INVALID_OPTIMAL_STABLE_TO_TOTAL_DEBT_RATIO = '84'; // 'Invalid optimal stable to total debt ratio' - string public constant UNDERLYING_CANNOT_BE_RESCUED = '85'; // 'The underlying asset cannot be rescued' - string public constant ADDRESSES_PROVIDER_ALREADY_ADDED = '86'; // 'Reserve has already been added to reserve list' - string public constant POOL_ADDRESSES_DO_NOT_MATCH = '87'; // 'The token implementation pool address and the pool address provided by the initializing pool do not match' -- string public constant STABLE_BORROWING_ENABLED = '88'; // 'Stable borrowing is enabled' - string public constant SILOED_BORROWING_VIOLATION = '89'; // 'User is trying to borrow multiple assets including a siloed one' - string public constant RESERVE_DEBT_NOT_ZERO = '90'; // the total debt of the reserve needs to be 0 - string public constant FLASHLOAN_DISABLED = '91'; // FlashLoaning for this asset is disabled -+ string public constant INVALID_MAX_RATE = '92'; // The expect maximum borrow rate is invalid -+ string public constant WITHDRAW_TO_ATOKEN = '93'; // Withdrawing to the aToken is not allowed -+ string public constant SUPPLY_TO_ATOKEN = '94'; // Supplying to the aToken is not allowed -+ string public constant SLOPE_2_MUST_BE_GTE_SLOPE_1 = '95'; // Variable interest rate slope 2 can not be lower than slope 1 -+ string public constant CALLER_NOT_RISK_OR_POOL_OR_EMERGENCY_ADMIN = '96'; // 'The caller of the function is not a risk, pool or emergency admin' -+ string public constant LIQUIDATION_GRACE_SENTINEL_CHECK_FAILED = '97'; // 'Liquidation grace sentinel validation failed' -+ string public constant INVALID_GRACE_PERIOD = '98'; // Grace period above a valid range -+ string public constant INVALID_FREEZE_STATE = '99'; // Reserve is already in the passed freeze state -+ string public constant NOT_BORROWABLE_IN_EMODE = '100'; // Asset not borrowable in eMode - } - --// downloads/ARBITRUM/DEFAULT_A_TOKEN_IMPL/AToken/lib/aave-v3-core/contracts/protocol/libraries/math/WadRayMath.sol -+// downloads/LINEA/DEFAULT_A_TOKEN_IMPL/ATokenInstance/src/contracts/protocol/libraries/math/WadRayMath.sol - - /** - * @title WadRayMath library -@@ -977,10 +980,14 @@ library WadRayMath { - } - } - --// downloads/ARBITRUM/DEFAULT_A_TOKEN_IMPL/AToken/lib/aave-v3-core/contracts/protocol/libraries/types/DataTypes.sol -+// downloads/LINEA/DEFAULT_A_TOKEN_IMPL/ATokenInstance/src/contracts/protocol/libraries/types/DataTypes.sol - - library DataTypes { -- struct ReserveData { -+ /** -+ * This exists specifically to maintain the `getReserveData()` interface, since the new, internal -+ * `ReserveData` struct includes the reserve's `virtualUnderlyingBalance`. -+ */ -+ struct ReserveDataLegacy { - //stores the reserve configuration - ReserveConfigurationMap configuration; - //the liquidity index. Expressed in ray -@@ -991,7 +998,7 @@ library DataTypes { - uint128 variableBorrowIndex; - //the current variable borrow rate. Expressed in ray - uint128 currentVariableBorrowRate; -- //the current stable borrow rate. Expressed in ray -+ // DEPRECATED on v3.2.0 - uint128 currentStableBorrowRate; - //timestamp of last update - uint40 lastUpdateTimestamp; -@@ -999,7 +1006,7 @@ library DataTypes { - uint16 id; - //aToken address - address aTokenAddress; -- //stableDebtToken address -+ // DEPRECATED on v3.2.0 - address stableDebtTokenAddress; - //variableDebtToken address - address variableDebtTokenAddress; -@@ -1013,6 +1020,43 @@ library DataTypes { - uint128 isolationModeTotalDebt; - } - -+ struct ReserveData { -+ //stores the reserve configuration -+ ReserveConfigurationMap configuration; -+ //the liquidity index. Expressed in ray -+ uint128 liquidityIndex; -+ //the current supply rate. Expressed in ray -+ uint128 currentLiquidityRate; -+ //variable borrow index. Expressed in ray -+ uint128 variableBorrowIndex; -+ //the current variable borrow rate. Expressed in ray -+ uint128 currentVariableBorrowRate; -+ // DEPRECATED on v3.2.0 -+ uint128 __deprecatedStableBorrowRate; -+ //timestamp of last update -+ uint40 lastUpdateTimestamp; -+ //the id of the reserve. Represents the position in the list of the active reserves -+ uint16 id; -+ //timestamp until when liquidations are not allowed on the reserve, if set to past liquidations will be allowed -+ uint40 liquidationGracePeriodUntil; -+ //aToken address -+ address aTokenAddress; -+ // DEPRECATED on v3.2.0 -+ address __deprecatedStableDebtTokenAddress; -+ //variableDebtToken address -+ address variableDebtTokenAddress; -+ //address of the interest rate strategy -+ address interestRateStrategyAddress; -+ //the current treasury balance, scaled -+ uint128 accruedToTreasury; -+ //the outstanding unbacked aTokens minted through the bridging feature -+ uint128 unbacked; -+ //the outstanding debt borrowed against this asset in isolation mode -+ uint128 isolationModeTotalDebt; -+ //the amount of underlying accounted for by the protocol -+ uint128 virtualUnderlyingBalance; -+ } -+ - struct ReserveConfigurationMap { - //bit 0-15: LTV - //bit 16-31: Liq. threshold -@@ -1021,18 +1065,20 @@ library DataTypes { - //bit 56: reserve is active - //bit 57: reserve is frozen - //bit 58: borrowing is enabled -- //bit 59: stable rate borrowing enabled -+ //bit 59: DEPRECATED: stable rate borrowing enabled - //bit 60: asset is paused - //bit 61: borrowing in isolation mode is enabled -- //bit 62-63: reserved -+ //bit 62: siloed borrowing enabled -+ //bit 63: flashloaning enabled - //bit 64-79: reserve factor -- //bit 80-115 borrow cap in whole tokens, borrowCap == 0 => no cap -- //bit 116-151 supply cap in whole tokens, supplyCap == 0 => no cap -- //bit 152-167 liquidation protocol fee -- //bit 168-175 eMode category -- //bit 176-211 unbacked mint cap in whole tokens, unbackedMintCap == 0 => minting disabled -- //bit 212-251 debt ceiling for isolation mode with (ReserveConfiguration::DEBT_CEILING_DECIMALS) decimals -- //bit 252-255 unused -+ //bit 80-115: borrow cap in whole tokens, borrowCap == 0 => no cap -+ //bit 116-151: supply cap in whole tokens, supplyCap == 0 => no cap -+ //bit 152-167: liquidation protocol fee -+ //bit 168-175: DEPRECATED: eMode category -+ //bit 176-211: unbacked mint cap in whole tokens, unbackedMintCap == 0 => minting disabled -+ //bit 212-251: debt ceiling for isolation mode with (ReserveConfiguration::DEBT_CEILING_DECIMALS) decimals -+ //bit 252: virtual accounting is enabled for the reserve -+ //bit 253-255 unused - - uint256 data; - } -@@ -1046,30 +1092,49 @@ library DataTypes { - uint256 data; - } - -- struct EModeCategory { -+ // DEPRECATED: kept for backwards compatibility, might be removed in a future version -+ struct EModeCategoryLegacy { - // each eMode category has a custom ltv and liquidation threshold - uint16 ltv; - uint16 liquidationThreshold; - uint16 liquidationBonus; -- // each eMode category may or may not have a custom oracle to override the individual assets price oracles -+ // DEPRECATED - address priceSource; - string label; - } - -+ struct CollateralConfig { -+ uint16 ltv; -+ uint16 liquidationThreshold; -+ uint16 liquidationBonus; -+ } -+ -+ struct EModeCategoryBaseConfiguration { -+ uint16 ltv; -+ uint16 liquidationThreshold; -+ uint16 liquidationBonus; -+ string label; -+ } -+ -+ struct EModeCategory { -+ // each eMode category has a custom ltv and liquidation threshold -+ uint16 ltv; -+ uint16 liquidationThreshold; -+ uint16 liquidationBonus; -+ uint128 collateralBitmap; -+ string label; -+ uint128 borrowableBitmap; -+ } -+ - enum InterestRateMode { - NONE, -- STABLE, -+ __DEPRECATED, - VARIABLE - } - - struct ReserveCache { - uint256 currScaledVariableDebt; - uint256 nextScaledVariableDebt; -- uint256 currPrincipalStableDebt; -- uint256 currAvgStableBorrowRate; -- uint256 currTotalStableDebt; -- uint256 nextAvgStableBorrowRate; -- uint256 nextTotalStableDebt; - uint256 currLiquidityIndex; - uint256 nextLiquidityIndex; - uint256 currVariableBorrowIndex; -@@ -1079,10 +1144,8 @@ library DataTypes { - uint256 reserveFactor; - ReserveConfigurationMap reserveConfiguration; - address aTokenAddress; -- address stableDebtTokenAddress; - address variableDebtTokenAddress; - uint40 reserveLastUpdateTimestamp; -- uint40 stableDebtLastUpdateTimestamp; - } - - struct ExecuteLiquidationCallParams { -@@ -1112,7 +1175,6 @@ library DataTypes { - InterestRateMode interestRateMode; - uint16 referralCode; - bool releaseUnderlying; -- uint256 maxStableRateBorrowSizePercent; - uint256 reservesCount; - address oracle; - uint8 userEModeCategory; -@@ -1164,9 +1226,9 @@ library DataTypes { - uint16 referralCode; - uint256 flashLoanPremiumToProtocol; - uint256 flashLoanPremiumTotal; -- uint256 maxStableRateBorrowSizePercent; - uint256 reservesCount; - address addressesProvider; -+ address pool; - uint8 userEModeCategory; - bool isAuthorizedFlashBorrower; - } -@@ -1205,7 +1267,6 @@ library DataTypes { - address userAddress; - uint256 amount; - InterestRateMode interestRateMode; -- uint256 maxStableLoanPercent; - uint256 reservesCount; - address oracle; - uint8 userEModeCategory; -@@ -1226,18 +1287,16 @@ library DataTypes { - uint256 unbacked; - uint256 liquidityAdded; - uint256 liquidityTaken; -- uint256 totalStableDebt; -- uint256 totalVariableDebt; -- uint256 averageStableBorrowRate; -+ uint256 totalDebt; - uint256 reserveFactor; - address reserve; -- address aToken; -+ bool usingVirtualBalance; -+ uint256 virtualUnderlyingBalance; - } - - struct InitReserveParams { - address asset; - address aTokenAddress; -- address stableDebtAddress; - address variableDebtAddress; - address interestRateStrategyAddress; - uint16 reservesCount; -@@ -1245,7 +1304,7 @@ library DataTypes { - } - } - --// downloads/ARBITRUM/DEFAULT_A_TOKEN_IMPL/AToken/lib/aave-v3-core/contracts/protocol/tokenization/base/EIP712Base.sol -+// downloads/LINEA/DEFAULT_A_TOKEN_IMPL/ATokenInstance/src/contracts/protocol/tokenization/base/EIP712Base.sol - - /** - * @title EIP712Base -@@ -1315,7 +1374,7 @@ abstract contract EIP712Base { - function _EIP712BaseId() internal view virtual returns (string memory); - } - --// downloads/ARBITRUM/DEFAULT_A_TOKEN_IMPL/AToken/lib/aave-v3-core/contracts/dependencies/gnosis/contracts/GPv2SafeERC20.sol -+// downloads/LINEA/DEFAULT_A_TOKEN_IMPL/ATokenInstance/src/contracts/dependencies/gnosis/contracts/GPv2SafeERC20.sol - - /// @title Gnosis Protocol v2 Safe ERC20 Transfer Library - /// @author Gnosis Developers -@@ -1428,7 +1487,7 @@ library GPv2SafeERC20 { - } - } - --// downloads/ARBITRUM/DEFAULT_A_TOKEN_IMPL/AToken/lib/aave-v3-core/contracts/dependencies/openzeppelin/contracts/IERC20Detailed.sol -+// downloads/LINEA/DEFAULT_A_TOKEN_IMPL/ATokenInstance/src/contracts/dependencies/openzeppelin/contracts/IERC20Detailed.sol - - interface IERC20Detailed is IERC20 { - function name() external view returns (string memory); -@@ -1438,7 +1497,7 @@ interface IERC20Detailed is IERC20 { - function decimals() external view returns (uint8); - } - --// downloads/ARBITRUM/DEFAULT_A_TOKEN_IMPL/AToken/lib/aave-v3-core/contracts/interfaces/IACLManager.sol -+// downloads/LINEA/DEFAULT_A_TOKEN_IMPL/ATokenInstance/src/contracts/interfaces/IACLManager.sol - - /** - * @title IACLManager -@@ -1611,7 +1670,7 @@ interface IACLManager { - function isAssetListingAdmin(address admin) external view returns (bool); - } - --// downloads/ARBITRUM/DEFAULT_A_TOKEN_IMPL/AToken/lib/aave-v3-core/contracts/interfaces/IPool.sol -+// downloads/LINEA/DEFAULT_A_TOKEN_IMPL/ATokenInstance/src/contracts/interfaces/IPool.sol - - /** - * @title IPool -@@ -1676,7 +1735,7 @@ interface IPool { - * initiator of the transaction on flashLoan() - * @param onBehalfOf The address that will be getting the debt - * @param amount The amount borrowed out -- * @param interestRateMode The rate mode: 1 for Stable, 2 for Variable -+ * @param interestRateMode The rate mode: 2 for Variable, 1 is deprecated (changed on v3.2.0) - * @param borrowRate The numeric rate at which the user has borrowed, expressed in ray - * @param referralCode The referral code used - */ -@@ -1706,18 +1765,6 @@ interface IPool { - bool useATokens - ); - -- /** -- * @dev Emitted on swapBorrowRateMode() -- * @param reserve The address of the underlying asset of the reserve -- * @param user The address of the user swapping his rate mode -- * @param interestRateMode The current interest rate mode of the position being swapped: 1 for Stable, 2 for Variable -- */ -- event SwapBorrowRateMode( -- address indexed reserve, -- address indexed user, -- DataTypes.InterestRateMode interestRateMode -- ); -- - /** - * @dev Emitted on borrow(), repay() and liquidationCall() when using isolated assets - * @param asset The address of the underlying asset of the reserve -@@ -1746,20 +1793,14 @@ interface IPool { - */ - event ReserveUsedAsCollateralDisabled(address indexed reserve, address indexed user); - -- /** -- * @dev Emitted on rebalanceStableBorrowRate() -- * @param reserve The address of the underlying asset of the reserve -- * @param user The address of the user for which the rebalance has been executed -- */ -- event RebalanceStableBorrowRate(address indexed reserve, address indexed user); -- - /** - * @dev Emitted on flashLoan() - * @param target The address of the flash loan receiver contract - * @param initiator The address initiating the flash loan - * @param asset The address of the asset being flash borrowed - * @param amount The amount flash borrowed -- * @param interestRateMode The flashloan mode: 0 for regular flashloan, 1 for Stable debt, 2 for Variable debt -+ * @param interestRateMode The flashloan mode: 0 for regular flashloan, -+ * 1 for Stable (Deprecated on v3.2.0), 2 for Variable - * @param premium The fee flash borrowed - * @param referralCode The referral code used - */ -@@ -1798,7 +1839,7 @@ interface IPool { - * @dev Emitted when the state of a reserve is updated. - * @param reserve The address of the underlying asset of the reserve - * @param liquidityRate The next liquidity rate -- * @param stableBorrowRate The next stable borrow rate -+ * @param stableBorrowRate The next stable borrow rate @note deprecated on v3.2.0 - * @param variableBorrowRate The next variable borrow rate - * @param liquidityIndex The next liquidity index - * @param variableBorrowIndex The next variable borrow index -@@ -1897,13 +1938,12 @@ interface IPool { - - /** - * @notice Allows users to borrow a specific `amount` of the reserve underlying asset, provided that the borrower -- * already supplied enough collateral, or he was given enough allowance by a credit delegator on the -- * corresponding debt token (StableDebtToken or VariableDebtToken) -+ * already supplied enough collateral, or he was given enough allowance by a credit delegator on the VariableDebtToken - * - E.g. User borrows 100 USDC passing as `onBehalfOf` his own address, receiving the 100 USDC in his wallet -- * and 100 stable/variable debt tokens, depending on the `interestRateMode` -+ * and 100 variable debt tokens - * @param asset The address of the underlying asset to borrow - * @param amount The amount to be borrowed -- * @param interestRateMode The interest rate mode at which the user wants to borrow: 1 for Stable, 2 for Variable -+ * @param interestRateMode 2 for Variable, 1 is deprecated on v3.2.0 - * @param referralCode The code used to register the integrator originating the operation, for potential rewards. - * 0 if the action is executed directly by the user, without any middle-man - * @param onBehalfOf The address of the user who will receive the debt. Should be the address of the borrower itself -@@ -1920,11 +1960,11 @@ interface IPool { - - /** - * @notice Repays a borrowed `amount` on a specific reserve, burning the equivalent debt tokens owned -- * - E.g. User repays 100 USDC, burning 100 variable/stable debt tokens of the `onBehalfOf` address -+ * - E.g. User repays 100 USDC, burning 100 variable debt tokens of the `onBehalfOf` address - * @param asset The address of the borrowed underlying asset previously borrowed - * @param amount The amount to repay - * - Send the value type(uint256).max in order to repay the whole debt for `asset` on the specific `debtMode` -- * @param interestRateMode The interest rate mode at of the debt the user wants to repay: 1 for Stable, 2 for Variable -+ * @param interestRateMode 2 for Variable, 1 is deprecated on v3.2.0 - * @param onBehalfOf The address of the user who will get his debt reduced/removed. Should be the address of the - * user calling the function if he wants to reduce/remove his own debt, or the address of any other - * other borrower whose debt should be removed -@@ -1943,7 +1983,7 @@ interface IPool { - * @param asset The address of the borrowed underlying asset previously borrowed - * @param amount The amount to repay - * - Send the value type(uint256).max in order to repay the whole debt for `asset` on the specific `debtMode` -- * @param interestRateMode The interest rate mode at of the debt the user wants to repay: 1 for Stable, 2 for Variable -+ * @param interestRateMode 2 for Variable, 1 is deprecated on v3.2.0 - * @param onBehalfOf Address of the user who will get his debt reduced/removed. Should be the address of the - * user calling the function if he wants to reduce/remove his own debt, or the address of any other - * other borrower whose debt should be removed -@@ -1967,13 +2007,13 @@ interface IPool { - /** - * @notice Repays a borrowed `amount` on a specific reserve using the reserve aTokens, burning the - * equivalent debt tokens -- * - E.g. User repays 100 USDC using 100 aUSDC, burning 100 variable/stable debt tokens -+ * - E.g. User repays 100 USDC using 100 aUSDC, burning 100 variable debt tokens - * @dev Passing uint256.max as amount will clean up any residual aToken dust balance, if the user aToken - * balance is not enough to cover the whole debt - * @param asset The address of the borrowed underlying asset previously borrowed - * @param amount The amount to repay - * - Send the value type(uint256).max in order to repay the whole debt for `asset` on the specific `debtMode` -- * @param interestRateMode The interest rate mode at of the debt the user wants to repay: 1 for Stable, 2 for Variable -+ * @param interestRateMode DEPRECATED in v3.2.0 - * @return The final amount repaid - */ - function repayWithATokens( -@@ -1982,24 +2022,6 @@ interface IPool { - uint256 interestRateMode - ) external returns (uint256); - -- /** -- * @notice Allows a borrower to swap his debt between stable and variable mode, or vice versa -- * @param asset The address of the underlying asset borrowed -- * @param interestRateMode The current interest rate mode of the position being swapped: 1 for Stable, 2 for Variable -- */ -- function swapBorrowRateMode(address asset, uint256 interestRateMode) external; -- -- /** -- * @notice Rebalances the stable interest rate of a user to the current stable rate defined on the reserve. -- * - Users can be rebalanced if the following conditions are satisfied: -- * 1. Usage ratio is above 95% -- * 2. the current supply APY is below REBALANCE_UP_THRESHOLD * maxVariableBorrowRate, which means that too -- * much has been borrowed at a stable rate and suppliers are not earning enough -- * @param asset The address of the underlying asset borrowed -- * @param user The address of the user to be rebalanced -- */ -- function rebalanceStableBorrowRate(address asset, address user) external; -- - /** - * @notice Allows suppliers to enable/disable a specific supplied asset as collateral - * @param asset The address of the underlying asset supplied -@@ -2036,9 +2058,9 @@ interface IPool { - * @param amounts The amounts of the assets being flash-borrowed - * @param interestRateModes Types of the debt to open if the flash loan is not returned: - * 0 -> Don't open any debt, just revert if funds can't be transferred from the receiver -- * 1 -> Open debt at stable rate for the value of the amount flash-borrowed to the `onBehalfOf` address -+ * 1 -> Deprecated on v3.2.0 - * 2 -> Open debt at variable rate for the value of the amount flash-borrowed to the `onBehalfOf` address -- * @param onBehalfOf The address that will receive the debt in the case of using on `modes` 1 or 2 -+ * @param onBehalfOf The address that will receive the debt in the case of using 2 on `modes` - * @param params Variadic packed params to pass to the receiver as extra information - * @param referralCode The code used to register the integrator originating the operation, for potential rewards. - * 0 if the action is executed directly by the user, without any middle-man -@@ -2103,14 +2125,12 @@ interface IPool { - * @dev Only callable by the PoolConfigurator contract - * @param asset The address of the underlying asset of the reserve - * @param aTokenAddress The address of the aToken that will be assigned to the reserve -- * @param stableDebtAddress The address of the StableDebtToken that will be assigned to the reserve - * @param variableDebtAddress The address of the VariableDebtToken that will be assigned to the reserve - * @param interestRateStrategyAddress The address of the interest rate strategy contract - */ - function initReserve( - address asset, - address aTokenAddress, -- address stableDebtAddress, - address variableDebtAddress, - address interestRateStrategyAddress - ) external; -@@ -2118,6 +2138,7 @@ interface IPool { - /** - * @notice Drop a reserve - * @dev Only callable by the PoolConfigurator contract -+ * @dev Does not reset eMode flags, which must be considered when reusing the same reserve id for a different reserve. - * @param asset The address of the underlying asset of the reserve - */ - function dropReserve(address asset) external; -@@ -2133,6 +2154,22 @@ interface IPool { - address rateStrategyAddress - ) external; - -+ /** -+ * @notice Accumulates interest to all indexes of the reserve -+ * @dev Only callable by the PoolConfigurator contract -+ * @dev To be used when required by the configurator, for example when updating interest rates strategy data -+ * @param asset The address of the underlying asset of the reserve -+ */ -+ function syncIndexesState(address asset) external; -+ -+ /** -+ * @notice Updates interest rates on the reserve data -+ * @dev Only callable by the PoolConfigurator contract -+ * @dev To be used when required by the configurator, for example when updating interest rates strategy data -+ * @param asset The address of the underlying asset of the reserve -+ */ -+ function syncRatesState(address asset) external; -+ - /** - * @notice Sets the configuration bitmap of the reserve as a whole - * @dev Only callable by the PoolConfigurator contract -@@ -2188,7 +2225,24 @@ interface IPool { - * @param asset The address of the underlying asset of the reserve - * @return The state and configuration data of the reserve - */ -- function getReserveData(address asset) external view returns (DataTypes.ReserveData memory); -+ function getReserveData(address asset) external view returns (DataTypes.ReserveDataLegacy memory); -+ -+ /** -+ * @notice Returns the state and configuration of the reserve, including extra data included with Aave v3.1 -+ * @dev DEPRECATED use independent getters instead (getReserveData, getLiquidationGracePeriod) -+ * @param asset The address of the underlying asset of the reserve -+ * @return The state and configuration data of the reserve with virtual accounting -+ */ -+ function getReserveDataExtended( -+ address asset -+ ) external view returns (DataTypes.ReserveData memory); -+ -+ /** -+ * @notice Returns the virtual underlying balance of the reserve -+ * @param asset The address of the underlying asset of the reserve -+ * @return The reserve virtual underlying balance -+ */ -+ function getVirtualUnderlyingBalance(address asset) external view returns (uint128); - - /** - * @notice Validates and finalizes an aToken transfer -@@ -2216,6 +2270,13 @@ interface IPool { - */ - function getReservesList() external view returns (address[] memory); - -+ /** -+ * @notice Returns the number of initialized reserves -+ * @dev It includes dropped reserves -+ * @return The count -+ */ -+ function getReservesCount() external view returns (uint256); -+ - /** - * @notice Returns the address of the underlying asset of a reserve by the reserve id as stored in the DataTypes.ReserveData struct - * @param id The id of the reserve as stored in the DataTypes.ReserveData struct -@@ -2251,20 +2312,70 @@ interface IPool { - ) external; - - /** -- * @notice Configures a new category for the eMode. -+ * @notice Configures a new or alters an existing collateral configuration of an eMode. - * @dev In eMode, the protocol allows very high borrowing power to borrow assets of the same category. - * The category 0 is reserved as it's the default for volatile assets - * @param id The id of the category - * @param config The configuration of the category - */ -- function configureEModeCategory(uint8 id, DataTypes.EModeCategory memory config) external; -+ function configureEModeCategory( -+ uint8 id, -+ DataTypes.EModeCategoryBaseConfiguration memory config -+ ) external; -+ -+ /** -+ * @notice Replaces the current eMode collateralBitmap. -+ * @param id The id of the category -+ * @param collateralBitmap The collateralBitmap of the category -+ */ -+ function configureEModeCategoryCollateralBitmap(uint8 id, uint128 collateralBitmap) external; -+ -+ /** -+ * @notice Replaces the current eMode borrowableBitmap. -+ * @param id The id of the category -+ * @param borrowableBitmap The borrowableBitmap of the category -+ */ -+ function configureEModeCategoryBorrowableBitmap(uint8 id, uint128 borrowableBitmap) external; - - /** - * @notice Returns the data of an eMode category -+ * @dev DEPRECATED use independent getters instead - * @param id The id of the category - * @return The configuration data of the category - */ -- function getEModeCategoryData(uint8 id) external view returns (DataTypes.EModeCategory memory); -+ function getEModeCategoryData( -+ uint8 id -+ ) external view returns (DataTypes.EModeCategoryLegacy memory); -+ -+ /** -+ * @notice Returns the label of an eMode category -+ * @param id The id of the category -+ * @return The label of the category -+ */ -+ function getEModeCategoryLabel(uint8 id) external view returns (string memory); -+ -+ /** -+ * @notice Returns the collateral config of an eMode category -+ * @param id The id of the category -+ * @return The ltv,lt,lb of the category -+ */ -+ function getEModeCategoryCollateralConfig( -+ uint8 id -+ ) external view returns (DataTypes.CollateralConfig memory); -+ -+ /** -+ * @notice Returns the collateralBitmap of an eMode category -+ * @param id The id of the category -+ * @return The collateralBitmap of the category -+ */ -+ function getEModeCategoryCollateralBitmap(uint8 id) external view returns (uint128); -+ -+ /** -+ * @notice Returns the borrowableBitmap of an eMode category -+ * @param id The id of the category -+ * @return The borrowableBitmap of the category -+ */ -+ function getEModeCategoryBorrowableBitmap(uint8 id) external view returns (uint128); - - /** - * @notice Allows a user to use the protocol in eMode -@@ -2287,10 +2398,20 @@ interface IPool { - function resetIsolationModeTotalDebt(address asset) external; - - /** -- * @notice Returns the percentage of available liquidity that can be borrowed at once at stable rate -- * @return The percentage of available liquidity to borrow, expressed in bps -- */ -- function MAX_STABLE_RATE_BORROW_SIZE_PERCENT() external view returns (uint256); -+ * @notice Sets the liquidation grace period of the given asset -+ * @dev To enable a liquidation grace period, a timestamp in the future should be set, -+ * To disable a liquidation grace period, any timestamp in the past works, like 0 -+ * @param asset The address of the underlying asset to set the liquidationGracePeriod -+ * @param until Timestamp when the liquidation grace period will end -+ **/ -+ function setLiquidationGracePeriod(address asset, uint40 until) external; -+ -+ /** -+ * @notice Returns the liquidation grace period of the given asset -+ * @param asset The address of the underlying asset -+ * @return Timestamp when the liquidation grace period will end -+ **/ -+ function getLiquidationGracePeriod(address asset) external returns (uint40); - - /** - * @notice Returns the total fee on flash loans -@@ -2343,9 +2464,44 @@ interface IPool { - * 0 if the action is executed directly by the user, without any middle-man - */ - function deposit(address asset, uint256 amount, address onBehalfOf, uint16 referralCode) external; -+ -+ /** -+ * @notice Gets the address of the external FlashLoanLogic -+ */ -+ function getFlashLoanLogic() external view returns (address); -+ -+ /** -+ * @notice Gets the address of the external BorrowLogic -+ */ -+ function getBorrowLogic() external view returns (address); -+ -+ /** -+ * @notice Gets the address of the external BridgeLogic -+ */ -+ function getBridgeLogic() external view returns (address); -+ -+ /** -+ * @notice Gets the address of the external EModeLogic -+ */ -+ function getEModeLogic() external view returns (address); -+ -+ /** -+ * @notice Gets the address of the external LiquidationLogic -+ */ -+ function getLiquidationLogic() external view returns (address); -+ -+ /** -+ * @notice Gets the address of the external PoolLogic -+ */ -+ function getPoolLogic() external view returns (address); -+ -+ /** -+ * @notice Gets the address of the external SupplyLogic -+ */ -+ function getSupplyLogic() external view returns (address); - } - --// downloads/ARBITRUM/DEFAULT_A_TOKEN_IMPL/AToken/lib/aave-v3-core/contracts/interfaces/IInitializableAToken.sol -+// downloads/LINEA/DEFAULT_A_TOKEN_IMPL/ATokenInstance/src/contracts/interfaces/IInitializableAToken.sol - - /** - * @title IInitializableAToken -@@ -2398,7 +2554,7 @@ interface IInitializableAToken { - ) external; - } - --// downloads/ARBITRUM/DEFAULT_A_TOKEN_IMPL/AToken/lib/aave-v3-core/contracts/interfaces/IAToken.sol -+// downloads/LINEA/DEFAULT_A_TOKEN_IMPL/ATokenInstance/src/contracts/interfaces/IAToken.sol - - /** - * @title IAToken -@@ -2532,7 +2688,7 @@ interface IAToken is IERC20, IScaledBalanceToken, IInitializableAToken { - function rescueTokens(address token, address to, uint256 amount) external; - } - + -// downloads/ARBITRUM/DEFAULT_A_TOKEN_IMPL/AToken/lib/aave-v3-core/contracts/protocol/tokenization/base/IncentivizedERC20.sol +// downloads/LINEA/DEFAULT_A_TOKEN_IMPL/ATokenInstance/src/contracts/protocol/tokenization/base/IncentivizedERC20.sol - + /** * @title IncentivizedERC20 @@ -2563,8 +2719,7 @@ abstract contract IncentivizedERC20 is Context, IERC20Detailed { @@ -836,32 +41,11 @@ index efb0fd4..fd9dc66 100644 + _decimals = decimals_; POOL = pool; } - + @@ -2756,7 +2911,7 @@ abstract contract IncentivizedERC20 is Context, IERC20Detailed { } } - --// downloads/ARBITRUM/DEFAULT_A_TOKEN_IMPL/AToken/lib/aave-v3-core/contracts/protocol/tokenization/base/MintableIncentivizedERC20.sol -+// downloads/LINEA/DEFAULT_A_TOKEN_IMPL/ATokenInstance/src/contracts/protocol/tokenization/base/MintableIncentivizedERC20.sol - - /** - * @title MintableIncentivizedERC20 -@@ -2818,7 +2973,7 @@ abstract contract MintableIncentivizedERC20 is IncentivizedERC20 { - } - } - --// downloads/ARBITRUM/DEFAULT_A_TOKEN_IMPL/AToken/lib/aave-v3-core/contracts/protocol/tokenization/base/ScaledBalanceTokenBase.sol -+// downloads/LINEA/DEFAULT_A_TOKEN_IMPL/ATokenInstance/src/contracts/protocol/tokenization/base/ScaledBalanceTokenBase.sol - - /** - * @title ScaledBalanceTokenBase -@@ -2967,14 +3122,14 @@ abstract contract ScaledBalanceTokenBase is MintableIncentivizedERC20, IScaledBa - } - } - --// downloads/ARBITRUM/DEFAULT_A_TOKEN_IMPL/AToken/lib/aave-v3-core/contracts/protocol/tokenization/AToken.sol -+// downloads/LINEA/DEFAULT_A_TOKEN_IMPL/ATokenInstance/src/contracts/protocol/tokenization/AToken.sol - + /** * @title Aave ERC20 AToken * @author Aave @@ -875,12 +59,12 @@ index efb0fd4..fd9dc66 100644 @@ -2982,16 +3137,9 @@ contract AToken is VersionedInitializable, ScaledBalanceTokenBase, EIP712Base, I bytes32 public constant PERMIT_TYPEHASH = keccak256('Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)'); - + - uint256 public constant ATOKEN_REVISION = 0x2; - address internal _treasury; address internal _underlyingAsset; - + - /// @inheritdoc VersionedInitializable - function getRevision() internal pure virtual override returns (uint256) { - return ATOKEN_REVISION; @@ -917,7 +101,7 @@ index efb0fd4..fd9dc66 100644 - ); - } + ) public virtual; - + /// @inheritdoc IAToken function mint( @@ -3208,3 +3334,50 @@ contract AToken is VersionedInitializable, ScaledBalanceTokenBase, EIP712Base, I diff --git a/diffs/ARBITRUM_LINEA/DEFAULT_INCENTIVES_CONTROLLER_IMPL_DIFF.md b/diffs/ARBITRUM_LINEA/DEFAULT_INCENTIVES_CONTROLLER_IMPL_DIFF.md index 8f77fa6a..5ecc63cd 100644 --- a/diffs/ARBITRUM_LINEA/DEFAULT_INCENTIVES_CONTROLLER_IMPL_DIFF.md +++ b/diffs/ARBITRUM_LINEA/DEFAULT_INCENTIVES_CONTROLLER_IMPL_DIFF.md @@ -3,219 +3,10 @@ diff --git a/./downloads/ARBITRUM/DEFAULT_INCENTIVES_CONTROLLER_IMPL.sol b/./dow index 8c00995..8226df6 100644 --- a/./downloads/ARBITRUM/DEFAULT_INCENTIVES_CONTROLLER_IMPL.sol +++ b/./downloads/LINEA/DEFAULT_INCENTIVES_CONTROLLER_IMPL.sol -@@ -1,7 +1,7 @@ - // SPDX-License-Identifier: BUSL-1.1 --pragma solidity =0.8.10 ^0.8.0 ^0.8.10; -+pragma solidity ^0.8.0 ^0.8.10; - --// downloads/ARBITRUM/DEFAULT_INCENTIVES_CONTROLLER_IMPL/RewardsController/lib/aave-v3-core/contracts/dependencies/openzeppelin/contracts/IERC20.sol -+// downloads/LINEA/DEFAULT_INCENTIVES_CONTROLLER_IMPL/RewardsController/src/contracts/dependencies/openzeppelin/contracts/IERC20.sol - - /** - * @dev Interface of the ERC20 standard as defined in the EIP. -@@ -77,7 +77,7 @@ interface IERC20 { - event Approval(address indexed owner, address indexed spender, uint256 value); - } - --// downloads/ARBITRUM/DEFAULT_INCENTIVES_CONTROLLER_IMPL/RewardsController/lib/aave-v3-core/contracts/dependencies/openzeppelin/contracts/SafeCast.sol -+// downloads/LINEA/DEFAULT_INCENTIVES_CONTROLLER_IMPL/RewardsController/src/contracts/dependencies/openzeppelin/contracts/SafeCast.sol - - // OpenZeppelin Contracts v4.4.1 (utils/math/SafeCast.sol) - -@@ -333,22 +333,41 @@ library SafeCast { - } - } - --// downloads/ARBITRUM/DEFAULT_INCENTIVES_CONTROLLER_IMPL/RewardsController/lib/aave-v3-core/contracts/interfaces/IScaledBalanceToken.sol -+// downloads/LINEA/DEFAULT_INCENTIVES_CONTROLLER_IMPL/RewardsController/src/contracts/helpers/interfaces/IEACAggregatorProxy.sol -+ -+interface IEACAggregatorProxy { -+ function decimals() external view returns (uint8); -+ -+ function latestAnswer() external view returns (int256); -+ -+ function latestTimestamp() external view returns (uint256); -+ -+ function latestRound() external view returns (uint256); -+ -+ function getAnswer(uint256 roundId) external view returns (int256); -+ -+ function getTimestamp(uint256 roundId) external view returns (uint256); -+ -+ event AnswerUpdated(int256 indexed current, uint256 indexed roundId, uint256 timestamp); -+ event NewRound(uint256 indexed roundId, address indexed startedBy); -+} -+ -+// downloads/LINEA/DEFAULT_INCENTIVES_CONTROLLER_IMPL/RewardsController/src/contracts/interfaces/IScaledBalanceToken.sol - - /** - * @title IScaledBalanceToken - * @author Aave -- * @notice Defines the basic interface for a scaledbalance token. -- **/ -+ * @notice Defines the basic interface for a scaled-balance token. -+ */ - interface IScaledBalanceToken { - /** - * @dev Emitted after the mint action - * @param caller The address performing the mint -- * @param onBehalfOf The address of the user that will receive the minted scaled balance tokens -- * @param value The amount being minted (user entered amount + balance increase from interest) -- * @param balanceIncrease The increase in balance since the last action of the user -+ * @param onBehalfOf The address of the user that will receive the minted tokens -+ * @param value The scaled-up amount being minted (based on user entered amount and balance increase from interest) -+ * @param balanceIncrease The increase in scaled-up balance since the last action of 'onBehalfOf' - * @param index The next liquidity index of the reserve -- **/ -+ */ - event Mint( - address indexed caller, - address indexed onBehalfOf, -@@ -358,13 +377,14 @@ interface IScaledBalanceToken { - ); - - /** -- * @dev Emitted after scaled balance tokens are burned -- * @param from The address from which the scaled tokens will be burned -+ * @dev Emitted after the burn action -+ * @dev If the burn function does not involve a transfer of the underlying asset, the target defaults to zero address -+ * @param from The address from which the tokens will be burned - * @param target The address that will receive the underlying, if any -- * @param value The amount being burned (user entered amount - balance increase from interest) -- * @param balanceIncrease The increase in balance since the last action of the user -+ * @param value The scaled-up amount being burned (user entered amount - balance increase from interest) -+ * @param balanceIncrease The increase in scaled-up balance since the last action of 'from' - * @param index The next liquidity index of the reserve -- **/ -+ */ - event Burn( - address indexed from, - address indexed target, -@@ -379,7 +399,7 @@ interface IScaledBalanceToken { - * at the moment of the update - * @param user The user whose balance is calculated - * @return The scaled balance of the user -- **/ -+ */ - function scaledBalanceOf(address user) external view returns (uint256); - - /** -@@ -387,24 +407,24 @@ interface IScaledBalanceToken { - * @param user The address of the user - * @return The scaled balance of the user - * @return The scaled total supply -- **/ -+ */ - function getScaledUserBalanceAndSupply(address user) external view returns (uint256, uint256); - - /** - * @notice Returns the scaled total supply of the scaled balance token. Represents sum(debt/index) - * @return The scaled total supply -- **/ -+ */ - function scaledTotalSupply() external view returns (uint256); - - /** - * @notice Returns last index interest was accrued to the user's balance - * @param user The address of the user - * @return The last index interest was accrued to the user's balance, expressed in ray -- **/ -+ */ - function getPreviousIndex(address user) external view returns (uint256); - } - --// downloads/ARBITRUM/DEFAULT_INCENTIVES_CONTROLLER_IMPL/RewardsController/lib/aave-v3-core/contracts/protocol/libraries/aave-upgradeability/VersionedInitializable.sol -+// downloads/LINEA/DEFAULT_INCENTIVES_CONTROLLER_IMPL/RewardsController/src/contracts/misc/aave-upgradeability/VersionedInitializable.sol - - /** - * @title VersionedInitializable -@@ -456,13 +476,13 @@ abstract contract VersionedInitializable { - * @notice Returns the revision number of the contract - * @dev Needs to be defined in the inherited class as a constant. - * @return The revision number -- **/ -+ */ - function getRevision() internal pure virtual returns (uint256); - - /** - * @notice Returns true if and only if the function is running in the constructor - * @return True if the function is running in the constructor -- **/ -+ */ - function isConstructor() private view returns (bool) { - // extcodesize checks the size of the code stored in an address, and - // address returns the current address. Since the code is still not -@@ -481,26 +501,7 @@ abstract contract VersionedInitializable { - uint256[50] private ______gap; - } - --// downloads/ARBITRUM/DEFAULT_INCENTIVES_CONTROLLER_IMPL/RewardsController/lib/aave-v3-periphery/contracts/misc/interfaces/IEACAggregatorProxy.sol -- --interface IEACAggregatorProxy { -- function decimals() external view returns (uint8); -- -- function latestAnswer() external view returns (int256); -- -- function latestTimestamp() external view returns (uint256); -- -- function latestRound() external view returns (uint256); -- -- function getAnswer(uint256 roundId) external view returns (int256); -- -- function getTimestamp(uint256 roundId) external view returns (uint256); -- -- event AnswerUpdated(int256 indexed current, uint256 indexed roundId, uint256 timestamp); -- event NewRound(uint256 indexed roundId, address indexed startedBy); --} -- --// downloads/ARBITRUM/DEFAULT_INCENTIVES_CONTROLLER_IMPL/RewardsController/lib/aave-v3-periphery/contracts/rewards/interfaces/IRewardsDistributor.sol -+// downloads/LINEA/DEFAULT_INCENTIVES_CONTROLLER_IMPL/RewardsController/src/contracts/rewards/interfaces/IRewardsDistributor.sol - - /** - * @title IRewardsDistributor -@@ -677,7 +678,7 @@ interface IRewardsDistributor { - function getEmissionManager() external view returns (address); - } - --// downloads/ARBITRUM/DEFAULT_INCENTIVES_CONTROLLER_IMPL/RewardsController/lib/aave-v3-periphery/contracts/rewards/interfaces/ITransferStrategyBase.sol -+// downloads/LINEA/DEFAULT_INCENTIVES_CONTROLLER_IMPL/RewardsController/src/contracts/rewards/interfaces/ITransferStrategyBase.sol - - interface ITransferStrategyBase { - event EmergencyWithdrawal( -@@ -715,7 +716,7 @@ interface ITransferStrategyBase { - function emergencyWithdrawal(address token, address to, uint256 amount) external; - } - --// downloads/ARBITRUM/DEFAULT_INCENTIVES_CONTROLLER_IMPL/RewardsController/lib/aave-v3-core/contracts/dependencies/openzeppelin/contracts/IERC20Detailed.sol -+// downloads/LINEA/DEFAULT_INCENTIVES_CONTROLLER_IMPL/RewardsController/src/contracts/dependencies/openzeppelin/contracts/IERC20Detailed.sol - - interface IERC20Detailed is IERC20 { - function name() external view returns (string memory); -@@ -725,7 +726,7 @@ interface IERC20Detailed is IERC20 { - function decimals() external view returns (uint8); - } - --// downloads/ARBITRUM/DEFAULT_INCENTIVES_CONTROLLER_IMPL/RewardsController/lib/aave-v3-periphery/contracts/rewards/libraries/RewardsDataTypes.sol -+// downloads/LINEA/DEFAULT_INCENTIVES_CONTROLLER_IMPL/RewardsController/src/contracts/rewards/libraries/RewardsDataTypes.sol - - library RewardsDataTypes { - struct RewardsConfigInput { -@@ -776,7 +777,7 @@ library RewardsDataTypes { - } - } - --// downloads/ARBITRUM/DEFAULT_INCENTIVES_CONTROLLER_IMPL/RewardsController/lib/aave-v3-periphery/contracts/rewards/interfaces/IRewardsController.sol -+// downloads/LINEA/DEFAULT_INCENTIVES_CONTROLLER_IMPL/RewardsController/src/contracts/rewards/interfaces/IRewardsController.sol - - /** - * @title IRewardsController -@@ -974,7 +975,7 @@ interface IRewardsController is IRewardsDistributor { - ) external returns (address[] memory rewardsList, uint256[] memory claimedAmounts); - } - + -// downloads/ARBITRUM/DEFAULT_INCENTIVES_CONTROLLER_IMPL/RewardsController/lib/aave-v3-periphery/contracts/rewards/RewardsDistributor.sol +// downloads/LINEA/DEFAULT_INCENTIVES_CONTROLLER_IMPL/RewardsController/src/contracts/rewards/RewardsDistributor.sol - + /** * @title RewardsDistributor @@ -1014,7 +1015,7 @@ abstract contract RewardsDistributor is IRewardsDistributor { @@ -235,23 +26,23 @@ index 8c00995..8226df6 100644 + ) external view override returns (uint256) { return _assets[asset].rewards[reward].usersData[user].index; } - + @@ -1505,7 +1506,7 @@ abstract contract RewardsDistributor is IRewardsDistributor { } } - + -// downloads/ARBITRUM/DEFAULT_INCENTIVES_CONTROLLER_IMPL/RewardsController/lib/aave-v3-periphery/contracts/rewards/RewardsController.sol +// downloads/LINEA/DEFAULT_INCENTIVES_CONTROLLER_IMPL/RewardsController/src/contracts/rewards/RewardsController.sol - + /** * @title RewardsController @@ -1515,7 +1516,7 @@ abstract contract RewardsDistributor is IRewardsDistributor { contract RewardsController is RewardsDistributor, VersionedInitializable, IRewardsController { using SafeCast for uint256; - + - uint256 public constant REVISION = 2; + uint256 public constant REVISION = 1; - + // This mapping allows whitelisted addresses to claim on behalf of others // useful for contracts that hold tokens to be rewarded but don't have any native logic to claim Liquidity Mining rewards ``` diff --git a/diffs/ARBITRUM_LINEA/DEFAULT_VARIABLE_DEBT_TOKEN_IMPL_DIFF.md b/diffs/ARBITRUM_LINEA/DEFAULT_VARIABLE_DEBT_TOKEN_IMPL_DIFF.md index dcc6d057..3b6ed003 100644 --- a/diffs/ARBITRUM_LINEA/DEFAULT_VARIABLE_DEBT_TOKEN_IMPL_DIFF.md +++ b/diffs/ARBITRUM_LINEA/DEFAULT_VARIABLE_DEBT_TOKEN_IMPL_DIFF.md @@ -3,820 +3,10 @@ diff --git a/./downloads/ARBITRUM/DEFAULT_VARIABLE_DEBT_TOKEN_IMPL.sol b/./downl index d6d70f1..1be027a 100644 --- a/./downloads/ARBITRUM/DEFAULT_VARIABLE_DEBT_TOKEN_IMPL.sol +++ b/./downloads/LINEA/DEFAULT_VARIABLE_DEBT_TOKEN_IMPL.sol -@@ -1,7 +1,7 @@ - // SPDX-License-Identifier: BUSL-1.1 --pragma solidity =0.8.10 ^0.8.0; -+pragma solidity ^0.8.0 ^0.8.10; - --// downloads/ARBITRUM/DEFAULT_VARIABLE_DEBT_TOKEN_IMPL/VariableDebtToken/lib/aave-v3-core/contracts/dependencies/openzeppelin/contracts/Context.sol -+// downloads/LINEA/DEFAULT_VARIABLE_DEBT_TOKEN_IMPL/VariableDebtTokenInstance/src/contracts/dependencies/openzeppelin/contracts/Context.sol - - /* - * @dev Provides information about the current execution context, including the -@@ -24,7 +24,7 @@ abstract contract Context { - } - } - --// downloads/ARBITRUM/DEFAULT_VARIABLE_DEBT_TOKEN_IMPL/VariableDebtToken/lib/aave-v3-core/contracts/dependencies/openzeppelin/contracts/IERC20.sol -+// downloads/LINEA/DEFAULT_VARIABLE_DEBT_TOKEN_IMPL/VariableDebtTokenInstance/src/contracts/dependencies/openzeppelin/contracts/IERC20.sol - - /** - * @dev Interface of the ERC20 standard as defined in the EIP. -@@ -100,7 +100,7 @@ interface IERC20 { - event Approval(address indexed owner, address indexed spender, uint256 value); - } - --// downloads/ARBITRUM/DEFAULT_VARIABLE_DEBT_TOKEN_IMPL/VariableDebtToken/lib/aave-v3-core/contracts/dependencies/openzeppelin/contracts/SafeCast.sol -+// downloads/LINEA/DEFAULT_VARIABLE_DEBT_TOKEN_IMPL/VariableDebtTokenInstance/src/contracts/dependencies/openzeppelin/contracts/SafeCast.sol - - // OpenZeppelin Contracts v4.4.1 (utils/math/SafeCast.sol) - -@@ -356,7 +356,7 @@ library SafeCast { - } - } - --// downloads/ARBITRUM/DEFAULT_VARIABLE_DEBT_TOKEN_IMPL/VariableDebtToken/lib/aave-v3-core/contracts/interfaces/IAaveIncentivesController.sol -+// downloads/LINEA/DEFAULT_VARIABLE_DEBT_TOKEN_IMPL/VariableDebtTokenInstance/src/contracts/interfaces/IAaveIncentivesController.sol - - /** - * @title IAaveIncentivesController -@@ -375,7 +375,7 @@ interface IAaveIncentivesController { - function handleAction(address user, uint256 totalSupply, uint256 userBalance) external; - } - --// downloads/ARBITRUM/DEFAULT_VARIABLE_DEBT_TOKEN_IMPL/VariableDebtToken/lib/aave-v3-core/contracts/interfaces/ICreditDelegationToken.sol -+// downloads/LINEA/DEFAULT_VARIABLE_DEBT_TOKEN_IMPL/VariableDebtTokenInstance/src/contracts/interfaces/ICreditDelegationToken.sol - - /** - * @title ICreditDelegationToken -@@ -435,7 +435,7 @@ interface ICreditDelegationToken { - ) external; - } - --// downloads/ARBITRUM/DEFAULT_VARIABLE_DEBT_TOKEN_IMPL/VariableDebtToken/lib/aave-v3-core/contracts/interfaces/IPoolAddressesProvider.sol -+// downloads/LINEA/DEFAULT_VARIABLE_DEBT_TOKEN_IMPL/VariableDebtTokenInstance/src/contracts/interfaces/IPoolAddressesProvider.sol - - /** - * @title IPoolAddressesProvider -@@ -662,7 +662,7 @@ interface IPoolAddressesProvider { - function setPoolDataProvider(address newDataProvider) external; - } - --// downloads/ARBITRUM/DEFAULT_VARIABLE_DEBT_TOKEN_IMPL/VariableDebtToken/lib/aave-v3-core/contracts/interfaces/IScaledBalanceToken.sol -+// downloads/LINEA/DEFAULT_VARIABLE_DEBT_TOKEN_IMPL/VariableDebtTokenInstance/src/contracts/interfaces/IScaledBalanceToken.sol - - /** - * @title IScaledBalanceToken -@@ -734,7 +734,7 @@ interface IScaledBalanceToken { - function getPreviousIndex(address user) external view returns (uint256); - } - --// downloads/ARBITRUM/DEFAULT_VARIABLE_DEBT_TOKEN_IMPL/VariableDebtToken/lib/aave-v3-core/contracts/protocol/libraries/aave-upgradeability/VersionedInitializable.sol -+// downloads/LINEA/DEFAULT_VARIABLE_DEBT_TOKEN_IMPL/VariableDebtTokenInstance/src/contracts/misc/aave-upgradeability/VersionedInitializable.sol - - /** - * @title VersionedInitializable -@@ -811,7 +811,7 @@ abstract contract VersionedInitializable { - uint256[50] private ______gap; - } - --// downloads/ARBITRUM/DEFAULT_VARIABLE_DEBT_TOKEN_IMPL/VariableDebtToken/lib/aave-v3-core/contracts/protocol/libraries/helpers/Errors.sol -+// downloads/LINEA/DEFAULT_VARIABLE_DEBT_TOKEN_IMPL/VariableDebtTokenInstance/src/contracts/protocol/libraries/helpers/Errors.sol - - /** - * @title Errors library -@@ -849,17 +849,14 @@ library Errors { - string public constant RESERVE_FROZEN = '28'; // 'Action cannot be performed because the reserve is frozen' - string public constant RESERVE_PAUSED = '29'; // 'Action cannot be performed because the reserve is paused' - string public constant BORROWING_NOT_ENABLED = '30'; // 'Borrowing is not enabled' -- string public constant STABLE_BORROWING_NOT_ENABLED = '31'; // 'Stable borrowing is not enabled' - string public constant NOT_ENOUGH_AVAILABLE_USER_BALANCE = '32'; // 'User cannot withdraw more than the available balance' - string public constant INVALID_INTEREST_RATE_MODE_SELECTED = '33'; // 'Invalid interest rate mode selected' - string public constant COLLATERAL_BALANCE_IS_ZERO = '34'; // 'The collateral balance is 0' - string public constant HEALTH_FACTOR_LOWER_THAN_LIQUIDATION_THRESHOLD = '35'; // 'Health factor is lesser than the liquidation threshold' - string public constant COLLATERAL_CANNOT_COVER_NEW_BORROW = '36'; // 'There is not enough collateral to cover a new borrow' - string public constant COLLATERAL_SAME_AS_BORROWING_CURRENCY = '37'; // 'Collateral is (mostly) the same currency that is being borrowed' -- string public constant AMOUNT_BIGGER_THAN_MAX_LOAN_SIZE_STABLE = '38'; // 'The requested amount is greater than the max loan size in stable rate mode' - string public constant NO_DEBT_OF_SELECTED_TYPE = '39'; // 'For repayment of a specific type of debt, the user needs to have debt that type' - string public constant NO_EXPLICIT_AMOUNT_TO_REPAY_ON_BEHALF = '40'; // 'To repay on behalf of a user an explicit amount to repay is needed' -- string public constant NO_OUTSTANDING_STABLE_DEBT = '41'; // 'User does not have outstanding stable rate debt on this reserve' - string public constant NO_OUTSTANDING_VARIABLE_DEBT = '42'; // 'User does not have outstanding variable rate debt on this reserve' - string public constant UNDERLYING_BALANCE_ZERO = '43'; // 'The underlying balance needs to be greater than 0' - string public constant INTEREST_RATE_REBALANCE_CONDITIONS_NOT_MET = '44'; // 'Interest rate rebalance conditions were not met' -@@ -872,7 +869,6 @@ library Errors { - string public constant UNBACKED_MINT_CAP_EXCEEDED = '52'; // 'Unbacked mint cap is exceeded' - string public constant DEBT_CEILING_EXCEEDED = '53'; // 'Debt ceiling is exceeded' - string public constant UNDERLYING_CLAIMABLE_RIGHTS_NOT_ZERO = '54'; // 'Claimable rights over underlying not zero (aToken supply or accruedToTreasury)' -- string public constant STABLE_DEBT_NOT_ZERO = '55'; // 'Stable debt supply is not zero' - string public constant VARIABLE_DEBT_SUPPLY_NOT_ZERO = '56'; // 'Variable debt supply is not zero' - string public constant LTV_VALIDATION_FAILED = '57'; // 'Ltv validation failed' - string public constant INCONSISTENT_EMODE_CATEGORY = '58'; // 'Inconsistent eMode category' -@@ -901,17 +897,24 @@ library Errors { - string public constant DEBT_CEILING_NOT_ZERO = '81'; // 'Debt ceiling is not zero' - string public constant ASSET_NOT_LISTED = '82'; // 'Asset is not listed' - string public constant INVALID_OPTIMAL_USAGE_RATIO = '83'; // 'Invalid optimal usage ratio' -- string public constant INVALID_OPTIMAL_STABLE_TO_TOTAL_DEBT_RATIO = '84'; // 'Invalid optimal stable to total debt ratio' - string public constant UNDERLYING_CANNOT_BE_RESCUED = '85'; // 'The underlying asset cannot be rescued' - string public constant ADDRESSES_PROVIDER_ALREADY_ADDED = '86'; // 'Reserve has already been added to reserve list' - string public constant POOL_ADDRESSES_DO_NOT_MATCH = '87'; // 'The token implementation pool address and the pool address provided by the initializing pool do not match' -- string public constant STABLE_BORROWING_ENABLED = '88'; // 'Stable borrowing is enabled' - string public constant SILOED_BORROWING_VIOLATION = '89'; // 'User is trying to borrow multiple assets including a siloed one' - string public constant RESERVE_DEBT_NOT_ZERO = '90'; // the total debt of the reserve needs to be 0 - string public constant FLASHLOAN_DISABLED = '91'; // FlashLoaning for this asset is disabled -+ string public constant INVALID_MAX_RATE = '92'; // The expect maximum borrow rate is invalid -+ string public constant WITHDRAW_TO_ATOKEN = '93'; // Withdrawing to the aToken is not allowed -+ string public constant SUPPLY_TO_ATOKEN = '94'; // Supplying to the aToken is not allowed -+ string public constant SLOPE_2_MUST_BE_GTE_SLOPE_1 = '95'; // Variable interest rate slope 2 can not be lower than slope 1 -+ string public constant CALLER_NOT_RISK_OR_POOL_OR_EMERGENCY_ADMIN = '96'; // 'The caller of the function is not a risk, pool or emergency admin' -+ string public constant LIQUIDATION_GRACE_SENTINEL_CHECK_FAILED = '97'; // 'Liquidation grace sentinel validation failed' -+ string public constant INVALID_GRACE_PERIOD = '98'; // Grace period above a valid range -+ string public constant INVALID_FREEZE_STATE = '99'; // Reserve is already in the passed freeze state -+ string public constant NOT_BORROWABLE_IN_EMODE = '100'; // Asset not borrowable in eMode - } - --// downloads/ARBITRUM/DEFAULT_VARIABLE_DEBT_TOKEN_IMPL/VariableDebtToken/lib/aave-v3-core/contracts/protocol/libraries/math/WadRayMath.sol -+// downloads/LINEA/DEFAULT_VARIABLE_DEBT_TOKEN_IMPL/VariableDebtTokenInstance/src/contracts/protocol/libraries/math/WadRayMath.sol - - /** - * @title WadRayMath library -@@ -1037,10 +1040,14 @@ library WadRayMath { - } - } - --// downloads/ARBITRUM/DEFAULT_VARIABLE_DEBT_TOKEN_IMPL/VariableDebtToken/lib/aave-v3-core/contracts/protocol/libraries/types/DataTypes.sol -+// downloads/LINEA/DEFAULT_VARIABLE_DEBT_TOKEN_IMPL/VariableDebtTokenInstance/src/contracts/protocol/libraries/types/DataTypes.sol - - library DataTypes { -- struct ReserveData { -+ /** -+ * This exists specifically to maintain the `getReserveData()` interface, since the new, internal -+ * `ReserveData` struct includes the reserve's `virtualUnderlyingBalance`. -+ */ -+ struct ReserveDataLegacy { - //stores the reserve configuration - ReserveConfigurationMap configuration; - //the liquidity index. Expressed in ray -@@ -1051,7 +1058,7 @@ library DataTypes { - uint128 variableBorrowIndex; - //the current variable borrow rate. Expressed in ray - uint128 currentVariableBorrowRate; -- //the current stable borrow rate. Expressed in ray -+ // DEPRECATED on v3.2.0 - uint128 currentStableBorrowRate; - //timestamp of last update - uint40 lastUpdateTimestamp; -@@ -1059,7 +1066,7 @@ library DataTypes { - uint16 id; - //aToken address - address aTokenAddress; -- //stableDebtToken address -+ // DEPRECATED on v3.2.0 - address stableDebtTokenAddress; - //variableDebtToken address - address variableDebtTokenAddress; -@@ -1073,6 +1080,43 @@ library DataTypes { - uint128 isolationModeTotalDebt; - } - -+ struct ReserveData { -+ //stores the reserve configuration -+ ReserveConfigurationMap configuration; -+ //the liquidity index. Expressed in ray -+ uint128 liquidityIndex; -+ //the current supply rate. Expressed in ray -+ uint128 currentLiquidityRate; -+ //variable borrow index. Expressed in ray -+ uint128 variableBorrowIndex; -+ //the current variable borrow rate. Expressed in ray -+ uint128 currentVariableBorrowRate; -+ // DEPRECATED on v3.2.0 -+ uint128 __deprecatedStableBorrowRate; -+ //timestamp of last update -+ uint40 lastUpdateTimestamp; -+ //the id of the reserve. Represents the position in the list of the active reserves -+ uint16 id; -+ //timestamp until when liquidations are not allowed on the reserve, if set to past liquidations will be allowed -+ uint40 liquidationGracePeriodUntil; -+ //aToken address -+ address aTokenAddress; -+ // DEPRECATED on v3.2.0 -+ address __deprecatedStableDebtTokenAddress; -+ //variableDebtToken address -+ address variableDebtTokenAddress; -+ //address of the interest rate strategy -+ address interestRateStrategyAddress; -+ //the current treasury balance, scaled -+ uint128 accruedToTreasury; -+ //the outstanding unbacked aTokens minted through the bridging feature -+ uint128 unbacked; -+ //the outstanding debt borrowed against this asset in isolation mode -+ uint128 isolationModeTotalDebt; -+ //the amount of underlying accounted for by the protocol -+ uint128 virtualUnderlyingBalance; -+ } -+ - struct ReserveConfigurationMap { - //bit 0-15: LTV - //bit 16-31: Liq. threshold -@@ -1081,18 +1125,20 @@ library DataTypes { - //bit 56: reserve is active - //bit 57: reserve is frozen - //bit 58: borrowing is enabled -- //bit 59: stable rate borrowing enabled -+ //bit 59: DEPRECATED: stable rate borrowing enabled - //bit 60: asset is paused - //bit 61: borrowing in isolation mode is enabled -- //bit 62-63: reserved -+ //bit 62: siloed borrowing enabled -+ //bit 63: flashloaning enabled - //bit 64-79: reserve factor -- //bit 80-115 borrow cap in whole tokens, borrowCap == 0 => no cap -- //bit 116-151 supply cap in whole tokens, supplyCap == 0 => no cap -- //bit 152-167 liquidation protocol fee -- //bit 168-175 eMode category -- //bit 176-211 unbacked mint cap in whole tokens, unbackedMintCap == 0 => minting disabled -- //bit 212-251 debt ceiling for isolation mode with (ReserveConfiguration::DEBT_CEILING_DECIMALS) decimals -- //bit 252-255 unused -+ //bit 80-115: borrow cap in whole tokens, borrowCap == 0 => no cap -+ //bit 116-151: supply cap in whole tokens, supplyCap == 0 => no cap -+ //bit 152-167: liquidation protocol fee -+ //bit 168-175: DEPRECATED: eMode category -+ //bit 176-211: unbacked mint cap in whole tokens, unbackedMintCap == 0 => minting disabled -+ //bit 212-251: debt ceiling for isolation mode with (ReserveConfiguration::DEBT_CEILING_DECIMALS) decimals -+ //bit 252: virtual accounting is enabled for the reserve -+ //bit 253-255 unused - - uint256 data; - } -@@ -1106,30 +1152,49 @@ library DataTypes { - uint256 data; - } - -- struct EModeCategory { -+ // DEPRECATED: kept for backwards compatibility, might be removed in a future version -+ struct EModeCategoryLegacy { - // each eMode category has a custom ltv and liquidation threshold - uint16 ltv; - uint16 liquidationThreshold; - uint16 liquidationBonus; -- // each eMode category may or may not have a custom oracle to override the individual assets price oracles -+ // DEPRECATED - address priceSource; - string label; - } - -+ struct CollateralConfig { -+ uint16 ltv; -+ uint16 liquidationThreshold; -+ uint16 liquidationBonus; -+ } -+ -+ struct EModeCategoryBaseConfiguration { -+ uint16 ltv; -+ uint16 liquidationThreshold; -+ uint16 liquidationBonus; -+ string label; -+ } -+ -+ struct EModeCategory { -+ // each eMode category has a custom ltv and liquidation threshold -+ uint16 ltv; -+ uint16 liquidationThreshold; -+ uint16 liquidationBonus; -+ uint128 collateralBitmap; -+ string label; -+ uint128 borrowableBitmap; -+ } -+ - enum InterestRateMode { - NONE, -- STABLE, -+ __DEPRECATED, - VARIABLE - } - - struct ReserveCache { - uint256 currScaledVariableDebt; - uint256 nextScaledVariableDebt; -- uint256 currPrincipalStableDebt; -- uint256 currAvgStableBorrowRate; -- uint256 currTotalStableDebt; -- uint256 nextAvgStableBorrowRate; -- uint256 nextTotalStableDebt; - uint256 currLiquidityIndex; - uint256 nextLiquidityIndex; - uint256 currVariableBorrowIndex; -@@ -1139,10 +1204,8 @@ library DataTypes { - uint256 reserveFactor; - ReserveConfigurationMap reserveConfiguration; - address aTokenAddress; -- address stableDebtTokenAddress; - address variableDebtTokenAddress; - uint40 reserveLastUpdateTimestamp; -- uint40 stableDebtLastUpdateTimestamp; - } - - struct ExecuteLiquidationCallParams { -@@ -1172,7 +1235,6 @@ library DataTypes { - InterestRateMode interestRateMode; - uint16 referralCode; - bool releaseUnderlying; -- uint256 maxStableRateBorrowSizePercent; - uint256 reservesCount; - address oracle; - uint8 userEModeCategory; -@@ -1224,9 +1286,9 @@ library DataTypes { - uint16 referralCode; - uint256 flashLoanPremiumToProtocol; - uint256 flashLoanPremiumTotal; -- uint256 maxStableRateBorrowSizePercent; - uint256 reservesCount; - address addressesProvider; -+ address pool; - uint8 userEModeCategory; - bool isAuthorizedFlashBorrower; - } -@@ -1265,7 +1327,6 @@ library DataTypes { - address userAddress; - uint256 amount; - InterestRateMode interestRateMode; -- uint256 maxStableLoanPercent; - uint256 reservesCount; - address oracle; - uint8 userEModeCategory; -@@ -1286,18 +1347,16 @@ library DataTypes { - uint256 unbacked; - uint256 liquidityAdded; - uint256 liquidityTaken; -- uint256 totalStableDebt; -- uint256 totalVariableDebt; -- uint256 averageStableBorrowRate; -+ uint256 totalDebt; - uint256 reserveFactor; - address reserve; -- address aToken; -+ bool usingVirtualBalance; -+ uint256 virtualUnderlyingBalance; - } - - struct InitReserveParams { - address asset; - address aTokenAddress; -- address stableDebtAddress; - address variableDebtAddress; - address interestRateStrategyAddress; - uint16 reservesCount; -@@ -1305,7 +1364,7 @@ library DataTypes { - } - } - --// downloads/ARBITRUM/DEFAULT_VARIABLE_DEBT_TOKEN_IMPL/VariableDebtToken/lib/aave-v3-core/contracts/protocol/tokenization/base/EIP712Base.sol -+// downloads/LINEA/DEFAULT_VARIABLE_DEBT_TOKEN_IMPL/VariableDebtTokenInstance/src/contracts/protocol/tokenization/base/EIP712Base.sol - - /** - * @title EIP712Base -@@ -1375,7 +1434,7 @@ abstract contract EIP712Base { - function _EIP712BaseId() internal view virtual returns (string memory); - } - --// downloads/ARBITRUM/DEFAULT_VARIABLE_DEBT_TOKEN_IMPL/VariableDebtToken/lib/aave-v3-core/contracts/dependencies/openzeppelin/contracts/IERC20Detailed.sol -+// downloads/LINEA/DEFAULT_VARIABLE_DEBT_TOKEN_IMPL/VariableDebtTokenInstance/src/contracts/dependencies/openzeppelin/contracts/IERC20Detailed.sol - - interface IERC20Detailed is IERC20 { - function name() external view returns (string memory); -@@ -1385,7 +1444,7 @@ interface IERC20Detailed is IERC20 { - function decimals() external view returns (uint8); - } - --// downloads/ARBITRUM/DEFAULT_VARIABLE_DEBT_TOKEN_IMPL/VariableDebtToken/lib/aave-v3-core/contracts/interfaces/IACLManager.sol -+// downloads/LINEA/DEFAULT_VARIABLE_DEBT_TOKEN_IMPL/VariableDebtTokenInstance/src/contracts/interfaces/IACLManager.sol - - /** - * @title IACLManager -@@ -1558,7 +1617,7 @@ interface IACLManager { - function isAssetListingAdmin(address admin) external view returns (bool); - } - --// downloads/ARBITRUM/DEFAULT_VARIABLE_DEBT_TOKEN_IMPL/VariableDebtToken/lib/aave-v3-core/contracts/interfaces/IPool.sol -+// downloads/LINEA/DEFAULT_VARIABLE_DEBT_TOKEN_IMPL/VariableDebtTokenInstance/src/contracts/interfaces/IPool.sol - - /** - * @title IPool -@@ -1623,7 +1682,7 @@ interface IPool { - * initiator of the transaction on flashLoan() - * @param onBehalfOf The address that will be getting the debt - * @param amount The amount borrowed out -- * @param interestRateMode The rate mode: 1 for Stable, 2 for Variable -+ * @param interestRateMode The rate mode: 2 for Variable, 1 is deprecated (changed on v3.2.0) - * @param borrowRate The numeric rate at which the user has borrowed, expressed in ray - * @param referralCode The referral code used - */ -@@ -1653,18 +1712,6 @@ interface IPool { - bool useATokens - ); - -- /** -- * @dev Emitted on swapBorrowRateMode() -- * @param reserve The address of the underlying asset of the reserve -- * @param user The address of the user swapping his rate mode -- * @param interestRateMode The current interest rate mode of the position being swapped: 1 for Stable, 2 for Variable -- */ -- event SwapBorrowRateMode( -- address indexed reserve, -- address indexed user, -- DataTypes.InterestRateMode interestRateMode -- ); -- - /** - * @dev Emitted on borrow(), repay() and liquidationCall() when using isolated assets - * @param asset The address of the underlying asset of the reserve -@@ -1693,20 +1740,14 @@ interface IPool { - */ - event ReserveUsedAsCollateralDisabled(address indexed reserve, address indexed user); - -- /** -- * @dev Emitted on rebalanceStableBorrowRate() -- * @param reserve The address of the underlying asset of the reserve -- * @param user The address of the user for which the rebalance has been executed -- */ -- event RebalanceStableBorrowRate(address indexed reserve, address indexed user); -- - /** - * @dev Emitted on flashLoan() - * @param target The address of the flash loan receiver contract - * @param initiator The address initiating the flash loan - * @param asset The address of the asset being flash borrowed - * @param amount The amount flash borrowed -- * @param interestRateMode The flashloan mode: 0 for regular flashloan, 1 for Stable debt, 2 for Variable debt -+ * @param interestRateMode The flashloan mode: 0 for regular flashloan, -+ * 1 for Stable (Deprecated on v3.2.0), 2 for Variable - * @param premium The fee flash borrowed - * @param referralCode The referral code used - */ -@@ -1745,7 +1786,7 @@ interface IPool { - * @dev Emitted when the state of a reserve is updated. - * @param reserve The address of the underlying asset of the reserve - * @param liquidityRate The next liquidity rate -- * @param stableBorrowRate The next stable borrow rate -+ * @param stableBorrowRate The next stable borrow rate @note deprecated on v3.2.0 - * @param variableBorrowRate The next variable borrow rate - * @param liquidityIndex The next liquidity index - * @param variableBorrowIndex The next variable borrow index -@@ -1844,13 +1885,12 @@ interface IPool { - - /** - * @notice Allows users to borrow a specific `amount` of the reserve underlying asset, provided that the borrower -- * already supplied enough collateral, or he was given enough allowance by a credit delegator on the -- * corresponding debt token (StableDebtToken or VariableDebtToken) -+ * already supplied enough collateral, or he was given enough allowance by a credit delegator on the VariableDebtToken - * - E.g. User borrows 100 USDC passing as `onBehalfOf` his own address, receiving the 100 USDC in his wallet -- * and 100 stable/variable debt tokens, depending on the `interestRateMode` -+ * and 100 variable debt tokens - * @param asset The address of the underlying asset to borrow - * @param amount The amount to be borrowed -- * @param interestRateMode The interest rate mode at which the user wants to borrow: 1 for Stable, 2 for Variable -+ * @param interestRateMode 2 for Variable, 1 is deprecated on v3.2.0 - * @param referralCode The code used to register the integrator originating the operation, for potential rewards. - * 0 if the action is executed directly by the user, without any middle-man - * @param onBehalfOf The address of the user who will receive the debt. Should be the address of the borrower itself -@@ -1867,11 +1907,11 @@ interface IPool { - - /** - * @notice Repays a borrowed `amount` on a specific reserve, burning the equivalent debt tokens owned -- * - E.g. User repays 100 USDC, burning 100 variable/stable debt tokens of the `onBehalfOf` address -+ * - E.g. User repays 100 USDC, burning 100 variable debt tokens of the `onBehalfOf` address - * @param asset The address of the borrowed underlying asset previously borrowed - * @param amount The amount to repay - * - Send the value type(uint256).max in order to repay the whole debt for `asset` on the specific `debtMode` -- * @param interestRateMode The interest rate mode at of the debt the user wants to repay: 1 for Stable, 2 for Variable -+ * @param interestRateMode 2 for Variable, 1 is deprecated on v3.2.0 - * @param onBehalfOf The address of the user who will get his debt reduced/removed. Should be the address of the - * user calling the function if he wants to reduce/remove his own debt, or the address of any other - * other borrower whose debt should be removed -@@ -1890,7 +1930,7 @@ interface IPool { - * @param asset The address of the borrowed underlying asset previously borrowed - * @param amount The amount to repay - * - Send the value type(uint256).max in order to repay the whole debt for `asset` on the specific `debtMode` -- * @param interestRateMode The interest rate mode at of the debt the user wants to repay: 1 for Stable, 2 for Variable -+ * @param interestRateMode 2 for Variable, 1 is deprecated on v3.2.0 - * @param onBehalfOf Address of the user who will get his debt reduced/removed. Should be the address of the - * user calling the function if he wants to reduce/remove his own debt, or the address of any other - * other borrower whose debt should be removed -@@ -1914,13 +1954,13 @@ interface IPool { - /** - * @notice Repays a borrowed `amount` on a specific reserve using the reserve aTokens, burning the - * equivalent debt tokens -- * - E.g. User repays 100 USDC using 100 aUSDC, burning 100 variable/stable debt tokens -+ * - E.g. User repays 100 USDC using 100 aUSDC, burning 100 variable debt tokens - * @dev Passing uint256.max as amount will clean up any residual aToken dust balance, if the user aToken - * balance is not enough to cover the whole debt - * @param asset The address of the borrowed underlying asset previously borrowed - * @param amount The amount to repay - * - Send the value type(uint256).max in order to repay the whole debt for `asset` on the specific `debtMode` -- * @param interestRateMode The interest rate mode at of the debt the user wants to repay: 1 for Stable, 2 for Variable -+ * @param interestRateMode DEPRECATED in v3.2.0 - * @return The final amount repaid - */ - function repayWithATokens( -@@ -1929,24 +1969,6 @@ interface IPool { - uint256 interestRateMode - ) external returns (uint256); - -- /** -- * @notice Allows a borrower to swap his debt between stable and variable mode, or vice versa -- * @param asset The address of the underlying asset borrowed -- * @param interestRateMode The current interest rate mode of the position being swapped: 1 for Stable, 2 for Variable -- */ -- function swapBorrowRateMode(address asset, uint256 interestRateMode) external; -- -- /** -- * @notice Rebalances the stable interest rate of a user to the current stable rate defined on the reserve. -- * - Users can be rebalanced if the following conditions are satisfied: -- * 1. Usage ratio is above 95% -- * 2. the current supply APY is below REBALANCE_UP_THRESHOLD * maxVariableBorrowRate, which means that too -- * much has been borrowed at a stable rate and suppliers are not earning enough -- * @param asset The address of the underlying asset borrowed -- * @param user The address of the user to be rebalanced -- */ -- function rebalanceStableBorrowRate(address asset, address user) external; -- - /** - * @notice Allows suppliers to enable/disable a specific supplied asset as collateral - * @param asset The address of the underlying asset supplied -@@ -1983,9 +2005,9 @@ interface IPool { - * @param amounts The amounts of the assets being flash-borrowed - * @param interestRateModes Types of the debt to open if the flash loan is not returned: - * 0 -> Don't open any debt, just revert if funds can't be transferred from the receiver -- * 1 -> Open debt at stable rate for the value of the amount flash-borrowed to the `onBehalfOf` address -+ * 1 -> Deprecated on v3.2.0 - * 2 -> Open debt at variable rate for the value of the amount flash-borrowed to the `onBehalfOf` address -- * @param onBehalfOf The address that will receive the debt in the case of using on `modes` 1 or 2 -+ * @param onBehalfOf The address that will receive the debt in the case of using 2 on `modes` - * @param params Variadic packed params to pass to the receiver as extra information - * @param referralCode The code used to register the integrator originating the operation, for potential rewards. - * 0 if the action is executed directly by the user, without any middle-man -@@ -2050,14 +2072,12 @@ interface IPool { - * @dev Only callable by the PoolConfigurator contract - * @param asset The address of the underlying asset of the reserve - * @param aTokenAddress The address of the aToken that will be assigned to the reserve -- * @param stableDebtAddress The address of the StableDebtToken that will be assigned to the reserve - * @param variableDebtAddress The address of the VariableDebtToken that will be assigned to the reserve - * @param interestRateStrategyAddress The address of the interest rate strategy contract - */ - function initReserve( - address asset, - address aTokenAddress, -- address stableDebtAddress, - address variableDebtAddress, - address interestRateStrategyAddress - ) external; -@@ -2065,6 +2085,7 @@ interface IPool { - /** - * @notice Drop a reserve - * @dev Only callable by the PoolConfigurator contract -+ * @dev Does not reset eMode flags, which must be considered when reusing the same reserve id for a different reserve. - * @param asset The address of the underlying asset of the reserve - */ - function dropReserve(address asset) external; -@@ -2080,6 +2101,22 @@ interface IPool { - address rateStrategyAddress - ) external; - -+ /** -+ * @notice Accumulates interest to all indexes of the reserve -+ * @dev Only callable by the PoolConfigurator contract -+ * @dev To be used when required by the configurator, for example when updating interest rates strategy data -+ * @param asset The address of the underlying asset of the reserve -+ */ -+ function syncIndexesState(address asset) external; -+ -+ /** -+ * @notice Updates interest rates on the reserve data -+ * @dev Only callable by the PoolConfigurator contract -+ * @dev To be used when required by the configurator, for example when updating interest rates strategy data -+ * @param asset The address of the underlying asset of the reserve -+ */ -+ function syncRatesState(address asset) external; -+ - /** - * @notice Sets the configuration bitmap of the reserve as a whole - * @dev Only callable by the PoolConfigurator contract -@@ -2135,7 +2172,24 @@ interface IPool { - * @param asset The address of the underlying asset of the reserve - * @return The state and configuration data of the reserve - */ -- function getReserveData(address asset) external view returns (DataTypes.ReserveData memory); -+ function getReserveData(address asset) external view returns (DataTypes.ReserveDataLegacy memory); -+ -+ /** -+ * @notice Returns the state and configuration of the reserve, including extra data included with Aave v3.1 -+ * @dev DEPRECATED use independent getters instead (getReserveData, getLiquidationGracePeriod) -+ * @param asset The address of the underlying asset of the reserve -+ * @return The state and configuration data of the reserve with virtual accounting -+ */ -+ function getReserveDataExtended( -+ address asset -+ ) external view returns (DataTypes.ReserveData memory); -+ -+ /** -+ * @notice Returns the virtual underlying balance of the reserve -+ * @param asset The address of the underlying asset of the reserve -+ * @return The reserve virtual underlying balance -+ */ -+ function getVirtualUnderlyingBalance(address asset) external view returns (uint128); - - /** - * @notice Validates and finalizes an aToken transfer -@@ -2163,6 +2217,13 @@ interface IPool { - */ - function getReservesList() external view returns (address[] memory); - -+ /** -+ * @notice Returns the number of initialized reserves -+ * @dev It includes dropped reserves -+ * @return The count -+ */ -+ function getReservesCount() external view returns (uint256); -+ - /** - * @notice Returns the address of the underlying asset of a reserve by the reserve id as stored in the DataTypes.ReserveData struct - * @param id The id of the reserve as stored in the DataTypes.ReserveData struct -@@ -2198,20 +2259,70 @@ interface IPool { - ) external; - - /** -- * @notice Configures a new category for the eMode. -+ * @notice Configures a new or alters an existing collateral configuration of an eMode. - * @dev In eMode, the protocol allows very high borrowing power to borrow assets of the same category. - * The category 0 is reserved as it's the default for volatile assets - * @param id The id of the category - * @param config The configuration of the category - */ -- function configureEModeCategory(uint8 id, DataTypes.EModeCategory memory config) external; -+ function configureEModeCategory( -+ uint8 id, -+ DataTypes.EModeCategoryBaseConfiguration memory config -+ ) external; -+ -+ /** -+ * @notice Replaces the current eMode collateralBitmap. -+ * @param id The id of the category -+ * @param collateralBitmap The collateralBitmap of the category -+ */ -+ function configureEModeCategoryCollateralBitmap(uint8 id, uint128 collateralBitmap) external; -+ -+ /** -+ * @notice Replaces the current eMode borrowableBitmap. -+ * @param id The id of the category -+ * @param borrowableBitmap The borrowableBitmap of the category -+ */ -+ function configureEModeCategoryBorrowableBitmap(uint8 id, uint128 borrowableBitmap) external; - - /** - * @notice Returns the data of an eMode category -+ * @dev DEPRECATED use independent getters instead - * @param id The id of the category - * @return The configuration data of the category - */ -- function getEModeCategoryData(uint8 id) external view returns (DataTypes.EModeCategory memory); -+ function getEModeCategoryData( -+ uint8 id -+ ) external view returns (DataTypes.EModeCategoryLegacy memory); -+ -+ /** -+ * @notice Returns the label of an eMode category -+ * @param id The id of the category -+ * @return The label of the category -+ */ -+ function getEModeCategoryLabel(uint8 id) external view returns (string memory); -+ -+ /** -+ * @notice Returns the collateral config of an eMode category -+ * @param id The id of the category -+ * @return The ltv,lt,lb of the category -+ */ -+ function getEModeCategoryCollateralConfig( -+ uint8 id -+ ) external view returns (DataTypes.CollateralConfig memory); -+ -+ /** -+ * @notice Returns the collateralBitmap of an eMode category -+ * @param id The id of the category -+ * @return The collateralBitmap of the category -+ */ -+ function getEModeCategoryCollateralBitmap(uint8 id) external view returns (uint128); -+ -+ /** -+ * @notice Returns the borrowableBitmap of an eMode category -+ * @param id The id of the category -+ * @return The borrowableBitmap of the category -+ */ -+ function getEModeCategoryBorrowableBitmap(uint8 id) external view returns (uint128); - - /** - * @notice Allows a user to use the protocol in eMode -@@ -2234,10 +2345,20 @@ interface IPool { - function resetIsolationModeTotalDebt(address asset) external; - - /** -- * @notice Returns the percentage of available liquidity that can be borrowed at once at stable rate -- * @return The percentage of available liquidity to borrow, expressed in bps -- */ -- function MAX_STABLE_RATE_BORROW_SIZE_PERCENT() external view returns (uint256); -+ * @notice Sets the liquidation grace period of the given asset -+ * @dev To enable a liquidation grace period, a timestamp in the future should be set, -+ * To disable a liquidation grace period, any timestamp in the past works, like 0 -+ * @param asset The address of the underlying asset to set the liquidationGracePeriod -+ * @param until Timestamp when the liquidation grace period will end -+ **/ -+ function setLiquidationGracePeriod(address asset, uint40 until) external; -+ -+ /** -+ * @notice Returns the liquidation grace period of the given asset -+ * @param asset The address of the underlying asset -+ * @return Timestamp when the liquidation grace period will end -+ **/ -+ function getLiquidationGracePeriod(address asset) external returns (uint40); - - /** - * @notice Returns the total fee on flash loans -@@ -2290,9 +2411,44 @@ interface IPool { - * 0 if the action is executed directly by the user, without any middle-man - */ - function deposit(address asset, uint256 amount, address onBehalfOf, uint16 referralCode) external; -+ -+ /** -+ * @notice Gets the address of the external FlashLoanLogic -+ */ -+ function getFlashLoanLogic() external view returns (address); -+ -+ /** -+ * @notice Gets the address of the external BorrowLogic -+ */ -+ function getBorrowLogic() external view returns (address); -+ -+ /** -+ * @notice Gets the address of the external BridgeLogic -+ */ -+ function getBridgeLogic() external view returns (address); -+ -+ /** -+ * @notice Gets the address of the external EModeLogic -+ */ -+ function getEModeLogic() external view returns (address); -+ -+ /** -+ * @notice Gets the address of the external LiquidationLogic -+ */ -+ function getLiquidationLogic() external view returns (address); -+ -+ /** -+ * @notice Gets the address of the external PoolLogic -+ */ -+ function getPoolLogic() external view returns (address); -+ -+ /** -+ * @notice Gets the address of the external SupplyLogic -+ */ -+ function getSupplyLogic() external view returns (address); - } - --// downloads/ARBITRUM/DEFAULT_VARIABLE_DEBT_TOKEN_IMPL/VariableDebtToken/lib/aave-v3-core/contracts/interfaces/IInitializableDebtToken.sol -+// downloads/LINEA/DEFAULT_VARIABLE_DEBT_TOKEN_IMPL/VariableDebtTokenInstance/src/contracts/interfaces/IInitializableDebtToken.sol - - /** - * @title IInitializableDebtToken -@@ -2341,12 +2497,12 @@ interface IInitializableDebtToken { - ) external; - } - --// downloads/ARBITRUM/DEFAULT_VARIABLE_DEBT_TOKEN_IMPL/VariableDebtToken/lib/aave-v3-core/contracts/protocol/tokenization/base/DebtTokenBase.sol -+// downloads/LINEA/DEFAULT_VARIABLE_DEBT_TOKEN_IMPL/VariableDebtTokenInstance/src/contracts/protocol/tokenization/base/DebtTokenBase.sol - - /** - * @title DebtTokenBase - * @author Aave -- * @notice Base contract for different types of debt tokens, like StableDebtToken or VariableDebtToken -+ * @notice Base contract for different types of debt tokens, like VariableDebtToken - */ - abstract contract DebtTokenBase is - VersionedInitializable, -@@ -2437,7 +2593,7 @@ abstract contract DebtTokenBase is - } - } - --// downloads/ARBITRUM/DEFAULT_VARIABLE_DEBT_TOKEN_IMPL/VariableDebtToken/lib/aave-v3-core/contracts/interfaces/IVariableDebtToken.sol -+// downloads/LINEA/DEFAULT_VARIABLE_DEBT_TOKEN_IMPL/VariableDebtTokenInstance/src/contracts/interfaces/IVariableDebtToken.sol - - /** - * @title IVariableDebtToken -@@ -2480,7 +2636,7 @@ interface IVariableDebtToken is IScaledBalanceToken, IInitializableDebtToken { - function UNDERLYING_ASSET_ADDRESS() external view returns (address); - } - + -// downloads/ARBITRUM/DEFAULT_VARIABLE_DEBT_TOKEN_IMPL/VariableDebtToken/lib/aave-v3-core/contracts/protocol/tokenization/base/IncentivizedERC20.sol +// downloads/LINEA/DEFAULT_VARIABLE_DEBT_TOKEN_IMPL/VariableDebtTokenInstance/src/contracts/protocol/tokenization/base/IncentivizedERC20.sol - + /** * @title IncentivizedERC20 @@ -2511,8 +2667,7 @@ abstract contract IncentivizedERC20 is Context, IERC20Detailed { @@ -851,32 +41,14 @@ index d6d70f1..1be027a 100644 + _decimals = decimals_; POOL = pool; } - + @@ -2704,7 +2859,7 @@ abstract contract IncentivizedERC20 is Context, IERC20Detailed { } } - --// downloads/ARBITRUM/DEFAULT_VARIABLE_DEBT_TOKEN_IMPL/VariableDebtToken/lib/aave-v3-core/contracts/protocol/tokenization/base/MintableIncentivizedERC20.sol -+// downloads/LINEA/DEFAULT_VARIABLE_DEBT_TOKEN_IMPL/VariableDebtTokenInstance/src/contracts/protocol/tokenization/base/MintableIncentivizedERC20.sol - - /** - * @title MintableIncentivizedERC20 -@@ -2766,7 +2921,7 @@ abstract contract MintableIncentivizedERC20 is IncentivizedERC20 { - } - } - --// downloads/ARBITRUM/DEFAULT_VARIABLE_DEBT_TOKEN_IMPL/VariableDebtToken/lib/aave-v3-core/contracts/protocol/tokenization/base/ScaledBalanceTokenBase.sol -+// downloads/LINEA/DEFAULT_VARIABLE_DEBT_TOKEN_IMPL/VariableDebtTokenInstance/src/contracts/protocol/tokenization/base/ScaledBalanceTokenBase.sol - - /** - * @title ScaledBalanceTokenBase -@@ -2915,7 +3070,7 @@ abstract contract ScaledBalanceTokenBase is MintableIncentivizedERC20, IScaledBa - } - } - + -// downloads/ARBITRUM/DEFAULT_VARIABLE_DEBT_TOKEN_IMPL/VariableDebtToken/lib/aave-v3-core/contracts/protocol/tokenization/VariableDebtToken.sol +// downloads/LINEA/DEFAULT_VARIABLE_DEBT_TOKEN_IMPL/VariableDebtTokenInstance/src/contracts/protocol/tokenization/VariableDebtToken.sol - + /** * @title VariableDebtToken @@ -2924,12 +3079,10 @@ abstract contract ScaledBalanceTokenBase is MintableIncentivizedERC20, IScaledBa @@ -887,7 +59,7 @@ index d6d70f1..1be027a 100644 +abstract contract VariableDebtToken is DebtTokenBase, ScaledBalanceTokenBase, IVariableDebtToken { using WadRayMath for uint256; using SafeCast for uint256; - + - uint256 public constant DEBT_TOKEN_REVISION = 0x2; - /** @@ -924,7 +96,7 @@ index d6d70f1..1be027a 100644 - return DEBT_TOKEN_REVISION; - } + ) external virtual; - + /// @inheritdoc IERC20 function balanceOf(address user) public view virtual override returns (uint256) { @@ -3056,3 +3184,47 @@ contract VariableDebtToken is DebtTokenBase, ScaledBalanceTokenBase, IVariableDe diff --git a/diffs/ARBITRUM_LINEA/EMISSION_MANAGER_DIFF.md b/diffs/ARBITRUM_LINEA/EMISSION_MANAGER_DIFF.md index 6c294aca..b1110bfc 100644 --- a/diffs/ARBITRUM_LINEA/EMISSION_MANAGER_DIFF.md +++ b/diffs/ARBITRUM_LINEA/EMISSION_MANAGER_DIFF.md @@ -3,39 +3,16 @@ diff --git a/./downloads/ARBITRUM/EMISSION_MANAGER.sol b/./downloads/LINEA/EMISS index be75e57..9de846c 100644 --- a/./downloads/ARBITRUM/EMISSION_MANAGER.sol +++ b/./downloads/LINEA/EMISSION_MANAGER.sol -@@ -1,7 +1,7 @@ --// SPDX-License-Identifier: agpl-3.0 --pragma solidity =0.8.10; -+// SPDX-License-Identifier: BUSL-1.1 -+pragma solidity ^0.8.10; - --// downloads/ARBITRUM/EMISSION_MANAGER/EmissionManager/@aave/core-v3/contracts/dependencies/openzeppelin/contracts/Context.sol -+// downloads/LINEA/EMISSION_MANAGER/EmissionManager/src/contracts/dependencies/openzeppelin/contracts/Context.sol - - /* - * @dev Provides information about the current execution context, including the -@@ -24,7 +24,7 @@ abstract contract Context { - } - } - --// downloads/ARBITRUM/EMISSION_MANAGER/EmissionManager/@aave/periphery-v3/contracts/misc/interfaces/IEACAggregatorProxy.sol -+// downloads/LINEA/EMISSION_MANAGER/EmissionManager/src/contracts/helpers/interfaces/IEACAggregatorProxy.sol - - interface IEACAggregatorProxy { - function decimals() external view returns (uint8); -@@ -43,7 +43,7 @@ interface IEACAggregatorProxy { - event NewRound(uint256 indexed roundId, address indexed startedBy); - } - + -// downloads/ARBITRUM/EMISSION_MANAGER/EmissionManager/@aave/periphery-v3/contracts/rewards/interfaces/IRewardsDistributor.sol +// downloads/LINEA/EMISSION_MANAGER/EmissionManager/src/contracts/rewards/interfaces/IRewardsDistributor.sol - + /** * @title IRewardsDistributor @@ -89,16 +89,6 @@ interface IRewardsDistributor { uint256 rewardsAccrued ); - + - /** - * @dev Emitted when the emission manager address is updated. - * @param oldEmissionManager The address of the old emission manager @@ -52,7 +29,7 @@ index be75e57..9de846c 100644 @@ -154,6 +144,15 @@ interface IRewardsDistributor { address reward ) external view returns (uint256, uint256, uint256, uint256); - + + /** + * @dev Calculates the next value of an specific distribution index, with validations. + * @param asset The incentivized asset @@ -84,74 +61,15 @@ index be75e57..9de846c 100644 - */ - function setEmissionManager(address emissionManager) external; } - --// downloads/ARBITRUM/EMISSION_MANAGER/EmissionManager/@aave/periphery-v3/contracts/rewards/interfaces/ITransferStrategyBase.sol -+// downloads/LINEA/EMISSION_MANAGER/EmissionManager/src/contracts/rewards/interfaces/ITransferStrategyBase.sol - - interface ITransferStrategyBase { - event EmergencyWithdrawal( -@@ -258,7 +258,7 @@ interface ITransferStrategyBase { - function emergencyWithdrawal(address token, address to, uint256 amount) external; - } - --// downloads/ARBITRUM/EMISSION_MANAGER/EmissionManager/@aave/core-v3/contracts/dependencies/openzeppelin/contracts/Ownable.sol -+// downloads/LINEA/EMISSION_MANAGER/EmissionManager/src/contracts/dependencies/openzeppelin/contracts/Ownable.sol - - /** - * @dev Contract module which provides a basic access control mechanism, where -@@ -324,7 +324,7 @@ contract Ownable is Context { - } - } - --// downloads/ARBITRUM/EMISSION_MANAGER/EmissionManager/@aave/periphery-v3/contracts/rewards/libraries/RewardsDataTypes.sol -+// downloads/LINEA/EMISSION_MANAGER/EmissionManager/src/contracts/rewards/libraries/RewardsDataTypes.sol - - library RewardsDataTypes { - struct RewardsConfigInput { -@@ -344,27 +344,38 @@ library RewardsDataTypes { - } - - struct UserData { -- uint104 index; // matches reward index -+ // Liquidity index of the reward distribution for the user -+ uint104 index; -+ // Amount of accrued rewards for the user since last user index update - uint128 accrued; - } - - struct RewardData { -+ // Liquidity index of the reward distribution - uint104 index; -+ // Amount of reward tokens distributed per second - uint88 emissionPerSecond; -+ // Timestamp of the last reward index update - uint32 lastUpdateTimestamp; -+ // The end of the distribution of rewards (in seconds) - uint32 distributionEnd; -+ // Map of user addresses and their rewards data (userAddress => userData) - mapping(address => UserData) usersData; - } - - struct AssetData { -+ // Map of reward token addresses and their data (rewardTokenAddress => rewardData) - mapping(address => RewardData) rewards; -+ // List of reward token addresses for the asset - mapping(uint128 => address) availableRewards; -+ // Count of reward tokens for the asset - uint128 availableRewardsCount; -+ // Number of decimals of the asset - uint8 decimals; - } - } - + -// downloads/ARBITRUM/EMISSION_MANAGER/EmissionManager/@aave/periphery-v3/contracts/rewards/interfaces/IRewardsController.sol +// downloads/LINEA/EMISSION_MANAGER/EmissionManager/src/contracts/rewards/interfaces/IRewardsController.sol - + /** * @title IRewardsController @@ -470,12 +481,13 @@ interface IRewardsController is IRewardsDistributor { function configureAssets(RewardsDataTypes.RewardsConfigInput[] memory config) external; - + /** - * @dev Called by the corresponding asset on any update that affects the rewards distribution - * @param user The address of the user @@ -165,22 +83,22 @@ index be75e57..9de846c 100644 **/ - function handleAction(address user, uint256 userBalance, uint256 totalSupply) external; + function handleAction(address user, uint256 totalSupply, uint256 userBalance) external; - + /** * @dev Claims reward for a user to the desired address, on all the assets of the pool, accumulating the pending rewards @@ -561,7 +573,7 @@ interface IRewardsController is IRewardsDistributor { ) external returns (address[] memory rewardsList, uint256[] memory claimedAmounts); } - + -// downloads/ARBITRUM/EMISSION_MANAGER/EmissionManager/@aave/periphery-v3/contracts/rewards/interfaces/IEmissionManager.sol +// downloads/LINEA/EMISSION_MANAGER/EmissionManager/src/contracts/rewards/interfaces/IEmissionManager.sol - + /** * @title IEmissionManager @@ -645,13 +657,6 @@ interface IEmissionManager { */ function setClaimer(address user, address claimer) external; - + - /** - * @dev Updates the address of the emission manager - * @dev Only callable by the owner of the EmissionManager @@ -194,14 +112,14 @@ index be75e57..9de846c 100644 @@ -681,7 +686,7 @@ interface IEmissionManager { function getEmissionAdmin(address reward) external view returns (address); } - + -// downloads/ARBITRUM/EMISSION_MANAGER/EmissionManager/@aave/periphery-v3/contracts/rewards/EmissionManager.sol +// downloads/LINEA/EMISSION_MANAGER/EmissionManager/src/contracts/rewards/EmissionManager.sol - + /** * @title EmissionManager @@ -704,11 +709,9 @@ contract EmissionManager is Ownable, IEmissionManager { - + /** * Constructor. - * @param controller The address of the RewardsController contract @@ -212,11 +130,11 @@ index be75e57..9de846c 100644 + constructor(address owner) { transferOwnership(owner); } - + @@ -762,11 +765,6 @@ contract EmissionManager is Ownable, IEmissionManager { _rewardsController.setClaimer(user, claimer); } - + - /// @inheritdoc IEmissionManager - function setEmissionManager(address emissionManager) external override onlyOwner { - _rewardsController.setEmissionManager(emissionManager); diff --git a/diffs/ARBITRUM_LINEA/EMODE_LOGIC_DIFF.md b/diffs/ARBITRUM_LINEA/EMODE_LOGIC_DIFF.md index 4cf04f31..f963d2e5 100644 --- a/diffs/ARBITRUM_LINEA/EMODE_LOGIC_DIFF.md +++ b/diffs/ARBITRUM_LINEA/EMODE_LOGIC_DIFF.md @@ -3,317 +3,5 @@ diff --git a/./downloads/ARBITRUM/EMODE_LOGIC.sol b/./downloads/LINEA/EMODE_LOGI index 38363c8..948a894 100644 --- a/./downloads/ARBITRUM/EMODE_LOGIC.sol +++ b/./downloads/LINEA/EMODE_LOGIC.sol -@@ -1,7 +1,7 @@ - // SPDX-License-Identifier: BUSL-1.1 - pragma solidity ^0.8.0 ^0.8.10; - --// downloads/ARBITRUM/EMODE_LOGIC/EModeLogic/src/contracts/dependencies/openzeppelin/contracts/Address.sol -+// downloads/LINEA/EMODE_LOGIC/EModeLogic/src/contracts/dependencies/openzeppelin/contracts/Address.sol - - // OpenZeppelin Contracts v4.4.1 (utils/Address.sol) - -@@ -221,7 +221,7 @@ library Address { - } - } - --// downloads/ARBITRUM/EMODE_LOGIC/EModeLogic/src/contracts/dependencies/openzeppelin/contracts/Context.sol -+// downloads/LINEA/EMODE_LOGIC/EModeLogic/src/contracts/dependencies/openzeppelin/contracts/Context.sol - - /* - * @dev Provides information about the current execution context, including the -@@ -244,7 +244,7 @@ abstract contract Context { - } - } - --// downloads/ARBITRUM/EMODE_LOGIC/EModeLogic/src/contracts/dependencies/openzeppelin/contracts/IAccessControl.sol -+// downloads/LINEA/EMODE_LOGIC/EModeLogic/src/contracts/dependencies/openzeppelin/contracts/IAccessControl.sol - - /** - * @dev External interface of AccessControl declared to support ERC165 detection. -@@ -334,7 +334,7 @@ interface IAccessControl { - function renounceRole(bytes32 role, address account) external; - } - --// downloads/ARBITRUM/EMODE_LOGIC/EModeLogic/src/contracts/dependencies/openzeppelin/contracts/IERC20.sol -+// downloads/LINEA/EMODE_LOGIC/EModeLogic/src/contracts/dependencies/openzeppelin/contracts/IERC20.sol - - /** - * @dev Interface of the ERC20 standard as defined in the EIP. -@@ -410,7 +410,7 @@ interface IERC20 { - event Approval(address indexed owner, address indexed spender, uint256 value); - } - --// downloads/ARBITRUM/EMODE_LOGIC/EModeLogic/src/contracts/dependencies/openzeppelin/contracts/SafeCast.sol -+// downloads/LINEA/EMODE_LOGIC/EModeLogic/src/contracts/dependencies/openzeppelin/contracts/SafeCast.sol - - // OpenZeppelin Contracts v4.4.1 (utils/math/SafeCast.sol) - -@@ -666,7 +666,7 @@ library SafeCast { - } - } - --// downloads/ARBITRUM/EMODE_LOGIC/EModeLogic/src/contracts/interfaces/IAaveIncentivesController.sol -+// downloads/LINEA/EMODE_LOGIC/EModeLogic/src/contracts/interfaces/IAaveIncentivesController.sol - - /** - * @title IAaveIncentivesController -@@ -685,7 +685,7 @@ interface IAaveIncentivesController { - function handleAction(address user, uint256 totalSupply, uint256 userBalance) external; - } - --// downloads/ARBITRUM/EMODE_LOGIC/EModeLogic/src/contracts/interfaces/IPoolAddressesProvider.sol -+// downloads/LINEA/EMODE_LOGIC/EModeLogic/src/contracts/interfaces/IPoolAddressesProvider.sol - - /** - * @title IPoolAddressesProvider -@@ -912,7 +912,7 @@ interface IPoolAddressesProvider { - function setPoolDataProvider(address newDataProvider) external; - } - --// downloads/ARBITRUM/EMODE_LOGIC/EModeLogic/src/contracts/interfaces/IPriceOracleGetter.sol -+// downloads/LINEA/EMODE_LOGIC/EModeLogic/src/contracts/interfaces/IPriceOracleGetter.sol - - /** - * @title IPriceOracleGetter -@@ -942,7 +942,7 @@ interface IPriceOracleGetter { - function getAssetPrice(address asset) external view returns (uint256); - } - --// downloads/ARBITRUM/EMODE_LOGIC/EModeLogic/src/contracts/interfaces/IScaledBalanceToken.sol -+// downloads/LINEA/EMODE_LOGIC/EModeLogic/src/contracts/interfaces/IScaledBalanceToken.sol - - /** - * @title IScaledBalanceToken -@@ -1014,7 +1014,7 @@ interface IScaledBalanceToken { - function getPreviousIndex(address user) external view returns (uint256); - } - --// downloads/ARBITRUM/EMODE_LOGIC/EModeLogic/src/contracts/protocol/libraries/helpers/Errors.sol -+// downloads/LINEA/EMODE_LOGIC/EModeLogic/src/contracts/protocol/libraries/helpers/Errors.sol - - /** - * @title Errors library -@@ -1117,7 +1117,7 @@ library Errors { - string public constant NOT_BORROWABLE_IN_EMODE = '100'; // Asset not borrowable in eMode - } - --// downloads/ARBITRUM/EMODE_LOGIC/EModeLogic/src/contracts/protocol/libraries/math/PercentageMath.sol -+// downloads/LINEA/EMODE_LOGIC/EModeLogic/src/contracts/protocol/libraries/math/PercentageMath.sol - - /** - * @title PercentageMath library -@@ -1178,7 +1178,7 @@ library PercentageMath { - } - } - --// downloads/ARBITRUM/EMODE_LOGIC/EModeLogic/src/contracts/protocol/libraries/math/WadRayMath.sol -+// downloads/LINEA/EMODE_LOGIC/EModeLogic/src/contracts/protocol/libraries/math/WadRayMath.sol - - /** - * @title WadRayMath library -@@ -1304,7 +1304,7 @@ library WadRayMath { - } - } - --// downloads/ARBITRUM/EMODE_LOGIC/EModeLogic/src/contracts/protocol/libraries/types/DataTypes.sol -+// downloads/LINEA/EMODE_LOGIC/EModeLogic/src/contracts/protocol/libraries/types/DataTypes.sol - - library DataTypes { - /** -@@ -1628,7 +1628,7 @@ library DataTypes { - } - } - --// downloads/ARBITRUM/EMODE_LOGIC/EModeLogic/src/contracts/dependencies/gnosis/contracts/GPv2SafeERC20.sol -+// downloads/LINEA/EMODE_LOGIC/EModeLogic/src/contracts/dependencies/gnosis/contracts/GPv2SafeERC20.sol - - /// @title Gnosis Protocol v2 Safe ERC20 Transfer Library - /// @author Gnosis Developers -@@ -1741,7 +1741,7 @@ library GPv2SafeERC20 { - } - } - --// downloads/ARBITRUM/EMODE_LOGIC/EModeLogic/src/contracts/dependencies/openzeppelin/contracts/IERC20Detailed.sol -+// downloads/LINEA/EMODE_LOGIC/EModeLogic/src/contracts/dependencies/openzeppelin/contracts/IERC20Detailed.sol - - interface IERC20Detailed is IERC20 { - function name() external view returns (string memory); -@@ -1751,7 +1751,7 @@ interface IERC20Detailed is IERC20 { - function decimals() external view returns (uint8); - } - --// downloads/ARBITRUM/EMODE_LOGIC/EModeLogic/src/contracts/interfaces/IACLManager.sol -+// downloads/LINEA/EMODE_LOGIC/EModeLogic/src/contracts/interfaces/IACLManager.sol - - /** - * @title IACLManager -@@ -1924,7 +1924,7 @@ interface IACLManager { - function isAssetListingAdmin(address admin) external view returns (bool); - } - --// downloads/ARBITRUM/EMODE_LOGIC/EModeLogic/src/contracts/interfaces/IPriceOracleSentinel.sol -+// downloads/LINEA/EMODE_LOGIC/EModeLogic/src/contracts/interfaces/IPriceOracleSentinel.sol - - /** - * @title IPriceOracleSentinel -@@ -1989,7 +1989,7 @@ interface IPriceOracleSentinel { - function getGracePeriod() external view returns (uint256); - } - --// downloads/ARBITRUM/EMODE_LOGIC/EModeLogic/src/contracts/interfaces/IReserveInterestRateStrategy.sol -+// downloads/LINEA/EMODE_LOGIC/EModeLogic/src/contracts/interfaces/IReserveInterestRateStrategy.sol - - /** - * @title IReserveInterestRateStrategy -@@ -2016,7 +2016,7 @@ interface IReserveInterestRateStrategy { - ) external view returns (uint256, uint256); - } - --// downloads/ARBITRUM/EMODE_LOGIC/EModeLogic/src/contracts/protocol/libraries/math/MathUtils.sol -+// downloads/LINEA/EMODE_LOGIC/EModeLogic/src/contracts/protocol/libraries/math/MathUtils.sol - - /** - * @title MathUtils library -@@ -2113,7 +2113,7 @@ library MathUtils { - } - } - --// downloads/ARBITRUM/EMODE_LOGIC/EModeLogic/src/contracts/interfaces/IPool.sol -+// downloads/LINEA/EMODE_LOGIC/EModeLogic/src/contracts/interfaces/IPool.sol - - /** - * @title IPool -@@ -2672,6 +2672,7 @@ interface IPool { - - /** - * @notice Returns the state and configuration of the reserve, including extra data included with Aave v3.1 -+ * @dev DEPRECATED use independent getters instead (getReserveData, getLiquidationGracePeriod) - * @param asset The address of the underlying asset of the reserve - * @return The state and configuration data of the reserve with virtual accounting - */ -@@ -2943,7 +2944,7 @@ interface IPool { - function getSupplyLogic() external view returns (address); - } - --// downloads/ARBITRUM/EMODE_LOGIC/EModeLogic/src/contracts/protocol/libraries/configuration/ReserveConfiguration.sol -+// downloads/LINEA/EMODE_LOGIC/EModeLogic/src/contracts/protocol/libraries/configuration/ReserveConfiguration.sol - - /** - * @title ReserveConfiguration library -@@ -2958,6 +2959,7 @@ library ReserveConfiguration { - uint256 internal constant ACTIVE_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFF; // prettier-ignore - uint256 internal constant FROZEN_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFDFFFFFFFFFFFFFF; // prettier-ignore - uint256 internal constant BORROWING_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFBFFFFFFFFFFFFFF; // prettier-ignore -+ // @notice there is an unoccupied hole of 1 bit at position 59 from pre 3.2 stableBorrowRateEnabled - uint256 internal constant PAUSED_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFF; // prettier-ignore - uint256 internal constant BORROWABLE_IN_ISOLATION_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFDFFFFFFFFFFFFFFF; // prettier-ignore - uint256 internal constant SILOED_BORROWING_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFBFFFFFFFFFFFFFFF; // prettier-ignore -@@ -2966,7 +2968,7 @@ library ReserveConfiguration { - uint256 internal constant BORROW_CAP_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000FFFFFFFFFFFFFFFFFFFF; // prettier-ignore - uint256 internal constant SUPPLY_CAP_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFF000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFF; // prettier-ignore - uint256 internal constant LIQUIDATION_PROTOCOL_FEE_MASK = 0xFFFFFFFFFFFFFFFFFFFFFF0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF; // prettier-ignore -- //@notice there is an unoccupied hole of 8 bits from 168 to 176 left from pre 3.2 eModeCategory -+ // @notice there is an unoccupied hole of 8 bits from 168 to 176 left from pre 3.2 eModeCategory - uint256 internal constant UNBACKED_MINT_CAP_MASK = 0xFFFFFFFFFFF000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF; // prettier-ignore - uint256 internal constant DEBT_CEILING_MASK = 0xF0000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF; // prettier-ignore - uint256 internal constant VIRTUAL_ACC_ACTIVE_MASK = 0xEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF; // prettier-ignore -@@ -3523,7 +3525,7 @@ library ReserveConfiguration { - } - } - --// downloads/ARBITRUM/EMODE_LOGIC/EModeLogic/src/contracts/protocol/libraries/configuration/EModeConfiguration.sol -+// downloads/LINEA/EMODE_LOGIC/EModeLogic/src/contracts/protocol/libraries/configuration/EModeConfiguration.sol - - /** - * @title EModeConfiguration library -@@ -3572,7 +3574,7 @@ library EModeConfiguration { - } - } - --// downloads/ARBITRUM/EMODE_LOGIC/EModeLogic/src/contracts/protocol/libraries/configuration/UserConfiguration.sol -+// downloads/LINEA/EMODE_LOGIC/EModeLogic/src/contracts/protocol/libraries/configuration/UserConfiguration.sol - - /** - * @title UserConfiguration library -@@ -3804,7 +3806,7 @@ library UserConfiguration { - } - } - --// downloads/ARBITRUM/EMODE_LOGIC/EModeLogic/src/contracts/interfaces/IInitializableAToken.sol -+// downloads/LINEA/EMODE_LOGIC/EModeLogic/src/contracts/interfaces/IInitializableAToken.sol - - /** - * @title IInitializableAToken -@@ -3857,7 +3859,7 @@ interface IInitializableAToken { - ) external; - } - --// downloads/ARBITRUM/EMODE_LOGIC/EModeLogic/src/contracts/interfaces/IInitializableDebtToken.sol -+// downloads/LINEA/EMODE_LOGIC/EModeLogic/src/contracts/interfaces/IInitializableDebtToken.sol - - /** - * @title IInitializableDebtToken -@@ -3906,7 +3908,7 @@ interface IInitializableDebtToken { - ) external; - } - --// downloads/ARBITRUM/EMODE_LOGIC/EModeLogic/src/contracts/interfaces/IVariableDebtToken.sol -+// downloads/LINEA/EMODE_LOGIC/EModeLogic/src/contracts/interfaces/IVariableDebtToken.sol - - /** - * @title IVariableDebtToken -@@ -3949,7 +3951,7 @@ interface IVariableDebtToken is IScaledBalanceToken, IInitializableDebtToken { - function UNDERLYING_ASSET_ADDRESS() external view returns (address); - } - --// downloads/ARBITRUM/EMODE_LOGIC/EModeLogic/src/contracts/interfaces/IAToken.sol -+// downloads/LINEA/EMODE_LOGIC/EModeLogic/src/contracts/interfaces/IAToken.sol - - /** - * @title IAToken -@@ -4083,7 +4085,7 @@ interface IAToken is IERC20, IScaledBalanceToken, IInitializableAToken { - function rescueTokens(address token, address to, uint256 amount) external; - } - --// downloads/ARBITRUM/EMODE_LOGIC/EModeLogic/src/contracts/protocol/tokenization/base/IncentivizedERC20.sol -+// downloads/LINEA/EMODE_LOGIC/EModeLogic/src/contracts/protocol/tokenization/base/IncentivizedERC20.sol - - /** - * @title IncentivizedERC20 -@@ -4306,7 +4308,7 @@ abstract contract IncentivizedERC20 is Context, IERC20Detailed { - } - } - --// downloads/ARBITRUM/EMODE_LOGIC/EModeLogic/src/contracts/protocol/libraries/logic/ReserveLogic.sol -+// downloads/LINEA/EMODE_LOGIC/EModeLogic/src/contracts/protocol/libraries/logic/ReserveLogic.sol - - /** - * @title ReserveLogic library -@@ -4607,7 +4609,7 @@ library ReserveLogic { - } - } - --// downloads/ARBITRUM/EMODE_LOGIC/EModeLogic/src/contracts/protocol/libraries/logic/GenericLogic.sol -+// downloads/LINEA/EMODE_LOGIC/EModeLogic/src/contracts/protocol/libraries/logic/GenericLogic.sol - - /** - * @title GenericLogic library -@@ -4851,7 +4853,7 @@ library GenericLogic { - } - } - --// downloads/ARBITRUM/EMODE_LOGIC/EModeLogic/src/contracts/protocol/libraries/logic/ValidationLogic.sol -+// downloads/LINEA/EMODE_LOGIC/EModeLogic/src/contracts/protocol/libraries/logic/ValidationLogic.sol - - /** - * @title ReserveLogic library -@@ -5471,7 +5473,7 @@ library ValidationLogic { - } - } - --// downloads/ARBITRUM/EMODE_LOGIC/EModeLogic/src/contracts/protocol/libraries/logic/EModeLogic.sol -+// downloads/LINEA/EMODE_LOGIC/EModeLogic/src/contracts/protocol/libraries/logic/EModeLogic.sol - - /** - * @title EModeLogic library + ``` diff --git a/diffs/ARBITRUM_LINEA/FLASHLOAN_LOGIC_DIFF.md b/diffs/ARBITRUM_LINEA/FLASHLOAN_LOGIC_DIFF.md index 320bbb60..224aed39 100644 --- a/diffs/ARBITRUM_LINEA/FLASHLOAN_LOGIC_DIFF.md +++ b/diffs/ARBITRUM_LINEA/FLASHLOAN_LOGIC_DIFF.md @@ -3,362 +3,5 @@ diff --git a/./downloads/ARBITRUM/FLASHLOAN_LOGIC.sol b/./downloads/LINEA/FLASHL index 35feed8..639a33a 100644 --- a/./downloads/ARBITRUM/FLASHLOAN_LOGIC.sol +++ b/./downloads/LINEA/FLASHLOAN_LOGIC.sol -@@ -1,7 +1,7 @@ - // SPDX-License-Identifier: BUSL-1.1 - pragma solidity ^0.8.0 ^0.8.10; - --// downloads/ARBITRUM/FLASHLOAN_LOGIC/FlashLoanLogic/src/contracts/dependencies/openzeppelin/contracts/Address.sol -+// downloads/LINEA/FLASHLOAN_LOGIC/FlashLoanLogic/src/contracts/dependencies/openzeppelin/contracts/Address.sol - - // OpenZeppelin Contracts v4.4.1 (utils/Address.sol) - -@@ -221,7 +221,7 @@ library Address { - } - } - --// downloads/ARBITRUM/FLASHLOAN_LOGIC/FlashLoanLogic/src/contracts/dependencies/openzeppelin/contracts/Context.sol -+// downloads/LINEA/FLASHLOAN_LOGIC/FlashLoanLogic/src/contracts/dependencies/openzeppelin/contracts/Context.sol - - /* - * @dev Provides information about the current execution context, including the -@@ -244,7 +244,7 @@ abstract contract Context { - } - } - --// downloads/ARBITRUM/FLASHLOAN_LOGIC/FlashLoanLogic/src/contracts/dependencies/openzeppelin/contracts/IAccessControl.sol -+// downloads/LINEA/FLASHLOAN_LOGIC/FlashLoanLogic/src/contracts/dependencies/openzeppelin/contracts/IAccessControl.sol - - /** - * @dev External interface of AccessControl declared to support ERC165 detection. -@@ -334,7 +334,7 @@ interface IAccessControl { - function renounceRole(bytes32 role, address account) external; - } - --// downloads/ARBITRUM/FLASHLOAN_LOGIC/FlashLoanLogic/src/contracts/dependencies/openzeppelin/contracts/IERC20.sol -+// downloads/LINEA/FLASHLOAN_LOGIC/FlashLoanLogic/src/contracts/dependencies/openzeppelin/contracts/IERC20.sol - - /** - * @dev Interface of the ERC20 standard as defined in the EIP. -@@ -410,7 +410,7 @@ interface IERC20 { - event Approval(address indexed owner, address indexed spender, uint256 value); - } - --// downloads/ARBITRUM/FLASHLOAN_LOGIC/FlashLoanLogic/src/contracts/dependencies/openzeppelin/contracts/SafeCast.sol -+// downloads/LINEA/FLASHLOAN_LOGIC/FlashLoanLogic/src/contracts/dependencies/openzeppelin/contracts/SafeCast.sol - - // OpenZeppelin Contracts v4.4.1 (utils/math/SafeCast.sol) - -@@ -666,7 +666,7 @@ library SafeCast { - } - } - --// downloads/ARBITRUM/FLASHLOAN_LOGIC/FlashLoanLogic/src/contracts/interfaces/IAaveIncentivesController.sol -+// downloads/LINEA/FLASHLOAN_LOGIC/FlashLoanLogic/src/contracts/interfaces/IAaveIncentivesController.sol - - /** - * @title IAaveIncentivesController -@@ -685,7 +685,7 @@ interface IAaveIncentivesController { - function handleAction(address user, uint256 totalSupply, uint256 userBalance) external; - } - --// downloads/ARBITRUM/FLASHLOAN_LOGIC/FlashLoanLogic/src/contracts/interfaces/IPoolAddressesProvider.sol -+// downloads/LINEA/FLASHLOAN_LOGIC/FlashLoanLogic/src/contracts/interfaces/IPoolAddressesProvider.sol - - /** - * @title IPoolAddressesProvider -@@ -912,7 +912,7 @@ interface IPoolAddressesProvider { - function setPoolDataProvider(address newDataProvider) external; - } - --// downloads/ARBITRUM/FLASHLOAN_LOGIC/FlashLoanLogic/src/contracts/interfaces/IPriceOracleGetter.sol -+// downloads/LINEA/FLASHLOAN_LOGIC/FlashLoanLogic/src/contracts/interfaces/IPriceOracleGetter.sol - - /** - * @title IPriceOracleGetter -@@ -942,7 +942,7 @@ interface IPriceOracleGetter { - function getAssetPrice(address asset) external view returns (uint256); - } - --// downloads/ARBITRUM/FLASHLOAN_LOGIC/FlashLoanLogic/src/contracts/interfaces/IScaledBalanceToken.sol -+// downloads/LINEA/FLASHLOAN_LOGIC/FlashLoanLogic/src/contracts/interfaces/IScaledBalanceToken.sol - - /** - * @title IScaledBalanceToken -@@ -1014,7 +1014,7 @@ interface IScaledBalanceToken { - function getPreviousIndex(address user) external view returns (uint256); - } - --// downloads/ARBITRUM/FLASHLOAN_LOGIC/FlashLoanLogic/src/contracts/protocol/libraries/helpers/Errors.sol -+// downloads/LINEA/FLASHLOAN_LOGIC/FlashLoanLogic/src/contracts/protocol/libraries/helpers/Errors.sol - - /** - * @title Errors library -@@ -1117,7 +1117,7 @@ library Errors { - string public constant NOT_BORROWABLE_IN_EMODE = '100'; // Asset not borrowable in eMode - } - --// downloads/ARBITRUM/FLASHLOAN_LOGIC/FlashLoanLogic/src/contracts/protocol/libraries/math/PercentageMath.sol -+// downloads/LINEA/FLASHLOAN_LOGIC/FlashLoanLogic/src/contracts/protocol/libraries/math/PercentageMath.sol - - /** - * @title PercentageMath library -@@ -1178,7 +1178,7 @@ library PercentageMath { - } - } - --// downloads/ARBITRUM/FLASHLOAN_LOGIC/FlashLoanLogic/src/contracts/protocol/libraries/math/WadRayMath.sol -+// downloads/LINEA/FLASHLOAN_LOGIC/FlashLoanLogic/src/contracts/protocol/libraries/math/WadRayMath.sol - - /** - * @title WadRayMath library -@@ -1304,7 +1304,7 @@ library WadRayMath { - } - } - --// downloads/ARBITRUM/FLASHLOAN_LOGIC/FlashLoanLogic/src/contracts/protocol/libraries/types/DataTypes.sol -+// downloads/LINEA/FLASHLOAN_LOGIC/FlashLoanLogic/src/contracts/protocol/libraries/types/DataTypes.sol - - library DataTypes { - /** -@@ -1628,7 +1628,7 @@ library DataTypes { - } - } - --// downloads/ARBITRUM/FLASHLOAN_LOGIC/FlashLoanLogic/src/contracts/dependencies/gnosis/contracts/GPv2SafeERC20.sol -+// downloads/LINEA/FLASHLOAN_LOGIC/FlashLoanLogic/src/contracts/dependencies/gnosis/contracts/GPv2SafeERC20.sol - - /// @title Gnosis Protocol v2 Safe ERC20 Transfer Library - /// @author Gnosis Developers -@@ -1741,7 +1741,7 @@ library GPv2SafeERC20 { - } - } - --// downloads/ARBITRUM/FLASHLOAN_LOGIC/FlashLoanLogic/src/contracts/dependencies/openzeppelin/contracts/IERC20Detailed.sol -+// downloads/LINEA/FLASHLOAN_LOGIC/FlashLoanLogic/src/contracts/dependencies/openzeppelin/contracts/IERC20Detailed.sol - - interface IERC20Detailed is IERC20 { - function name() external view returns (string memory); -@@ -1751,7 +1751,7 @@ interface IERC20Detailed is IERC20 { - function decimals() external view returns (uint8); - } - --// downloads/ARBITRUM/FLASHLOAN_LOGIC/FlashLoanLogic/src/contracts/interfaces/IACLManager.sol -+// downloads/LINEA/FLASHLOAN_LOGIC/FlashLoanLogic/src/contracts/interfaces/IACLManager.sol - - /** - * @title IACLManager -@@ -1924,7 +1924,7 @@ interface IACLManager { - function isAssetListingAdmin(address admin) external view returns (bool); - } - --// downloads/ARBITRUM/FLASHLOAN_LOGIC/FlashLoanLogic/src/contracts/interfaces/IPriceOracleSentinel.sol -+// downloads/LINEA/FLASHLOAN_LOGIC/FlashLoanLogic/src/contracts/interfaces/IPriceOracleSentinel.sol - - /** - * @title IPriceOracleSentinel -@@ -1989,7 +1989,7 @@ interface IPriceOracleSentinel { - function getGracePeriod() external view returns (uint256); - } - --// downloads/ARBITRUM/FLASHLOAN_LOGIC/FlashLoanLogic/src/contracts/interfaces/IReserveInterestRateStrategy.sol -+// downloads/LINEA/FLASHLOAN_LOGIC/FlashLoanLogic/src/contracts/interfaces/IReserveInterestRateStrategy.sol - - /** - * @title IReserveInterestRateStrategy -@@ -2016,7 +2016,7 @@ interface IReserveInterestRateStrategy { - ) external view returns (uint256, uint256); - } - --// downloads/ARBITRUM/FLASHLOAN_LOGIC/FlashLoanLogic/src/contracts/protocol/libraries/math/MathUtils.sol -+// downloads/LINEA/FLASHLOAN_LOGIC/FlashLoanLogic/src/contracts/protocol/libraries/math/MathUtils.sol - - /** - * @title MathUtils library -@@ -2113,7 +2113,7 @@ library MathUtils { - } - } - --// downloads/ARBITRUM/FLASHLOAN_LOGIC/FlashLoanLogic/src/contracts/interfaces/IPool.sol -+// downloads/LINEA/FLASHLOAN_LOGIC/FlashLoanLogic/src/contracts/interfaces/IPool.sol - - /** - * @title IPool -@@ -2672,6 +2672,7 @@ interface IPool { - - /** - * @notice Returns the state and configuration of the reserve, including extra data included with Aave v3.1 -+ * @dev DEPRECATED use independent getters instead (getReserveData, getLiquidationGracePeriod) - * @param asset The address of the underlying asset of the reserve - * @return The state and configuration data of the reserve with virtual accounting - */ -@@ -2943,7 +2944,7 @@ interface IPool { - function getSupplyLogic() external view returns (address); - } - --// downloads/ARBITRUM/FLASHLOAN_LOGIC/FlashLoanLogic/src/contracts/protocol/libraries/configuration/ReserveConfiguration.sol -+// downloads/LINEA/FLASHLOAN_LOGIC/FlashLoanLogic/src/contracts/protocol/libraries/configuration/ReserveConfiguration.sol - - /** - * @title ReserveConfiguration library -@@ -2958,6 +2959,7 @@ library ReserveConfiguration { - uint256 internal constant ACTIVE_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFF; // prettier-ignore - uint256 internal constant FROZEN_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFDFFFFFFFFFFFFFF; // prettier-ignore - uint256 internal constant BORROWING_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFBFFFFFFFFFFFFFF; // prettier-ignore -+ // @notice there is an unoccupied hole of 1 bit at position 59 from pre 3.2 stableBorrowRateEnabled - uint256 internal constant PAUSED_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFF; // prettier-ignore - uint256 internal constant BORROWABLE_IN_ISOLATION_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFDFFFFFFFFFFFFFFF; // prettier-ignore - uint256 internal constant SILOED_BORROWING_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFBFFFFFFFFFFFFFFF; // prettier-ignore -@@ -2966,7 +2968,7 @@ library ReserveConfiguration { - uint256 internal constant BORROW_CAP_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000FFFFFFFFFFFFFFFFFFFF; // prettier-ignore - uint256 internal constant SUPPLY_CAP_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFF000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFF; // prettier-ignore - uint256 internal constant LIQUIDATION_PROTOCOL_FEE_MASK = 0xFFFFFFFFFFFFFFFFFFFFFF0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF; // prettier-ignore -- //@notice there is an unoccupied hole of 8 bits from 168 to 176 left from pre 3.2 eModeCategory -+ // @notice there is an unoccupied hole of 8 bits from 168 to 176 left from pre 3.2 eModeCategory - uint256 internal constant UNBACKED_MINT_CAP_MASK = 0xFFFFFFFFFFF000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF; // prettier-ignore - uint256 internal constant DEBT_CEILING_MASK = 0xF0000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF; // prettier-ignore - uint256 internal constant VIRTUAL_ACC_ACTIVE_MASK = 0xEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF; // prettier-ignore -@@ -3523,7 +3525,7 @@ library ReserveConfiguration { - } - } - --// downloads/ARBITRUM/FLASHLOAN_LOGIC/FlashLoanLogic/src/contracts/misc/flashloan/interfaces/IFlashLoanReceiver.sol -+// downloads/LINEA/FLASHLOAN_LOGIC/FlashLoanLogic/src/contracts/misc/flashloan/interfaces/IFlashLoanReceiver.sol - - /** - * @title IFlashLoanReceiver -@@ -3556,7 +3558,7 @@ interface IFlashLoanReceiver { - function POOL() external view returns (IPool); - } - --// downloads/ARBITRUM/FLASHLOAN_LOGIC/FlashLoanLogic/src/contracts/misc/flashloan/interfaces/IFlashLoanSimpleReceiver.sol -+// downloads/LINEA/FLASHLOAN_LOGIC/FlashLoanLogic/src/contracts/misc/flashloan/interfaces/IFlashLoanSimpleReceiver.sol - - /** - * @title IFlashLoanSimpleReceiver -@@ -3589,7 +3591,7 @@ interface IFlashLoanSimpleReceiver { - function POOL() external view returns (IPool); - } - --// downloads/ARBITRUM/FLASHLOAN_LOGIC/FlashLoanLogic/src/contracts/protocol/libraries/configuration/EModeConfiguration.sol -+// downloads/LINEA/FLASHLOAN_LOGIC/FlashLoanLogic/src/contracts/protocol/libraries/configuration/EModeConfiguration.sol - - /** - * @title EModeConfiguration library -@@ -3638,7 +3640,7 @@ library EModeConfiguration { - } - } - --// downloads/ARBITRUM/FLASHLOAN_LOGIC/FlashLoanLogic/src/contracts/protocol/libraries/configuration/UserConfiguration.sol -+// downloads/LINEA/FLASHLOAN_LOGIC/FlashLoanLogic/src/contracts/protocol/libraries/configuration/UserConfiguration.sol - - /** - * @title UserConfiguration library -@@ -3870,7 +3872,7 @@ library UserConfiguration { - } - } - --// downloads/ARBITRUM/FLASHLOAN_LOGIC/FlashLoanLogic/src/contracts/interfaces/IInitializableAToken.sol -+// downloads/LINEA/FLASHLOAN_LOGIC/FlashLoanLogic/src/contracts/interfaces/IInitializableAToken.sol - - /** - * @title IInitializableAToken -@@ -3923,7 +3925,7 @@ interface IInitializableAToken { - ) external; - } - --// downloads/ARBITRUM/FLASHLOAN_LOGIC/FlashLoanLogic/src/contracts/interfaces/IInitializableDebtToken.sol -+// downloads/LINEA/FLASHLOAN_LOGIC/FlashLoanLogic/src/contracts/interfaces/IInitializableDebtToken.sol - - /** - * @title IInitializableDebtToken -@@ -3972,7 +3974,7 @@ interface IInitializableDebtToken { - ) external; - } - --// downloads/ARBITRUM/FLASHLOAN_LOGIC/FlashLoanLogic/src/contracts/protocol/libraries/logic/IsolationModeLogic.sol -+// downloads/LINEA/FLASHLOAN_LOGIC/FlashLoanLogic/src/contracts/protocol/libraries/logic/IsolationModeLogic.sol - - /** - * @title IsolationModeLogic library -@@ -4031,7 +4033,7 @@ library IsolationModeLogic { - } - } - --// downloads/ARBITRUM/FLASHLOAN_LOGIC/FlashLoanLogic/src/contracts/interfaces/IVariableDebtToken.sol -+// downloads/LINEA/FLASHLOAN_LOGIC/FlashLoanLogic/src/contracts/interfaces/IVariableDebtToken.sol - - /** - * @title IVariableDebtToken -@@ -4074,7 +4076,7 @@ interface IVariableDebtToken is IScaledBalanceToken, IInitializableDebtToken { - function UNDERLYING_ASSET_ADDRESS() external view returns (address); - } - --// downloads/ARBITRUM/FLASHLOAN_LOGIC/FlashLoanLogic/src/contracts/interfaces/IAToken.sol -+// downloads/LINEA/FLASHLOAN_LOGIC/FlashLoanLogic/src/contracts/interfaces/IAToken.sol - - /** - * @title IAToken -@@ -4208,7 +4210,7 @@ interface IAToken is IERC20, IScaledBalanceToken, IInitializableAToken { - function rescueTokens(address token, address to, uint256 amount) external; - } - --// downloads/ARBITRUM/FLASHLOAN_LOGIC/FlashLoanLogic/src/contracts/protocol/tokenization/base/IncentivizedERC20.sol -+// downloads/LINEA/FLASHLOAN_LOGIC/FlashLoanLogic/src/contracts/protocol/tokenization/base/IncentivizedERC20.sol - - /** - * @title IncentivizedERC20 -@@ -4431,7 +4433,7 @@ abstract contract IncentivizedERC20 is Context, IERC20Detailed { - } - } - --// downloads/ARBITRUM/FLASHLOAN_LOGIC/FlashLoanLogic/src/contracts/protocol/libraries/logic/ReserveLogic.sol -+// downloads/LINEA/FLASHLOAN_LOGIC/FlashLoanLogic/src/contracts/protocol/libraries/logic/ReserveLogic.sol - - /** - * @title ReserveLogic library -@@ -4732,7 +4734,7 @@ library ReserveLogic { - } - } - --// downloads/ARBITRUM/FLASHLOAN_LOGIC/FlashLoanLogic/src/contracts/protocol/libraries/logic/EModeLogic.sol -+// downloads/LINEA/FLASHLOAN_LOGIC/FlashLoanLogic/src/contracts/protocol/libraries/logic/EModeLogic.sol - - /** - * @title EModeLogic library -@@ -4794,7 +4796,7 @@ library EModeLogic { - } - } - --// downloads/ARBITRUM/FLASHLOAN_LOGIC/FlashLoanLogic/src/contracts/protocol/libraries/logic/GenericLogic.sol -+// downloads/LINEA/FLASHLOAN_LOGIC/FlashLoanLogic/src/contracts/protocol/libraries/logic/GenericLogic.sol - - /** - * @title GenericLogic library -@@ -5038,7 +5040,7 @@ library GenericLogic { - } - } - --// downloads/ARBITRUM/FLASHLOAN_LOGIC/FlashLoanLogic/src/contracts/protocol/libraries/logic/ValidationLogic.sol -+// downloads/LINEA/FLASHLOAN_LOGIC/FlashLoanLogic/src/contracts/protocol/libraries/logic/ValidationLogic.sol - - /** - * @title ReserveLogic library -@@ -5658,7 +5660,7 @@ library ValidationLogic { - } - } - --// downloads/ARBITRUM/FLASHLOAN_LOGIC/FlashLoanLogic/src/contracts/protocol/libraries/logic/BorrowLogic.sol -+// downloads/LINEA/FLASHLOAN_LOGIC/FlashLoanLogic/src/contracts/protocol/libraries/logic/BorrowLogic.sol - - /** - * @title BorrowLogic library -@@ -5880,7 +5882,7 @@ library BorrowLogic { - } - } - --// downloads/ARBITRUM/FLASHLOAN_LOGIC/FlashLoanLogic/src/contracts/protocol/libraries/logic/FlashLoanLogic.sol -+// downloads/LINEA/FLASHLOAN_LOGIC/FlashLoanLogic/src/contracts/protocol/libraries/logic/FlashLoanLogic.sol - - /** - * @title FlashLoanLogic library + ``` diff --git a/diffs/ARBITRUM_LINEA/L2_ENCODER_DIFF.md b/diffs/ARBITRUM_LINEA/L2_ENCODER_DIFF.md index 30966a65..ab2c80c0 100644 --- a/diffs/ARBITRUM_LINEA/L2_ENCODER_DIFF.md +++ b/diffs/ARBITRUM_LINEA/L2_ENCODER_DIFF.md @@ -3,1036 +3,10 @@ diff --git a/./downloads/ARBITRUM/L2_ENCODER.sol b/./downloads/LINEA/L2_ENCODER. index 9ab49b3..42a5580 100644 --- a/./downloads/ARBITRUM/L2_ENCODER.sol +++ b/./downloads/LINEA/L2_ENCODER.sol -@@ -1,7 +1,7 @@ --// SPDX-License-Identifier: BUSL-1.1 --pragma solidity =0.8.10; -+// SPDX-License-Identifier: MIT -+pragma solidity ^0.8.0 ^0.8.10; - --// downloads/ARBITRUM/L2_ENCODER/L2Encoder/@aave/core-v3/contracts/dependencies/openzeppelin/contracts/SafeCast.sol -+// downloads/LINEA/L2_ENCODER/L2Encoder/src/contracts/dependencies/openzeppelin/contracts/SafeCast.sol - - // OpenZeppelin Contracts v4.4.1 (utils/math/SafeCast.sol) - -@@ -257,13 +257,13 @@ library SafeCast { - } - } - --// downloads/ARBITRUM/L2_ENCODER/L2Encoder/@aave/core-v3/contracts/interfaces/IPoolAddressesProvider.sol -+// downloads/LINEA/L2_ENCODER/L2Encoder/src/contracts/interfaces/IPoolAddressesProvider.sol - - /** - * @title IPoolAddressesProvider - * @author Aave - * @notice Defines the basic interface for a Pool Addresses Provider. -- **/ -+ */ - interface IPoolAddressesProvider { - /** - * @dev Emitted when the market identifier is updated. -@@ -358,7 +358,7 @@ interface IPoolAddressesProvider { - /** - * @notice Returns the id of the Aave market to which this contract points to. - * @return The market id -- **/ -+ */ - function getMarketId() external view returns (string memory); - - /** -@@ -400,27 +400,27 @@ interface IPoolAddressesProvider { - /** - * @notice Returns the address of the Pool proxy. - * @return The Pool proxy address -- **/ -+ */ - function getPool() external view returns (address); - - /** - * @notice Updates the implementation of the Pool, or creates a proxy - * setting the new `pool` implementation when the function is called for the first time. - * @param newPoolImpl The new Pool implementation -- **/ -+ */ - function setPoolImpl(address newPoolImpl) external; - - /** - * @notice Returns the address of the PoolConfigurator proxy. - * @return The PoolConfigurator proxy address -- **/ -+ */ - function getPoolConfigurator() external view returns (address); - - /** - * @notice Updates the implementation of the PoolConfigurator, or creates a proxy - * setting the new `PoolConfigurator` implementation when the function is called for the first time. - * @param newPoolConfiguratorImpl The new PoolConfigurator implementation -- **/ -+ */ - function setPoolConfiguratorImpl(address newPoolConfiguratorImpl) external; - - /** -@@ -444,7 +444,7 @@ interface IPoolAddressesProvider { - /** - * @notice Updates the address of the ACL manager. - * @param newAclManager The address of the new ACLManager -- **/ -+ */ - function setACLManager(address newAclManager) external; - - /** -@@ -468,7 +468,7 @@ interface IPoolAddressesProvider { - /** - * @notice Updates the address of the price oracle sentinel. - * @param newPriceOracleSentinel The address of the new PriceOracleSentinel -- **/ -+ */ - function setPriceOracleSentinel(address newPriceOracleSentinel) external; - - /** -@@ -480,14 +480,18 @@ interface IPoolAddressesProvider { - /** - * @notice Updates the address of the data provider. - * @param newDataProvider The address of the new DataProvider -- **/ -+ */ - function setPoolDataProvider(address newDataProvider) external; - } - --// downloads/ARBITRUM/L2_ENCODER/L2Encoder/@aave/core-v3/contracts/protocol/libraries/types/DataTypes.sol -+// downloads/LINEA/L2_ENCODER/L2Encoder/src/contracts/protocol/libraries/types/DataTypes.sol - - library DataTypes { -- struct ReserveData { -+ /** -+ * This exists specifically to maintain the `getReserveData()` interface, since the new, internal -+ * `ReserveData` struct includes the reserve's `virtualUnderlyingBalance`. -+ */ -+ struct ReserveDataLegacy { - //stores the reserve configuration - ReserveConfigurationMap configuration; - //the liquidity index. Expressed in ray -@@ -498,7 +502,7 @@ library DataTypes { - uint128 variableBorrowIndex; - //the current variable borrow rate. Expressed in ray - uint128 currentVariableBorrowRate; -- //the current stable borrow rate. Expressed in ray -+ // DEPRECATED on v3.2.0 - uint128 currentStableBorrowRate; - //timestamp of last update - uint40 lastUpdateTimestamp; -@@ -506,7 +510,7 @@ library DataTypes { - uint16 id; - //aToken address - address aTokenAddress; -- //stableDebtToken address -+ // DEPRECATED on v3.2.0 - address stableDebtTokenAddress; - //variableDebtToken address - address variableDebtTokenAddress; -@@ -520,6 +524,43 @@ library DataTypes { - uint128 isolationModeTotalDebt; - } - -+ struct ReserveData { -+ //stores the reserve configuration -+ ReserveConfigurationMap configuration; -+ //the liquidity index. Expressed in ray -+ uint128 liquidityIndex; -+ //the current supply rate. Expressed in ray -+ uint128 currentLiquidityRate; -+ //variable borrow index. Expressed in ray -+ uint128 variableBorrowIndex; -+ //the current variable borrow rate. Expressed in ray -+ uint128 currentVariableBorrowRate; -+ // DEPRECATED on v3.2.0 -+ uint128 __deprecatedStableBorrowRate; -+ //timestamp of last update -+ uint40 lastUpdateTimestamp; -+ //the id of the reserve. Represents the position in the list of the active reserves -+ uint16 id; -+ //timestamp until when liquidations are not allowed on the reserve, if set to past liquidations will be allowed -+ uint40 liquidationGracePeriodUntil; -+ //aToken address -+ address aTokenAddress; -+ // DEPRECATED on v3.2.0 -+ address __deprecatedStableDebtTokenAddress; -+ //variableDebtToken address -+ address variableDebtTokenAddress; -+ //address of the interest rate strategy -+ address interestRateStrategyAddress; -+ //the current treasury balance, scaled -+ uint128 accruedToTreasury; -+ //the outstanding unbacked aTokens minted through the bridging feature -+ uint128 unbacked; -+ //the outstanding debt borrowed against this asset in isolation mode -+ uint128 isolationModeTotalDebt; -+ //the amount of underlying accounted for by the protocol -+ uint128 virtualUnderlyingBalance; -+ } -+ - struct ReserveConfigurationMap { - //bit 0-15: LTV - //bit 16-31: Liq. threshold -@@ -528,18 +569,20 @@ library DataTypes { - //bit 56: reserve is active - //bit 57: reserve is frozen - //bit 58: borrowing is enabled -- //bit 59: stable rate borrowing enabled -+ //bit 59: DEPRECATED: stable rate borrowing enabled - //bit 60: asset is paused - //bit 61: borrowing in isolation mode is enabled -- //bit 62-63: reserved -+ //bit 62: siloed borrowing enabled -+ //bit 63: flashloaning enabled - //bit 64-79: reserve factor -- //bit 80-115 borrow cap in whole tokens, borrowCap == 0 => no cap -- //bit 116-151 supply cap in whole tokens, supplyCap == 0 => no cap -- //bit 152-167 liquidation protocol fee -- //bit 168-175 eMode category -- //bit 176-211 unbacked mint cap in whole tokens, unbackedMintCap == 0 => minting disabled -- //bit 212-251 debt ceiling for isolation mode with (ReserveConfiguration::DEBT_CEILING_DECIMALS) decimals -- //bit 252-255 unused -+ //bit 80-115: borrow cap in whole tokens, borrowCap == 0 => no cap -+ //bit 116-151: supply cap in whole tokens, supplyCap == 0 => no cap -+ //bit 152-167: liquidation protocol fee -+ //bit 168-175: DEPRECATED: eMode category -+ //bit 176-211: unbacked mint cap in whole tokens, unbackedMintCap == 0 => minting disabled -+ //bit 212-251: debt ceiling for isolation mode with (ReserveConfiguration::DEBT_CEILING_DECIMALS) decimals -+ //bit 252: virtual accounting is enabled for the reserve -+ //bit 253-255 unused - - uint256 data; - } -@@ -553,30 +596,49 @@ library DataTypes { - uint256 data; - } - -- struct EModeCategory { -+ // DEPRECATED: kept for backwards compatibility, might be removed in a future version -+ struct EModeCategoryLegacy { - // each eMode category has a custom ltv and liquidation threshold - uint16 ltv; - uint16 liquidationThreshold; - uint16 liquidationBonus; -- // each eMode category may or may not have a custom oracle to override the individual assets price oracles -+ // DEPRECATED - address priceSource; - string label; - } - -+ struct CollateralConfig { -+ uint16 ltv; -+ uint16 liquidationThreshold; -+ uint16 liquidationBonus; -+ } -+ -+ struct EModeCategoryBaseConfiguration { -+ uint16 ltv; -+ uint16 liquidationThreshold; -+ uint16 liquidationBonus; -+ string label; -+ } -+ -+ struct EModeCategory { -+ // each eMode category has a custom ltv and liquidation threshold -+ uint16 ltv; -+ uint16 liquidationThreshold; -+ uint16 liquidationBonus; -+ uint128 collateralBitmap; -+ string label; -+ uint128 borrowableBitmap; -+ } -+ - enum InterestRateMode { - NONE, -- STABLE, -+ __DEPRECATED, - VARIABLE - } - - struct ReserveCache { - uint256 currScaledVariableDebt; - uint256 nextScaledVariableDebt; -- uint256 currPrincipalStableDebt; -- uint256 currAvgStableBorrowRate; -- uint256 currTotalStableDebt; -- uint256 nextAvgStableBorrowRate; -- uint256 nextTotalStableDebt; - uint256 currLiquidityIndex; - uint256 nextLiquidityIndex; - uint256 currVariableBorrowIndex; -@@ -586,10 +648,8 @@ library DataTypes { - uint256 reserveFactor; - ReserveConfigurationMap reserveConfiguration; - address aTokenAddress; -- address stableDebtTokenAddress; - address variableDebtTokenAddress; - uint40 reserveLastUpdateTimestamp; -- uint40 stableDebtLastUpdateTimestamp; - } - - struct ExecuteLiquidationCallParams { -@@ -619,7 +679,6 @@ library DataTypes { - InterestRateMode interestRateMode; - uint16 referralCode; - bool releaseUnderlying; -- uint256 maxStableRateBorrowSizePercent; - uint256 reservesCount; - address oracle; - uint8 userEModeCategory; -@@ -671,9 +730,9 @@ library DataTypes { - uint16 referralCode; - uint256 flashLoanPremiumToProtocol; - uint256 flashLoanPremiumTotal; -- uint256 maxStableRateBorrowSizePercent; - uint256 reservesCount; - address addressesProvider; -+ address pool; - uint8 userEModeCategory; - bool isAuthorizedFlashBorrower; - } -@@ -712,7 +771,6 @@ library DataTypes { - address userAddress; - uint256 amount; - InterestRateMode interestRateMode; -- uint256 maxStableLoanPercent; - uint256 reservesCount; - address oracle; - uint8 userEModeCategory; -@@ -733,18 +791,16 @@ library DataTypes { - uint256 unbacked; - uint256 liquidityAdded; - uint256 liquidityTaken; -- uint256 totalStableDebt; -- uint256 totalVariableDebt; -- uint256 averageStableBorrowRate; -+ uint256 totalDebt; - uint256 reserveFactor; - address reserve; -- address aToken; -+ bool usingVirtualBalance; -+ uint256 virtualUnderlyingBalance; - } - - struct InitReserveParams { - address asset; - address aTokenAddress; -- address stableDebtAddress; - address variableDebtAddress; - address interestRateStrategyAddress; - uint16 reservesCount; -@@ -752,13 +808,13 @@ library DataTypes { - } - } - --// downloads/ARBITRUM/L2_ENCODER/L2Encoder/@aave/core-v3/contracts/interfaces/IPool.sol -+// downloads/LINEA/L2_ENCODER/L2Encoder/src/contracts/interfaces/IPool.sol - - /** - * @title IPool - * @author Aave - * @notice Defines the basic interface for an Aave Pool. -- **/ -+ */ - interface IPool { - /** - * @dev Emitted on mintUnbacked() -@@ -767,7 +823,7 @@ interface IPool { - * @param onBehalfOf The beneficiary of the supplied assets, receiving the aTokens - * @param amount The amount of supplied assets - * @param referralCode The referral code used -- **/ -+ */ - event MintUnbacked( - address indexed reserve, - address user, -@@ -782,7 +838,7 @@ interface IPool { - * @param backer The address paying for the backing - * @param amount The amount added as backing - * @param fee The amount paid in fees -- **/ -+ */ - event BackUnbacked(address indexed reserve, address indexed backer, uint256 amount, uint256 fee); - - /** -@@ -792,7 +848,7 @@ interface IPool { - * @param onBehalfOf The beneficiary of the supply, receiving the aTokens - * @param amount The amount supplied - * @param referralCode The referral code used -- **/ -+ */ - event Supply( - address indexed reserve, - address user, -@@ -807,7 +863,7 @@ interface IPool { - * @param user The address initiating the withdrawal, owner of aTokens - * @param to The address that will receive the underlying - * @param amount The amount to be withdrawn -- **/ -+ */ - event Withdraw(address indexed reserve, address indexed user, address indexed to, uint256 amount); - - /** -@@ -817,10 +873,10 @@ interface IPool { - * initiator of the transaction on flashLoan() - * @param onBehalfOf The address that will be getting the debt - * @param amount The amount borrowed out -- * @param interestRateMode The rate mode: 1 for Stable, 2 for Variable -+ * @param interestRateMode The rate mode: 2 for Variable, 1 is deprecated (changed on v3.2.0) - * @param borrowRate The numeric rate at which the user has borrowed, expressed in ray - * @param referralCode The referral code used -- **/ -+ */ - event Borrow( - address indexed reserve, - address user, -@@ -838,7 +894,7 @@ interface IPool { - * @param repayer The address of the user initiating the repay(), providing the funds - * @param amount The amount repaid - * @param useATokens True if the repayment is done using aTokens, `false` if done with underlying asset directly -- **/ -+ */ - event Repay( - address indexed reserve, - address indexed user, -@@ -847,18 +903,6 @@ interface IPool { - bool useATokens - ); - -- /** -- * @dev Emitted on swapBorrowRateMode() -- * @param reserve The address of the underlying asset of the reserve -- * @param user The address of the user swapping his rate mode -- * @param interestRateMode The current interest rate mode of the position being swapped: 1 for Stable, 2 for Variable -- **/ -- event SwapBorrowRateMode( -- address indexed reserve, -- address indexed user, -- DataTypes.InterestRateMode interestRateMode -- ); -- - /** - * @dev Emitted on borrow(), repay() and liquidationCall() when using isolated assets - * @param asset The address of the underlying asset of the reserve -@@ -870,40 +914,34 @@ interface IPool { - * @dev Emitted when the user selects a certain asset category for eMode - * @param user The address of the user - * @param categoryId The category id -- **/ -+ */ - event UserEModeSet(address indexed user, uint8 categoryId); - - /** - * @dev Emitted on setUserUseReserveAsCollateral() - * @param reserve The address of the underlying asset of the reserve - * @param user The address of the user enabling the usage as collateral -- **/ -+ */ - event ReserveUsedAsCollateralEnabled(address indexed reserve, address indexed user); - - /** - * @dev Emitted on setUserUseReserveAsCollateral() - * @param reserve The address of the underlying asset of the reserve - * @param user The address of the user enabling the usage as collateral -- **/ -+ */ - event ReserveUsedAsCollateralDisabled(address indexed reserve, address indexed user); - -- /** -- * @dev Emitted on rebalanceStableBorrowRate() -- * @param reserve The address of the underlying asset of the reserve -- * @param user The address of the user for which the rebalance has been executed -- **/ -- event RebalanceStableBorrowRate(address indexed reserve, address indexed user); -- - /** - * @dev Emitted on flashLoan() - * @param target The address of the flash loan receiver contract - * @param initiator The address initiating the flash loan - * @param asset The address of the asset being flash borrowed - * @param amount The amount flash borrowed -- * @param interestRateMode The flashloan mode: 0 for regular flashloan, 1 for Stable debt, 2 for Variable debt -+ * @param interestRateMode The flashloan mode: 0 for regular flashloan, -+ * 1 for Stable (Deprecated on v3.2.0), 2 for Variable - * @param premium The fee flash borrowed - * @param referralCode The referral code used -- **/ -+ */ - event FlashLoan( - address indexed target, - address initiator, -@@ -924,7 +962,7 @@ interface IPool { - * @param liquidator The address of the liquidator - * @param receiveAToken True if the liquidators wants to receive the collateral aTokens, `false` if he wants - * to receive the underlying collateral asset directly -- **/ -+ */ - event LiquidationCall( - address indexed collateralAsset, - address indexed debtAsset, -@@ -939,11 +977,11 @@ interface IPool { - * @dev Emitted when the state of a reserve is updated. - * @param reserve The address of the underlying asset of the reserve - * @param liquidityRate The next liquidity rate -- * @param stableBorrowRate The next stable borrow rate -+ * @param stableBorrowRate The next stable borrow rate @note deprecated on v3.2.0 - * @param variableBorrowRate The next variable borrow rate - * @param liquidityIndex The next liquidity index - * @param variableBorrowIndex The next variable borrow index -- **/ -+ */ - event ReserveDataUpdated( - address indexed reserve, - uint256 liquidityRate, -@@ -957,17 +995,17 @@ interface IPool { - * @dev Emitted when the protocol treasury receives minted aTokens from the accrued interest. - * @param reserve The address of the reserve - * @param amountMinted The amount minted to the treasury -- **/ -+ */ - event MintedToTreasury(address indexed reserve, uint256 amountMinted); - - /** -- * @dev Mints an `amount` of aTokens to the `onBehalfOf` -+ * @notice Mints an `amount` of aTokens to the `onBehalfOf` - * @param asset The address of the underlying asset to mint - * @param amount The amount to mint - * @param onBehalfOf The address that will receive the aTokens - * @param referralCode Code used to register the integrator originating the operation, for potential rewards. - * 0 if the action is executed directly by the user, without any middle-man -- **/ -+ */ - function mintUnbacked( - address asset, - uint256 amount, -@@ -976,12 +1014,13 @@ interface IPool { - ) external; - - /** -- * @dev Back the current unbacked underlying with `amount` and pay `fee`. -+ * @notice Back the current unbacked underlying with `amount` and pay `fee`. - * @param asset The address of the underlying asset to back - * @param amount The amount to back - * @param fee The amount paid in fees -- **/ -- function backUnbacked(address asset, uint256 amount, uint256 fee) external; -+ * @return The backed amount -+ */ -+ function backUnbacked(address asset, uint256 amount, uint256 fee) external returns (uint256); - - /** - * @notice Supplies an `amount` of underlying asset into the reserve, receiving in return overlying aTokens. -@@ -993,7 +1032,7 @@ interface IPool { - * is a different wallet - * @param referralCode Code used to register the integrator originating the operation, for potential rewards. - * 0 if the action is executed directly by the user, without any middle-man -- **/ -+ */ - function supply(address asset, uint256 amount, address onBehalfOf, uint16 referralCode) external; - - /** -@@ -1010,7 +1049,7 @@ interface IPool { - * @param permitV The V parameter of ERC712 permit sig - * @param permitR The R parameter of ERC712 permit sig - * @param permitS The S parameter of ERC712 permit sig -- **/ -+ */ - function supplyWithPermit( - address asset, - uint256 amount, -@@ -1032,24 +1071,23 @@ interface IPool { - * wants to receive it on his own wallet, or a different address if the beneficiary is a - * different wallet - * @return The final amount withdrawn -- **/ -+ */ - function withdraw(address asset, uint256 amount, address to) external returns (uint256); - - /** - * @notice Allows users to borrow a specific `amount` of the reserve underlying asset, provided that the borrower -- * already supplied enough collateral, or he was given enough allowance by a credit delegator on the -- * corresponding debt token (StableDebtToken or VariableDebtToken) -+ * already supplied enough collateral, or he was given enough allowance by a credit delegator on the VariableDebtToken - * - E.g. User borrows 100 USDC passing as `onBehalfOf` his own address, receiving the 100 USDC in his wallet -- * and 100 stable/variable debt tokens, depending on the `interestRateMode` -+ * and 100 variable debt tokens - * @param asset The address of the underlying asset to borrow - * @param amount The amount to be borrowed -- * @param interestRateMode The interest rate mode at which the user wants to borrow: 1 for Stable, 2 for Variable -+ * @param interestRateMode 2 for Variable, 1 is deprecated on v3.2.0 - * @param referralCode The code used to register the integrator originating the operation, for potential rewards. - * 0 if the action is executed directly by the user, without any middle-man - * @param onBehalfOf The address of the user who will receive the debt. Should be the address of the borrower itself - * calling the function if he wants to borrow against his own collateral, or the address of the credit delegator - * if he has been given credit delegation allowance -- **/ -+ */ - function borrow( - address asset, - uint256 amount, -@@ -1060,16 +1098,16 @@ interface IPool { - - /** - * @notice Repays a borrowed `amount` on a specific reserve, burning the equivalent debt tokens owned -- * - E.g. User repays 100 USDC, burning 100 variable/stable debt tokens of the `onBehalfOf` address -+ * - E.g. User repays 100 USDC, burning 100 variable debt tokens of the `onBehalfOf` address - * @param asset The address of the borrowed underlying asset previously borrowed - * @param amount The amount to repay - * - Send the value type(uint256).max in order to repay the whole debt for `asset` on the specific `debtMode` -- * @param interestRateMode The interest rate mode at of the debt the user wants to repay: 1 for Stable, 2 for Variable -+ * @param interestRateMode 2 for Variable, 1 is deprecated on v3.2.0 - * @param onBehalfOf The address of the user who will get his debt reduced/removed. Should be the address of the - * user calling the function if he wants to reduce/remove his own debt, or the address of any other - * other borrower whose debt should be removed - * @return The final amount repaid -- **/ -+ */ - function repay( - address asset, - uint256 amount, -@@ -1083,7 +1121,7 @@ interface IPool { - * @param asset The address of the borrowed underlying asset previously borrowed - * @param amount The amount to repay - * - Send the value type(uint256).max in order to repay the whole debt for `asset` on the specific `debtMode` -- * @param interestRateMode The interest rate mode at of the debt the user wants to repay: 1 for Stable, 2 for Variable -+ * @param interestRateMode 2 for Variable, 1 is deprecated on v3.2.0 - * @param onBehalfOf Address of the user who will get his debt reduced/removed. Should be the address of the - * user calling the function if he wants to reduce/remove his own debt, or the address of any other - * other borrower whose debt should be removed -@@ -1092,7 +1130,7 @@ interface IPool { - * @param permitR The R parameter of ERC712 permit sig - * @param permitS The S parameter of ERC712 permit sig - * @return The final amount repaid -- **/ -+ */ - function repayWithPermit( - address asset, - uint256 amount, -@@ -1107,44 +1145,26 @@ interface IPool { - /** - * @notice Repays a borrowed `amount` on a specific reserve using the reserve aTokens, burning the - * equivalent debt tokens -- * - E.g. User repays 100 USDC using 100 aUSDC, burning 100 variable/stable debt tokens -+ * - E.g. User repays 100 USDC using 100 aUSDC, burning 100 variable debt tokens - * @dev Passing uint256.max as amount will clean up any residual aToken dust balance, if the user aToken - * balance is not enough to cover the whole debt - * @param asset The address of the borrowed underlying asset previously borrowed - * @param amount The amount to repay - * - Send the value type(uint256).max in order to repay the whole debt for `asset` on the specific `debtMode` -- * @param interestRateMode The interest rate mode at of the debt the user wants to repay: 1 for Stable, 2 for Variable -+ * @param interestRateMode DEPRECATED in v3.2.0 - * @return The final amount repaid -- **/ -+ */ - function repayWithATokens( - address asset, - uint256 amount, - uint256 interestRateMode - ) external returns (uint256); - -- /** -- * @notice Allows a borrower to swap his debt between stable and variable mode, or vice versa -- * @param asset The address of the underlying asset borrowed -- * @param interestRateMode The current interest rate mode of the position being swapped: 1 for Stable, 2 for Variable -- **/ -- function swapBorrowRateMode(address asset, uint256 interestRateMode) external; -- -- /** -- * @notice Rebalances the stable interest rate of a user to the current stable rate defined on the reserve. -- * - Users can be rebalanced if the following conditions are satisfied: -- * 1. Usage ratio is above 95% -- * 2. the current supply APY is below REBALANCE_UP_THRESHOLD * maxVariableBorrowRate, which means that too -- * much has been borrowed at a stable rate and suppliers are not earning enough -- * @param asset The address of the underlying asset borrowed -- * @param user The address of the user to be rebalanced -- **/ -- function rebalanceStableBorrowRate(address asset, address user) external; -- - /** - * @notice Allows suppliers to enable/disable a specific supplied asset as collateral - * @param asset The address of the underlying asset supplied - * @param useAsCollateral True if the user wants to use the supply as collateral, false otherwise -- **/ -+ */ - function setUserUseReserveAsCollateral(address asset, bool useAsCollateral) external; - - /** -@@ -1157,7 +1177,7 @@ interface IPool { - * @param debtToCover The debt amount of borrowed `asset` the liquidator wants to cover - * @param receiveAToken True if the liquidators wants to receive the collateral aTokens, `false` if he wants - * to receive the underlying collateral asset directly -- **/ -+ */ - function liquidationCall( - address collateralAsset, - address debtAsset, -@@ -1170,19 +1190,19 @@ interface IPool { - * @notice Allows smartcontracts to access the liquidity of the pool within one transaction, - * as long as the amount taken plus a fee is returned. - * @dev IMPORTANT There are security concerns for developers of flashloan receiver contracts that must be kept -- * into consideration. For further details please visit https://developers.aave.com -+ * into consideration. For further details please visit https://docs.aave.com/developers/ - * @param receiverAddress The address of the contract receiving the funds, implementing IFlashLoanReceiver interface - * @param assets The addresses of the assets being flash-borrowed - * @param amounts The amounts of the assets being flash-borrowed - * @param interestRateModes Types of the debt to open if the flash loan is not returned: - * 0 -> Don't open any debt, just revert if funds can't be transferred from the receiver -- * 1 -> Open debt at stable rate for the value of the amount flash-borrowed to the `onBehalfOf` address -+ * 1 -> Deprecated on v3.2.0 - * 2 -> Open debt at variable rate for the value of the amount flash-borrowed to the `onBehalfOf` address -- * @param onBehalfOf The address that will receive the debt in the case of using on `modes` 1 or 2 -+ * @param onBehalfOf The address that will receive the debt in the case of using 2 on `modes` - * @param params Variadic packed params to pass to the receiver as extra information - * @param referralCode The code used to register the integrator originating the operation, for potential rewards. - * 0 if the action is executed directly by the user, without any middle-man -- **/ -+ */ - function flashLoan( - address receiverAddress, - address[] calldata assets, -@@ -1197,14 +1217,14 @@ interface IPool { - * @notice Allows smartcontracts to access the liquidity of the pool within one transaction, - * as long as the amount taken plus a fee is returned. - * @dev IMPORTANT There are security concerns for developers of flashloan receiver contracts that must be kept -- * into consideration. For further details please visit https://developers.aave.com -+ * into consideration. For further details please visit https://docs.aave.com/developers/ - * @param receiverAddress The address of the contract receiving the funds, implementing IFlashLoanSimpleReceiver interface - * @param asset The address of the asset being flash-borrowed - * @param amount The amount of the asset being flash-borrowed - * @param params Variadic packed params to pass to the receiver as extra information - * @param referralCode The code used to register the integrator originating the operation, for potential rewards. - * 0 if the action is executed directly by the user, without any middle-man -- **/ -+ */ - function flashLoanSimple( - address receiverAddress, - address asset, -@@ -1222,7 +1242,7 @@ interface IPool { - * @return currentLiquidationThreshold The liquidation threshold of the user - * @return ltv The loan to value of The user - * @return healthFactor The current health factor of the user -- **/ -+ */ - function getUserAccountData( - address user - ) -@@ -1243,14 +1263,12 @@ interface IPool { - * @dev Only callable by the PoolConfigurator contract - * @param asset The address of the underlying asset of the reserve - * @param aTokenAddress The address of the aToken that will be assigned to the reserve -- * @param stableDebtAddress The address of the StableDebtToken that will be assigned to the reserve - * @param variableDebtAddress The address of the VariableDebtToken that will be assigned to the reserve - * @param interestRateStrategyAddress The address of the interest rate strategy contract -- **/ -+ */ - function initReserve( - address asset, - address aTokenAddress, -- address stableDebtAddress, - address variableDebtAddress, - address interestRateStrategyAddress - ) external; -@@ -1258,8 +1276,9 @@ interface IPool { - /** - * @notice Drop a reserve - * @dev Only callable by the PoolConfigurator contract -+ * @dev Does not reset eMode flags, which must be considered when reusing the same reserve id for a different reserve. - * @param asset The address of the underlying asset of the reserve -- **/ -+ */ - function dropReserve(address asset) external; - - /** -@@ -1267,18 +1286,34 @@ interface IPool { - * @dev Only callable by the PoolConfigurator contract - * @param asset The address of the underlying asset of the reserve - * @param rateStrategyAddress The address of the interest rate strategy contract -- **/ -+ */ - function setReserveInterestRateStrategyAddress( - address asset, - address rateStrategyAddress - ) external; - -+ /** -+ * @notice Accumulates interest to all indexes of the reserve -+ * @dev Only callable by the PoolConfigurator contract -+ * @dev To be used when required by the configurator, for example when updating interest rates strategy data -+ * @param asset The address of the underlying asset of the reserve -+ */ -+ function syncIndexesState(address asset) external; -+ -+ /** -+ * @notice Updates interest rates on the reserve data -+ * @dev Only callable by the PoolConfigurator contract -+ * @dev To be used when required by the configurator, for example when updating interest rates strategy data -+ * @param asset The address of the underlying asset of the reserve -+ */ -+ function syncRatesState(address asset) external; -+ - /** - * @notice Sets the configuration bitmap of the reserve as a whole - * @dev Only callable by the PoolConfigurator contract - * @param asset The address of the underlying asset of the reserve - * @param configuration The new configuration bitmap -- **/ -+ */ - function setConfiguration( - address asset, - DataTypes.ReserveConfigurationMap calldata configuration -@@ -1288,7 +1323,7 @@ interface IPool { - * @notice Returns the configuration of the reserve - * @param asset The address of the underlying asset of the reserve - * @return The configuration of the reserve -- **/ -+ */ - function getConfiguration( - address asset - ) external view returns (DataTypes.ReserveConfigurationMap memory); -@@ -1297,13 +1332,13 @@ interface IPool { - * @notice Returns the configuration of the user across all the reserves - * @param user The user address - * @return The configuration of the user -- **/ -+ */ - function getUserConfiguration( - address user - ) external view returns (DataTypes.UserConfigurationMap memory); - - /** -- * @notice Returns the normalized income normalized income of the reserve -+ * @notice Returns the normalized income of the reserve - * @param asset The address of the underlying asset of the reserve - * @return The reserve's normalized income - */ -@@ -1311,6 +1346,13 @@ interface IPool { - - /** - * @notice Returns the normalized variable debt per unit of asset -+ * @dev WARNING: This function is intended to be used primarily by the protocol itself to get a -+ * "dynamic" variable index based on time, current stored index and virtual rate at the current -+ * moment (approx. a borrower would get if opening a position). This means that is always used in -+ * combination with variable debt supply/balances. -+ * If using this function externally, consider that is possible to have an increasing normalized -+ * variable debt that is not equivalent to how the variable debt index would be updated in storage -+ * (e.g. only updates with non-zero variable debt supply) - * @param asset The address of the underlying asset of the reserve - * @return The reserve normalized variable debt - */ -@@ -1320,8 +1362,25 @@ interface IPool { - * @notice Returns the state and configuration of the reserve - * @param asset The address of the underlying asset of the reserve - * @return The state and configuration data of the reserve -- **/ -- function getReserveData(address asset) external view returns (DataTypes.ReserveData memory); -+ */ -+ function getReserveData(address asset) external view returns (DataTypes.ReserveDataLegacy memory); -+ -+ /** -+ * @notice Returns the state and configuration of the reserve, including extra data included with Aave v3.1 -+ * @dev DEPRECATED use independent getters instead (getReserveData, getLiquidationGracePeriod) -+ * @param asset The address of the underlying asset of the reserve -+ * @return The state and configuration data of the reserve with virtual accounting -+ */ -+ function getReserveDataExtended( -+ address asset -+ ) external view returns (DataTypes.ReserveData memory); -+ -+ /** -+ * @notice Returns the virtual underlying balance of the reserve -+ * @param asset The address of the underlying asset of the reserve -+ * @return The reserve virtual underlying balance -+ */ -+ function getVirtualUnderlyingBalance(address asset) external view returns (uint128); - - /** - * @notice Validates and finalizes an aToken transfer -@@ -1346,20 +1405,27 @@ interface IPool { - * @notice Returns the list of the underlying assets of all the initialized reserves - * @dev It does not include dropped reserves - * @return The addresses of the underlying assets of the initialized reserves -- **/ -+ */ - function getReservesList() external view returns (address[] memory); - -+ /** -+ * @notice Returns the number of initialized reserves -+ * @dev It includes dropped reserves -+ * @return The count -+ */ -+ function getReservesCount() external view returns (uint256); -+ - /** - * @notice Returns the address of the underlying asset of a reserve by the reserve id as stored in the DataTypes.ReserveData struct - * @param id The id of the reserve as stored in the DataTypes.ReserveData struct - * @return The address of the reserve associated with id -- **/ -+ */ - function getReserveAddressById(uint16 id) external view returns (address); - - /** - * @notice Returns the PoolAddressesProvider connected to this contract - * @return The address of the PoolAddressesProvider -- **/ -+ */ - function ADDRESSES_PROVIDER() external view returns (IPoolAddressesProvider); - - /** -@@ -1384,20 +1450,70 @@ interface IPool { - ) external; - - /** -- * @notice Configures a new category for the eMode. -+ * @notice Configures a new or alters an existing collateral configuration of an eMode. - * @dev In eMode, the protocol allows very high borrowing power to borrow assets of the same category. - * The category 0 is reserved as it's the default for volatile assets - * @param id The id of the category - * @param config The configuration of the category - */ -- function configureEModeCategory(uint8 id, DataTypes.EModeCategory memory config) external; -+ function configureEModeCategory( -+ uint8 id, -+ DataTypes.EModeCategoryBaseConfiguration memory config -+ ) external; -+ -+ /** -+ * @notice Replaces the current eMode collateralBitmap. -+ * @param id The id of the category -+ * @param collateralBitmap The collateralBitmap of the category -+ */ -+ function configureEModeCategoryCollateralBitmap(uint8 id, uint128 collateralBitmap) external; -+ -+ /** -+ * @notice Replaces the current eMode borrowableBitmap. -+ * @param id The id of the category -+ * @param borrowableBitmap The borrowableBitmap of the category -+ */ -+ function configureEModeCategoryBorrowableBitmap(uint8 id, uint128 borrowableBitmap) external; - - /** - * @notice Returns the data of an eMode category -+ * @dev DEPRECATED use independent getters instead - * @param id The id of the category - * @return The configuration data of the category - */ -- function getEModeCategoryData(uint8 id) external view returns (DataTypes.EModeCategory memory); -+ function getEModeCategoryData( -+ uint8 id -+ ) external view returns (DataTypes.EModeCategoryLegacy memory); -+ -+ /** -+ * @notice Returns the label of an eMode category -+ * @param id The id of the category -+ * @return The label of the category -+ */ -+ function getEModeCategoryLabel(uint8 id) external view returns (string memory); -+ -+ /** -+ * @notice Returns the collateral config of an eMode category -+ * @param id The id of the category -+ * @return The ltv,lt,lb of the category -+ */ -+ function getEModeCategoryCollateralConfig( -+ uint8 id -+ ) external view returns (DataTypes.CollateralConfig memory); -+ -+ /** -+ * @notice Returns the collateralBitmap of an eMode category -+ * @param id The id of the category -+ * @return The collateralBitmap of the category -+ */ -+ function getEModeCategoryCollateralBitmap(uint8 id) external view returns (uint128); -+ -+ /** -+ * @notice Returns the borrowableBitmap of an eMode category -+ * @param id The id of the category -+ * @return The borrowableBitmap of the category -+ */ -+ function getEModeCategoryBorrowableBitmap(uint8 id) external view returns (uint128); - - /** - * @notice Allows a user to use the protocol in eMode -@@ -1420,10 +1536,20 @@ interface IPool { - function resetIsolationModeTotalDebt(address asset) external; - - /** -- * @notice Returns the percentage of available liquidity that can be borrowed at once at stable rate -- * @return The percentage of available liquidity to borrow, expressed in bps -- */ -- function MAX_STABLE_RATE_BORROW_SIZE_PERCENT() external view returns (uint256); -+ * @notice Sets the liquidation grace period of the given asset -+ * @dev To enable a liquidation grace period, a timestamp in the future should be set, -+ * To disable a liquidation grace period, any timestamp in the past works, like 0 -+ * @param asset The address of the underlying asset to set the liquidationGracePeriod -+ * @param until Timestamp when the liquidation grace period will end -+ **/ -+ function setLiquidationGracePeriod(address asset, uint40 until) external; -+ -+ /** -+ * @notice Returns the liquidation grace period of the given asset -+ * @param asset The address of the underlying asset -+ * @return Timestamp when the liquidation grace period will end -+ **/ -+ function getLiquidationGracePeriod(address asset) external returns (uint40); - - /** - * @notice Returns the total fee on flash loans -@@ -1452,7 +1578,7 @@ interface IPool { - /** - * @notice Mints the assets accrued through the reserve factor to the treasury in the form of aTokens - * @param assets The list of reserves for which the minting needs to be executed -- **/ -+ */ - function mintToTreasury(address[] calldata assets) external; - - /** -@@ -1474,11 +1600,46 @@ interface IPool { - * is a different wallet - * @param referralCode Code used to register the integrator originating the operation, for potential rewards. - * 0 if the action is executed directly by the user, without any middle-man -- **/ -+ */ - function deposit(address asset, uint256 amount, address onBehalfOf, uint16 referralCode) external; -+ -+ /** -+ * @notice Gets the address of the external FlashLoanLogic -+ */ -+ function getFlashLoanLogic() external view returns (address); -+ -+ /** -+ * @notice Gets the address of the external BorrowLogic -+ */ -+ function getBorrowLogic() external view returns (address); -+ -+ /** -+ * @notice Gets the address of the external BridgeLogic -+ */ -+ function getBridgeLogic() external view returns (address); -+ -+ /** -+ * @notice Gets the address of the external EModeLogic -+ */ -+ function getEModeLogic() external view returns (address); -+ -+ /** -+ * @notice Gets the address of the external LiquidationLogic -+ */ -+ function getLiquidationLogic() external view returns (address); -+ -+ /** -+ * @notice Gets the address of the external PoolLogic -+ */ -+ function getPoolLogic() external view returns (address); -+ -+ /** -+ * @notice Gets the address of the external SupplyLogic -+ */ -+ function getSupplyLogic() external view returns (address); - } - + -// downloads/ARBITRUM/L2_ENCODER/L2Encoder/@aave/core-v3/contracts/misc/L2Encoder.sol +// downloads/LINEA/L2_ENCODER/L2Encoder/src/contracts/helpers/L2Encoder.sol - + /** * @title L2Encoder @@ -1512,7 +1673,7 @@ contract L2Encoder { @@ -1041,7 +15,7 @@ index 9ab49b3..42a5580 100644 ) external view returns (bytes32) { - DataTypes.ReserveData memory data = POOL.getReserveData(asset); + DataTypes.ReserveDataLegacy memory data = POOL.getReserveData(asset); - + uint16 assetId = data.id; uint128 shortenedAmount = amount.toUint128(); @@ -1548,7 +1709,7 @@ contract L2Encoder { @@ -1050,7 +24,7 @@ index 9ab49b3..42a5580 100644 ) external view returns (bytes32, bytes32, bytes32) { - DataTypes.ReserveData memory data = POOL.getReserveData(asset); + DataTypes.ReserveDataLegacy memory data = POOL.getReserveData(asset); - + uint16 assetId = data.id; uint128 shortenedAmount = amount.toUint128(); @@ -1576,7 +1737,7 @@ contract L2Encoder { @@ -1059,7 +33,7 @@ index 9ab49b3..42a5580 100644 function encodeWithdrawParams(address asset, uint256 amount) external view returns (bytes32) { - DataTypes.ReserveData memory data = POOL.getReserveData(asset); + DataTypes.ReserveDataLegacy memory data = POOL.getReserveData(asset); - + uint16 assetId = data.id; uint128 shortenedAmount = amount == type(uint256).max ? type(uint128).max : amount.toUint128(); @@ -1593,7 +1754,7 @@ contract L2Encoder { @@ -1077,7 +51,7 @@ index 9ab49b3..42a5580 100644 ) external view returns (bytes32) { - DataTypes.ReserveData memory data = POOL.getReserveData(asset); + DataTypes.ReserveDataLegacy memory data = POOL.getReserveData(asset); - + uint16 assetId = data.id; uint128 shortenedAmount = amount.toUint128(); @@ -1628,7 +1789,7 @@ contract L2Encoder { @@ -1095,7 +69,7 @@ index 9ab49b3..42a5580 100644 ) public view returns (bytes32) { - DataTypes.ReserveData memory data = POOL.getReserveData(asset); + DataTypes.ReserveDataLegacy memory data = POOL.getReserveData(asset); - + uint16 assetId = data.id; uint128 shortenedAmount = amount == type(uint256).max ? type(uint128).max : amount.toUint128(); @@ -1655,7 +1816,7 @@ contract L2Encoder { @@ -1113,7 +87,7 @@ index 9ab49b3..42a5580 100644 ) external view returns (bytes32, bytes32, bytes32) { - DataTypes.ReserveData memory data = POOL.getReserveData(asset); + DataTypes.ReserveDataLegacy memory data = POOL.getReserveData(asset); - + uint16 assetId = data.id; uint128 shortenedAmount = amount == type(uint256).max ? type(uint128).max : amount.toUint128(); @@ -1701,7 +1862,7 @@ contract L2Encoder { @@ -1128,7 +102,7 @@ index 9ab49b3..42a5580 100644 @@ -1712,46 +1873,6 @@ contract L2Encoder { return encodeRepayParams(asset, amount, interestRateMode); } - + - /** - * @notice Encodes swap borrow rate mode parameters from standard input to compact representation of 1 bytes32 - * @param asset The address of the underlying asset borrowed @@ -1188,10 +162,10 @@ index 9ab49b3..42a5580 100644 - DataTypes.ReserveData memory collateralData = POOL.getReserveData(collateralAsset); + DataTypes.ReserveDataLegacy memory collateralData = POOL.getReserveData(collateralAsset); uint16 collateralAssetId = collateralData.id; - + - DataTypes.ReserveData memory debtData = POOL.getReserveData(debtAsset); + DataTypes.ReserveDataLegacy memory debtData = POOL.getReserveData(debtAsset); uint16 debtAssetId = debtData.id; - + uint128 shortenedDebtToCover = debtToCover == type(uint256).max ``` diff --git a/diffs/ARBITRUM_LINEA/L2_POOL_IMPL_DIFF.md b/diffs/ARBITRUM_LINEA/L2_POOL_IMPL_DIFF.md index 9f565d5f..219626fa 100644 --- a/diffs/ARBITRUM_LINEA/L2_POOL_IMPL_DIFF.md +++ b/diffs/ARBITRUM_LINEA/L2_POOL_IMPL_DIFF.md @@ -3,427 +3,10 @@ diff --git a/./downloads/ARBITRUM/L2_POOL_IMPL.sol b/./downloads/LINEA/L2_POOL_I index 50a2a4d..8f4817d 100644 --- a/./downloads/ARBITRUM/L2_POOL_IMPL.sol +++ b/./downloads/LINEA/L2_POOL_IMPL.sol -@@ -1,7 +1,7 @@ - // SPDX-License-Identifier: BUSL-1.1 - pragma solidity ^0.8.0 ^0.8.10; - --// downloads/ARBITRUM/L2_POOL_IMPL/L2PoolInstance/lib/aave-v3-origin/src/contracts/dependencies/openzeppelin/contracts/Address.sol -+// downloads/LINEA/L2_POOL_IMPL/L2PoolInstance/src/contracts/dependencies/openzeppelin/contracts/Address.sol - - // OpenZeppelin Contracts v4.4.1 (utils/Address.sol) - -@@ -221,7 +221,7 @@ library Address { - } - } - --// downloads/ARBITRUM/L2_POOL_IMPL/L2PoolInstance/lib/aave-v3-origin/src/contracts/dependencies/openzeppelin/contracts/Context.sol -+// downloads/LINEA/L2_POOL_IMPL/L2PoolInstance/src/contracts/dependencies/openzeppelin/contracts/Context.sol - - /* - * @dev Provides information about the current execution context, including the -@@ -244,7 +244,7 @@ abstract contract Context { - } - } - --// downloads/ARBITRUM/L2_POOL_IMPL/L2PoolInstance/lib/aave-v3-origin/src/contracts/dependencies/openzeppelin/contracts/IAccessControl.sol -+// downloads/LINEA/L2_POOL_IMPL/L2PoolInstance/src/contracts/dependencies/openzeppelin/contracts/IAccessControl.sol - - /** - * @dev External interface of AccessControl declared to support ERC165 detection. -@@ -334,7 +334,7 @@ interface IAccessControl { - function renounceRole(bytes32 role, address account) external; - } - --// downloads/ARBITRUM/L2_POOL_IMPL/L2PoolInstance/lib/aave-v3-origin/src/contracts/dependencies/openzeppelin/contracts/IERC20.sol -+// downloads/LINEA/L2_POOL_IMPL/L2PoolInstance/src/contracts/dependencies/openzeppelin/contracts/IERC20.sol - - /** - * @dev Interface of the ERC20 standard as defined in the EIP. -@@ -410,7 +410,7 @@ interface IERC20 { - event Approval(address indexed owner, address indexed spender, uint256 value); - } - --// downloads/ARBITRUM/L2_POOL_IMPL/L2PoolInstance/lib/aave-v3-origin/src/contracts/dependencies/openzeppelin/contracts/SafeCast.sol -+// downloads/LINEA/L2_POOL_IMPL/L2PoolInstance/src/contracts/dependencies/openzeppelin/contracts/SafeCast.sol - - // OpenZeppelin Contracts v4.4.1 (utils/math/SafeCast.sol) - -@@ -666,7 +666,7 @@ library SafeCast { - } - } - --// downloads/ARBITRUM/L2_POOL_IMPL/L2PoolInstance/lib/aave-v3-origin/src/contracts/interfaces/IAaveIncentivesController.sol -+// downloads/LINEA/L2_POOL_IMPL/L2PoolInstance/src/contracts/interfaces/IAaveIncentivesController.sol - - /** - * @title IAaveIncentivesController -@@ -685,7 +685,7 @@ interface IAaveIncentivesController { - function handleAction(address user, uint256 totalSupply, uint256 userBalance) external; - } - --// downloads/ARBITRUM/L2_POOL_IMPL/L2PoolInstance/lib/aave-v3-origin/src/contracts/interfaces/IL2Pool.sol -+// downloads/LINEA/L2_POOL_IMPL/L2PoolInstance/src/contracts/interfaces/IL2Pool.sol - - /** - * @title IL2Pool -@@ -801,7 +801,7 @@ interface IL2Pool { - function liquidationCall(bytes32 args1, bytes32 args2) external; - } - --// downloads/ARBITRUM/L2_POOL_IMPL/L2PoolInstance/lib/aave-v3-origin/src/contracts/interfaces/IPoolAddressesProvider.sol -+// downloads/LINEA/L2_POOL_IMPL/L2PoolInstance/src/contracts/interfaces/IPoolAddressesProvider.sol - - /** - * @title IPoolAddressesProvider -@@ -1028,7 +1028,7 @@ interface IPoolAddressesProvider { - function setPoolDataProvider(address newDataProvider) external; - } - --// downloads/ARBITRUM/L2_POOL_IMPL/L2PoolInstance/lib/aave-v3-origin/src/contracts/interfaces/IPriceOracleGetter.sol -+// downloads/LINEA/L2_POOL_IMPL/L2PoolInstance/src/contracts/interfaces/IPriceOracleGetter.sol - - /** - * @title IPriceOracleGetter -@@ -1058,7 +1058,7 @@ interface IPriceOracleGetter { - function getAssetPrice(address asset) external view returns (uint256); - } - --// downloads/ARBITRUM/L2_POOL_IMPL/L2PoolInstance/lib/aave-v3-origin/src/contracts/interfaces/IScaledBalanceToken.sol -+// downloads/LINEA/L2_POOL_IMPL/L2PoolInstance/src/contracts/interfaces/IScaledBalanceToken.sol - - /** - * @title IScaledBalanceToken -@@ -1130,7 +1130,7 @@ interface IScaledBalanceToken { - function getPreviousIndex(address user) external view returns (uint256); - } - --// downloads/ARBITRUM/L2_POOL_IMPL/L2PoolInstance/lib/aave-v3-origin/src/contracts/misc/aave-upgradeability/VersionedInitializable.sol -+// downloads/LINEA/L2_POOL_IMPL/L2PoolInstance/src/contracts/misc/aave-upgradeability/VersionedInitializable.sol - - /** - * @title VersionedInitializable -@@ -1207,7 +1207,7 @@ abstract contract VersionedInitializable { - uint256[50] private ______gap; - } - --// downloads/ARBITRUM/L2_POOL_IMPL/L2PoolInstance/lib/aave-v3-origin/src/contracts/protocol/libraries/helpers/Errors.sol -+// downloads/LINEA/L2_POOL_IMPL/L2PoolInstance/src/contracts/protocol/libraries/helpers/Errors.sol - - /** - * @title Errors library -@@ -1310,7 +1310,7 @@ library Errors { - string public constant NOT_BORROWABLE_IN_EMODE = '100'; // Asset not borrowable in eMode - } - --// downloads/ARBITRUM/L2_POOL_IMPL/L2PoolInstance/lib/aave-v3-origin/src/contracts/protocol/libraries/logic/CalldataLogic.sol -+// downloads/LINEA/L2_POOL_IMPL/L2PoolInstance/src/contracts/protocol/libraries/logic/CalldataLogic.sol - - /** - * @title CalldataLogic library -@@ -1543,7 +1543,7 @@ library CalldataLogic { - } - } - --// downloads/ARBITRUM/L2_POOL_IMPL/L2PoolInstance/lib/aave-v3-origin/src/contracts/protocol/libraries/math/PercentageMath.sol -+// downloads/LINEA/L2_POOL_IMPL/L2PoolInstance/src/contracts/protocol/libraries/math/PercentageMath.sol - - /** - * @title PercentageMath library -@@ -1604,7 +1604,7 @@ library PercentageMath { - } - } - --// downloads/ARBITRUM/L2_POOL_IMPL/L2PoolInstance/lib/aave-v3-origin/src/contracts/protocol/libraries/math/WadRayMath.sol -+// downloads/LINEA/L2_POOL_IMPL/L2PoolInstance/src/contracts/protocol/libraries/math/WadRayMath.sol - - /** - * @title WadRayMath library -@@ -1730,7 +1730,7 @@ library WadRayMath { - } - } - --// downloads/ARBITRUM/L2_POOL_IMPL/L2PoolInstance/lib/aave-v3-origin/src/contracts/protocol/libraries/types/DataTypes.sol -+// downloads/LINEA/L2_POOL_IMPL/L2PoolInstance/src/contracts/protocol/libraries/types/DataTypes.sol - - library DataTypes { - /** -@@ -2054,7 +2054,7 @@ library DataTypes { - } - } - --// downloads/ARBITRUM/L2_POOL_IMPL/L2PoolInstance/lib/aave-v3-origin/src/contracts/dependencies/gnosis/contracts/GPv2SafeERC20.sol -+// downloads/LINEA/L2_POOL_IMPL/L2PoolInstance/src/contracts/dependencies/gnosis/contracts/GPv2SafeERC20.sol - - /// @title Gnosis Protocol v2 Safe ERC20 Transfer Library - /// @author Gnosis Developers -@@ -2167,7 +2167,7 @@ library GPv2SafeERC20 { - } - } - --// downloads/ARBITRUM/L2_POOL_IMPL/L2PoolInstance/lib/aave-v3-origin/src/contracts/dependencies/openzeppelin/contracts/IERC20Detailed.sol -+// downloads/LINEA/L2_POOL_IMPL/L2PoolInstance/src/contracts/dependencies/openzeppelin/contracts/IERC20Detailed.sol - - interface IERC20Detailed is IERC20 { - function name() external view returns (string memory); -@@ -2177,7 +2177,7 @@ interface IERC20Detailed is IERC20 { - function decimals() external view returns (uint8); - } - --// downloads/ARBITRUM/L2_POOL_IMPL/L2PoolInstance/lib/aave-v3-origin/src/contracts/interfaces/IACLManager.sol -+// downloads/LINEA/L2_POOL_IMPL/L2PoolInstance/src/contracts/interfaces/IACLManager.sol - - /** - * @title IACLManager -@@ -2350,7 +2350,7 @@ interface IACLManager { - function isAssetListingAdmin(address admin) external view returns (bool); - } - --// downloads/ARBITRUM/L2_POOL_IMPL/L2PoolInstance/lib/aave-v3-origin/src/contracts/interfaces/IERC20WithPermit.sol -+// downloads/LINEA/L2_POOL_IMPL/L2PoolInstance/src/contracts/interfaces/IERC20WithPermit.sol - - /** - * @title IERC20WithPermit -@@ -2381,7 +2381,7 @@ interface IERC20WithPermit is IERC20 { - ) external; - } - --// downloads/ARBITRUM/L2_POOL_IMPL/L2PoolInstance/lib/aave-v3-origin/src/contracts/interfaces/IPriceOracleSentinel.sol -+// downloads/LINEA/L2_POOL_IMPL/L2PoolInstance/src/contracts/interfaces/IPriceOracleSentinel.sol - - /** - * @title IPriceOracleSentinel -@@ -2446,7 +2446,7 @@ interface IPriceOracleSentinel { - function getGracePeriod() external view returns (uint256); - } - --// downloads/ARBITRUM/L2_POOL_IMPL/L2PoolInstance/lib/aave-v3-origin/src/contracts/interfaces/IReserveInterestRateStrategy.sol -+// downloads/LINEA/L2_POOL_IMPL/L2PoolInstance/src/contracts/interfaces/IReserveInterestRateStrategy.sol - - /** - * @title IReserveInterestRateStrategy -@@ -2473,7 +2473,7 @@ interface IReserveInterestRateStrategy { - ) external view returns (uint256, uint256); - } - --// downloads/ARBITRUM/L2_POOL_IMPL/L2PoolInstance/lib/aave-v3-origin/src/contracts/protocol/libraries/math/MathUtils.sol -+// downloads/LINEA/L2_POOL_IMPL/L2PoolInstance/src/contracts/protocol/libraries/math/MathUtils.sol - - /** - * @title MathUtils library -@@ -2570,7 +2570,7 @@ library MathUtils { - } - } - --// downloads/ARBITRUM/L2_POOL_IMPL/L2PoolInstance/lib/aave-v3-origin/src/contracts/interfaces/IPool.sol -+// downloads/LINEA/L2_POOL_IMPL/L2PoolInstance/src/contracts/interfaces/IPool.sol - - /** - * @title IPool -@@ -3401,7 +3401,7 @@ interface IPool { - function getSupplyLogic() external view returns (address); - } - --// downloads/ARBITRUM/L2_POOL_IMPL/L2PoolInstance/lib/aave-v3-origin/src/contracts/protocol/libraries/configuration/ReserveConfiguration.sol -+// downloads/LINEA/L2_POOL_IMPL/L2PoolInstance/src/contracts/protocol/libraries/configuration/ReserveConfiguration.sol - - /** - * @title ReserveConfiguration library -@@ -3982,7 +3982,7 @@ library ReserveConfiguration { - } - } - --// downloads/ARBITRUM/L2_POOL_IMPL/L2PoolInstance/lib/aave-v3-origin/src/contracts/misc/flashloan/interfaces/IFlashLoanReceiver.sol -+// downloads/LINEA/L2_POOL_IMPL/L2PoolInstance/src/contracts/misc/flashloan/interfaces/IFlashLoanReceiver.sol - - /** - * @title IFlashLoanReceiver -@@ -4015,7 +4015,7 @@ interface IFlashLoanReceiver { - function POOL() external view returns (IPool); - } - --// downloads/ARBITRUM/L2_POOL_IMPL/L2PoolInstance/lib/aave-v3-origin/src/contracts/misc/flashloan/interfaces/IFlashLoanSimpleReceiver.sol -+// downloads/LINEA/L2_POOL_IMPL/L2PoolInstance/src/contracts/misc/flashloan/interfaces/IFlashLoanSimpleReceiver.sol - - /** - * @title IFlashLoanSimpleReceiver -@@ -4048,7 +4048,7 @@ interface IFlashLoanSimpleReceiver { - function POOL() external view returns (IPool); - } - --// downloads/ARBITRUM/L2_POOL_IMPL/L2PoolInstance/lib/aave-v3-origin/src/contracts/protocol/libraries/configuration/EModeConfiguration.sol -+// downloads/LINEA/L2_POOL_IMPL/L2PoolInstance/src/contracts/protocol/libraries/configuration/EModeConfiguration.sol - - /** - * @title EModeConfiguration library -@@ -4097,7 +4097,7 @@ library EModeConfiguration { - } - } - --// downloads/ARBITRUM/L2_POOL_IMPL/L2PoolInstance/lib/aave-v3-origin/src/contracts/protocol/libraries/configuration/UserConfiguration.sol -+// downloads/LINEA/L2_POOL_IMPL/L2PoolInstance/src/contracts/protocol/libraries/configuration/UserConfiguration.sol - - /** - * @title UserConfiguration library -@@ -4329,7 +4329,7 @@ library UserConfiguration { - } - } - --// downloads/ARBITRUM/L2_POOL_IMPL/L2PoolInstance/lib/aave-v3-origin/src/contracts/interfaces/IInitializableAToken.sol -+// downloads/LINEA/L2_POOL_IMPL/L2PoolInstance/src/contracts/interfaces/IInitializableAToken.sol - - /** - * @title IInitializableAToken -@@ -4382,7 +4382,7 @@ interface IInitializableAToken { - ) external; - } - --// downloads/ARBITRUM/L2_POOL_IMPL/L2PoolInstance/lib/aave-v3-origin/src/contracts/interfaces/IInitializableDebtToken.sol -+// downloads/LINEA/L2_POOL_IMPL/L2PoolInstance/src/contracts/interfaces/IInitializableDebtToken.sol - - /** - * @title IInitializableDebtToken -@@ -4431,7 +4431,7 @@ interface IInitializableDebtToken { - ) external; - } - --// downloads/ARBITRUM/L2_POOL_IMPL/L2PoolInstance/lib/aave-v3-origin/src/contracts/protocol/libraries/logic/IsolationModeLogic.sol -+// downloads/LINEA/L2_POOL_IMPL/L2PoolInstance/src/contracts/protocol/libraries/logic/IsolationModeLogic.sol - - /** - * @title IsolationModeLogic library -@@ -4490,7 +4490,7 @@ library IsolationModeLogic { - } - } - --// downloads/ARBITRUM/L2_POOL_IMPL/L2PoolInstance/lib/aave-v3-origin/src/contracts/interfaces/IVariableDebtToken.sol -+// downloads/LINEA/L2_POOL_IMPL/L2PoolInstance/src/contracts/interfaces/IVariableDebtToken.sol - - /** - * @title IVariableDebtToken -@@ -4533,7 +4533,7 @@ interface IVariableDebtToken is IScaledBalanceToken, IInitializableDebtToken { - function UNDERLYING_ASSET_ADDRESS() external view returns (address); - } - --// downloads/ARBITRUM/L2_POOL_IMPL/L2PoolInstance/lib/aave-v3-origin/src/contracts/interfaces/IAToken.sol -+// downloads/LINEA/L2_POOL_IMPL/L2PoolInstance/src/contracts/interfaces/IAToken.sol - - /** - * @title IAToken -@@ -4667,7 +4667,7 @@ interface IAToken is IERC20, IScaledBalanceToken, IInitializableAToken { - function rescueTokens(address token, address to, uint256 amount) external; - } - --// downloads/ARBITRUM/L2_POOL_IMPL/L2PoolInstance/lib/aave-v3-origin/src/contracts/protocol/tokenization/base/IncentivizedERC20.sol -+// downloads/LINEA/L2_POOL_IMPL/L2PoolInstance/src/contracts/protocol/tokenization/base/IncentivizedERC20.sol - - /** - * @title IncentivizedERC20 -@@ -4890,7 +4890,7 @@ abstract contract IncentivizedERC20 is Context, IERC20Detailed { - } - } - --// downloads/ARBITRUM/L2_POOL_IMPL/L2PoolInstance/lib/aave-v3-origin/src/contracts/protocol/libraries/logic/ReserveLogic.sol -+// downloads/LINEA/L2_POOL_IMPL/L2PoolInstance/src/contracts/protocol/libraries/logic/ReserveLogic.sol - - /** - * @title ReserveLogic library -@@ -5191,7 +5191,7 @@ library ReserveLogic { - } - } - --// downloads/ARBITRUM/L2_POOL_IMPL/L2PoolInstance/lib/aave-v3-origin/src/contracts/protocol/pool/PoolStorage.sol -+// downloads/LINEA/L2_POOL_IMPL/L2PoolInstance/src/contracts/protocol/pool/PoolStorage.sol - - /** - * @title PoolStorage -@@ -5237,7 +5237,7 @@ contract PoolStorage { - uint16 internal _reservesCount; - } - --// downloads/ARBITRUM/L2_POOL_IMPL/L2PoolInstance/lib/aave-v3-origin/src/contracts/protocol/libraries/logic/EModeLogic.sol -+// downloads/LINEA/L2_POOL_IMPL/L2PoolInstance/src/contracts/protocol/libraries/logic/EModeLogic.sol - - /** - * @title EModeLogic library -@@ -5299,7 +5299,7 @@ library EModeLogic { - } - } - --// downloads/ARBITRUM/L2_POOL_IMPL/L2PoolInstance/lib/aave-v3-origin/src/contracts/protocol/libraries/logic/GenericLogic.sol -+// downloads/LINEA/L2_POOL_IMPL/L2PoolInstance/src/contracts/protocol/libraries/logic/GenericLogic.sol - - /** - * @title GenericLogic library -@@ -5543,7 +5543,7 @@ library GenericLogic { - } - } - --// downloads/ARBITRUM/L2_POOL_IMPL/L2PoolInstance/lib/aave-v3-origin/src/contracts/protocol/libraries/logic/ValidationLogic.sol -+// downloads/LINEA/L2_POOL_IMPL/L2PoolInstance/src/contracts/protocol/libraries/logic/ValidationLogic.sol - - /** - * @title ReserveLogic library -@@ -6163,7 +6163,7 @@ library ValidationLogic { - } - } - --// downloads/ARBITRUM/L2_POOL_IMPL/L2PoolInstance/lib/aave-v3-origin/src/contracts/protocol/libraries/logic/BridgeLogic.sol -+// downloads/LINEA/L2_POOL_IMPL/L2PoolInstance/src/contracts/protocol/libraries/logic/BridgeLogic.sol - - library BridgeLogic { - using ReserveLogic for DataTypes.ReserveCache; -@@ -6300,7 +6300,7 @@ library BridgeLogic { - } - } - --// downloads/ARBITRUM/L2_POOL_IMPL/L2PoolInstance/lib/aave-v3-origin/src/contracts/protocol/libraries/logic/PoolLogic.sol -+// downloads/LINEA/L2_POOL_IMPL/L2PoolInstance/src/contracts/protocol/libraries/logic/PoolLogic.sol - - /** - * @title PoolLogic library -@@ -6489,7 +6489,7 @@ library PoolLogic { - } - } - --// downloads/ARBITRUM/L2_POOL_IMPL/L2PoolInstance/lib/aave-v3-origin/src/contracts/protocol/libraries/logic/SupplyLogic.sol -+// downloads/LINEA/L2_POOL_IMPL/L2PoolInstance/src/contracts/protocol/libraries/logic/SupplyLogic.sol - - /** - * @title SupplyLogic library -@@ -6777,7 +6777,7 @@ library SupplyLogic { - } - } - --// downloads/ARBITRUM/L2_POOL_IMPL/L2PoolInstance/lib/aave-v3-origin/src/contracts/protocol/libraries/logic/BorrowLogic.sol -+// downloads/LINEA/L2_POOL_IMPL/L2PoolInstance/src/contracts/protocol/libraries/logic/BorrowLogic.sol - - /** - * @title BorrowLogic library -@@ -6999,7 +6999,7 @@ library BorrowLogic { - } - } - --// downloads/ARBITRUM/L2_POOL_IMPL/L2PoolInstance/lib/aave-v3-origin/src/contracts/protocol/libraries/logic/LiquidationLogic.sol -+// downloads/LINEA/L2_POOL_IMPL/L2PoolInstance/src/contracts/protocol/libraries/logic/LiquidationLogic.sol - - /** - * @title LiquidationLogic library -@@ -7442,7 +7442,7 @@ library LiquidationLogic { - } - } - --// downloads/ARBITRUM/L2_POOL_IMPL/L2PoolInstance/lib/aave-v3-origin/src/contracts/protocol/libraries/logic/FlashLoanLogic.sol -+// downloads/LINEA/L2_POOL_IMPL/L2PoolInstance/src/contracts/protocol/libraries/logic/FlashLoanLogic.sol - - /** - * @title FlashLoanLogic library -@@ -7702,7 +7702,7 @@ library FlashLoanLogic { - } - } - + -// downloads/ARBITRUM/L2_POOL_IMPL/L2PoolInstance/lib/aave-v3-origin/src/contracts/protocol/pool/Pool.sol +// downloads/LINEA/L2_POOL_IMPL/L2PoolInstance/src/contracts/protocol/pool/Pool.sol - + /** * @title Pool contract @@ -8137,7 +8137,7 @@ abstract contract Pool is VersionedInitializable, PoolStorage, IPool { @@ -438,28 +21,5 @@ index 50a2a4d..8f4817d 100644 @@ -8555,7 +8555,7 @@ abstract contract Pool is VersionedInitializable, PoolStorage, IPool { } } - --// downloads/ARBITRUM/L2_POOL_IMPL/L2PoolInstance/lib/aave-v3-origin/src/contracts/instances/PoolInstance.sol -+// downloads/LINEA/L2_POOL_IMPL/L2PoolInstance/src/contracts/instances/PoolInstance.sol - - contract PoolInstance is Pool { - uint256 public constant POOL_REVISION = 6; -@@ -8578,7 +8578,7 @@ contract PoolInstance is Pool { - } - } - --// downloads/ARBITRUM/L2_POOL_IMPL/L2PoolInstance/lib/aave-v3-origin/src/contracts/protocol/pool/L2Pool.sol -+// downloads/LINEA/L2_POOL_IMPL/L2PoolInstance/src/contracts/protocol/pool/L2Pool.sol - - /** - * @title L2Pool -@@ -8675,7 +8675,7 @@ abstract contract L2Pool is Pool, IL2Pool { - } - } - --// downloads/ARBITRUM/L2_POOL_IMPL/L2PoolInstance/lib/aave-v3-origin/src/contracts/instances/L2PoolInstance.sol -+// downloads/LINEA/L2_POOL_IMPL/L2PoolInstance/src/contracts/instances/L2PoolInstance.sol - - contract L2PoolInstance is L2Pool, PoolInstance { - constructor(IPoolAddressesProvider provider) PoolInstance(provider) {} + ``` diff --git a/diffs/ARBITRUM_LINEA/LIQUIDATION_LOGIC_DIFF.md b/diffs/ARBITRUM_LINEA/LIQUIDATION_LOGIC_DIFF.md index d8b6009e..11c01a65 100644 --- a/diffs/ARBITRUM_LINEA/LIQUIDATION_LOGIC_DIFF.md +++ b/diffs/ARBITRUM_LINEA/LIQUIDATION_LOGIC_DIFF.md @@ -3,335 +3,5 @@ diff --git a/./downloads/ARBITRUM/LIQUIDATION_LOGIC.sol b/./downloads/LINEA/LIQU index 7169fb3..00aebcf 100644 --- a/./downloads/ARBITRUM/LIQUIDATION_LOGIC.sol +++ b/./downloads/LINEA/LIQUIDATION_LOGIC.sol -@@ -1,7 +1,7 @@ - // SPDX-License-Identifier: BUSL-1.1 - pragma solidity ^0.8.0 ^0.8.10; - --// downloads/ARBITRUM/LIQUIDATION_LOGIC/LiquidationLogic/src/contracts/dependencies/openzeppelin/contracts/Address.sol -+// downloads/LINEA/LIQUIDATION_LOGIC/LiquidationLogic/src/contracts/dependencies/openzeppelin/contracts/Address.sol - - // OpenZeppelin Contracts v4.4.1 (utils/Address.sol) - -@@ -221,7 +221,7 @@ library Address { - } - } - --// downloads/ARBITRUM/LIQUIDATION_LOGIC/LiquidationLogic/src/contracts/dependencies/openzeppelin/contracts/Context.sol -+// downloads/LINEA/LIQUIDATION_LOGIC/LiquidationLogic/src/contracts/dependencies/openzeppelin/contracts/Context.sol - - /* - * @dev Provides information about the current execution context, including the -@@ -244,7 +244,7 @@ abstract contract Context { - } - } - --// downloads/ARBITRUM/LIQUIDATION_LOGIC/LiquidationLogic/src/contracts/dependencies/openzeppelin/contracts/IAccessControl.sol -+// downloads/LINEA/LIQUIDATION_LOGIC/LiquidationLogic/src/contracts/dependencies/openzeppelin/contracts/IAccessControl.sol - - /** - * @dev External interface of AccessControl declared to support ERC165 detection. -@@ -334,7 +334,7 @@ interface IAccessControl { - function renounceRole(bytes32 role, address account) external; - } - --// downloads/ARBITRUM/LIQUIDATION_LOGIC/LiquidationLogic/src/contracts/dependencies/openzeppelin/contracts/IERC20.sol -+// downloads/LINEA/LIQUIDATION_LOGIC/LiquidationLogic/src/contracts/dependencies/openzeppelin/contracts/IERC20.sol - - /** - * @dev Interface of the ERC20 standard as defined in the EIP. -@@ -410,7 +410,7 @@ interface IERC20 { - event Approval(address indexed owner, address indexed spender, uint256 value); - } - --// downloads/ARBITRUM/LIQUIDATION_LOGIC/LiquidationLogic/src/contracts/dependencies/openzeppelin/contracts/SafeCast.sol -+// downloads/LINEA/LIQUIDATION_LOGIC/LiquidationLogic/src/contracts/dependencies/openzeppelin/contracts/SafeCast.sol - - // OpenZeppelin Contracts v4.4.1 (utils/math/SafeCast.sol) - -@@ -666,7 +666,7 @@ library SafeCast { - } - } - --// downloads/ARBITRUM/LIQUIDATION_LOGIC/LiquidationLogic/src/contracts/interfaces/IAaveIncentivesController.sol -+// downloads/LINEA/LIQUIDATION_LOGIC/LiquidationLogic/src/contracts/interfaces/IAaveIncentivesController.sol - - /** - * @title IAaveIncentivesController -@@ -685,7 +685,7 @@ interface IAaveIncentivesController { - function handleAction(address user, uint256 totalSupply, uint256 userBalance) external; - } - --// downloads/ARBITRUM/LIQUIDATION_LOGIC/LiquidationLogic/src/contracts/interfaces/IPoolAddressesProvider.sol -+// downloads/LINEA/LIQUIDATION_LOGIC/LiquidationLogic/src/contracts/interfaces/IPoolAddressesProvider.sol - - /** - * @title IPoolAddressesProvider -@@ -912,7 +912,7 @@ interface IPoolAddressesProvider { - function setPoolDataProvider(address newDataProvider) external; - } - --// downloads/ARBITRUM/LIQUIDATION_LOGIC/LiquidationLogic/src/contracts/interfaces/IPriceOracleGetter.sol -+// downloads/LINEA/LIQUIDATION_LOGIC/LiquidationLogic/src/contracts/interfaces/IPriceOracleGetter.sol - - /** - * @title IPriceOracleGetter -@@ -942,7 +942,7 @@ interface IPriceOracleGetter { - function getAssetPrice(address asset) external view returns (uint256); - } - --// downloads/ARBITRUM/LIQUIDATION_LOGIC/LiquidationLogic/src/contracts/interfaces/IScaledBalanceToken.sol -+// downloads/LINEA/LIQUIDATION_LOGIC/LiquidationLogic/src/contracts/interfaces/IScaledBalanceToken.sol - - /** - * @title IScaledBalanceToken -@@ -1014,7 +1014,7 @@ interface IScaledBalanceToken { - function getPreviousIndex(address user) external view returns (uint256); - } - --// downloads/ARBITRUM/LIQUIDATION_LOGIC/LiquidationLogic/src/contracts/protocol/libraries/helpers/Errors.sol -+// downloads/LINEA/LIQUIDATION_LOGIC/LiquidationLogic/src/contracts/protocol/libraries/helpers/Errors.sol - - /** - * @title Errors library -@@ -1117,7 +1117,7 @@ library Errors { - string public constant NOT_BORROWABLE_IN_EMODE = '100'; // Asset not borrowable in eMode - } - --// downloads/ARBITRUM/LIQUIDATION_LOGIC/LiquidationLogic/src/contracts/protocol/libraries/math/PercentageMath.sol -+// downloads/LINEA/LIQUIDATION_LOGIC/LiquidationLogic/src/contracts/protocol/libraries/math/PercentageMath.sol - - /** - * @title PercentageMath library -@@ -1178,7 +1178,7 @@ library PercentageMath { - } - } - --// downloads/ARBITRUM/LIQUIDATION_LOGIC/LiquidationLogic/src/contracts/protocol/libraries/math/WadRayMath.sol -+// downloads/LINEA/LIQUIDATION_LOGIC/LiquidationLogic/src/contracts/protocol/libraries/math/WadRayMath.sol - - /** - * @title WadRayMath library -@@ -1304,7 +1304,7 @@ library WadRayMath { - } - } - --// downloads/ARBITRUM/LIQUIDATION_LOGIC/LiquidationLogic/src/contracts/protocol/libraries/types/DataTypes.sol -+// downloads/LINEA/LIQUIDATION_LOGIC/LiquidationLogic/src/contracts/protocol/libraries/types/DataTypes.sol - - library DataTypes { - /** -@@ -1628,7 +1628,7 @@ library DataTypes { - } - } - --// downloads/ARBITRUM/LIQUIDATION_LOGIC/LiquidationLogic/src/contracts/dependencies/gnosis/contracts/GPv2SafeERC20.sol -+// downloads/LINEA/LIQUIDATION_LOGIC/LiquidationLogic/src/contracts/dependencies/gnosis/contracts/GPv2SafeERC20.sol - - /// @title Gnosis Protocol v2 Safe ERC20 Transfer Library - /// @author Gnosis Developers -@@ -1741,7 +1741,7 @@ library GPv2SafeERC20 { - } - } - --// downloads/ARBITRUM/LIQUIDATION_LOGIC/LiquidationLogic/src/contracts/dependencies/openzeppelin/contracts/IERC20Detailed.sol -+// downloads/LINEA/LIQUIDATION_LOGIC/LiquidationLogic/src/contracts/dependencies/openzeppelin/contracts/IERC20Detailed.sol - - interface IERC20Detailed is IERC20 { - function name() external view returns (string memory); -@@ -1751,7 +1751,7 @@ interface IERC20Detailed is IERC20 { - function decimals() external view returns (uint8); - } - --// downloads/ARBITRUM/LIQUIDATION_LOGIC/LiquidationLogic/src/contracts/interfaces/IACLManager.sol -+// downloads/LINEA/LIQUIDATION_LOGIC/LiquidationLogic/src/contracts/interfaces/IACLManager.sol - - /** - * @title IACLManager -@@ -1924,7 +1924,7 @@ interface IACLManager { - function isAssetListingAdmin(address admin) external view returns (bool); - } - --// downloads/ARBITRUM/LIQUIDATION_LOGIC/LiquidationLogic/src/contracts/interfaces/IPriceOracleSentinel.sol -+// downloads/LINEA/LIQUIDATION_LOGIC/LiquidationLogic/src/contracts/interfaces/IPriceOracleSentinel.sol - - /** - * @title IPriceOracleSentinel -@@ -1989,7 +1989,7 @@ interface IPriceOracleSentinel { - function getGracePeriod() external view returns (uint256); - } - --// downloads/ARBITRUM/LIQUIDATION_LOGIC/LiquidationLogic/src/contracts/interfaces/IReserveInterestRateStrategy.sol -+// downloads/LINEA/LIQUIDATION_LOGIC/LiquidationLogic/src/contracts/interfaces/IReserveInterestRateStrategy.sol - - /** - * @title IReserveInterestRateStrategy -@@ -2016,7 +2016,7 @@ interface IReserveInterestRateStrategy { - ) external view returns (uint256, uint256); - } - --// downloads/ARBITRUM/LIQUIDATION_LOGIC/LiquidationLogic/src/contracts/protocol/libraries/math/MathUtils.sol -+// downloads/LINEA/LIQUIDATION_LOGIC/LiquidationLogic/src/contracts/protocol/libraries/math/MathUtils.sol - - /** - * @title MathUtils library -@@ -2113,7 +2113,7 @@ library MathUtils { - } - } - --// downloads/ARBITRUM/LIQUIDATION_LOGIC/LiquidationLogic/src/contracts/interfaces/IPool.sol -+// downloads/LINEA/LIQUIDATION_LOGIC/LiquidationLogic/src/contracts/interfaces/IPool.sol - - /** - * @title IPool -@@ -2672,6 +2672,7 @@ interface IPool { - - /** - * @notice Returns the state and configuration of the reserve, including extra data included with Aave v3.1 -+ * @dev DEPRECATED use independent getters instead (getReserveData, getLiquidationGracePeriod) - * @param asset The address of the underlying asset of the reserve - * @return The state and configuration data of the reserve with virtual accounting - */ -@@ -2943,7 +2944,7 @@ interface IPool { - function getSupplyLogic() external view returns (address); - } - --// downloads/ARBITRUM/LIQUIDATION_LOGIC/LiquidationLogic/src/contracts/protocol/libraries/configuration/ReserveConfiguration.sol -+// downloads/LINEA/LIQUIDATION_LOGIC/LiquidationLogic/src/contracts/protocol/libraries/configuration/ReserveConfiguration.sol - - /** - * @title ReserveConfiguration library -@@ -2958,6 +2959,7 @@ library ReserveConfiguration { - uint256 internal constant ACTIVE_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFF; // prettier-ignore - uint256 internal constant FROZEN_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFDFFFFFFFFFFFFFF; // prettier-ignore - uint256 internal constant BORROWING_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFBFFFFFFFFFFFFFF; // prettier-ignore -+ // @notice there is an unoccupied hole of 1 bit at position 59 from pre 3.2 stableBorrowRateEnabled - uint256 internal constant PAUSED_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFF; // prettier-ignore - uint256 internal constant BORROWABLE_IN_ISOLATION_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFDFFFFFFFFFFFFFFF; // prettier-ignore - uint256 internal constant SILOED_BORROWING_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFBFFFFFFFFFFFFFFF; // prettier-ignore -@@ -2966,7 +2968,7 @@ library ReserveConfiguration { - uint256 internal constant BORROW_CAP_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000FFFFFFFFFFFFFFFFFFFF; // prettier-ignore - uint256 internal constant SUPPLY_CAP_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFF000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFF; // prettier-ignore - uint256 internal constant LIQUIDATION_PROTOCOL_FEE_MASK = 0xFFFFFFFFFFFFFFFFFFFFFF0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF; // prettier-ignore -- //@notice there is an unoccupied hole of 8 bits from 168 to 176 left from pre 3.2 eModeCategory -+ // @notice there is an unoccupied hole of 8 bits from 168 to 176 left from pre 3.2 eModeCategory - uint256 internal constant UNBACKED_MINT_CAP_MASK = 0xFFFFFFFFFFF000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF; // prettier-ignore - uint256 internal constant DEBT_CEILING_MASK = 0xF0000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF; // prettier-ignore - uint256 internal constant VIRTUAL_ACC_ACTIVE_MASK = 0xEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF; // prettier-ignore -@@ -3523,7 +3525,7 @@ library ReserveConfiguration { - } - } - --// downloads/ARBITRUM/LIQUIDATION_LOGIC/LiquidationLogic/src/contracts/protocol/libraries/configuration/EModeConfiguration.sol -+// downloads/LINEA/LIQUIDATION_LOGIC/LiquidationLogic/src/contracts/protocol/libraries/configuration/EModeConfiguration.sol - - /** - * @title EModeConfiguration library -@@ -3572,7 +3574,7 @@ library EModeConfiguration { - } - } - --// downloads/ARBITRUM/LIQUIDATION_LOGIC/LiquidationLogic/src/contracts/protocol/libraries/configuration/UserConfiguration.sol -+// downloads/LINEA/LIQUIDATION_LOGIC/LiquidationLogic/src/contracts/protocol/libraries/configuration/UserConfiguration.sol - - /** - * @title UserConfiguration library -@@ -3804,7 +3806,7 @@ library UserConfiguration { - } - } - --// downloads/ARBITRUM/LIQUIDATION_LOGIC/LiquidationLogic/src/contracts/interfaces/IInitializableAToken.sol -+// downloads/LINEA/LIQUIDATION_LOGIC/LiquidationLogic/src/contracts/interfaces/IInitializableAToken.sol - - /** - * @title IInitializableAToken -@@ -3857,7 +3859,7 @@ interface IInitializableAToken { - ) external; - } - --// downloads/ARBITRUM/LIQUIDATION_LOGIC/LiquidationLogic/src/contracts/interfaces/IInitializableDebtToken.sol -+// downloads/LINEA/LIQUIDATION_LOGIC/LiquidationLogic/src/contracts/interfaces/IInitializableDebtToken.sol - - /** - * @title IInitializableDebtToken -@@ -3906,7 +3908,7 @@ interface IInitializableDebtToken { - ) external; - } - --// downloads/ARBITRUM/LIQUIDATION_LOGIC/LiquidationLogic/src/contracts/protocol/libraries/logic/IsolationModeLogic.sol -+// downloads/LINEA/LIQUIDATION_LOGIC/LiquidationLogic/src/contracts/protocol/libraries/logic/IsolationModeLogic.sol - - /** - * @title IsolationModeLogic library -@@ -3965,7 +3967,7 @@ library IsolationModeLogic { - } - } - --// downloads/ARBITRUM/LIQUIDATION_LOGIC/LiquidationLogic/src/contracts/interfaces/IVariableDebtToken.sol -+// downloads/LINEA/LIQUIDATION_LOGIC/LiquidationLogic/src/contracts/interfaces/IVariableDebtToken.sol - - /** - * @title IVariableDebtToken -@@ -4008,7 +4010,7 @@ interface IVariableDebtToken is IScaledBalanceToken, IInitializableDebtToken { - function UNDERLYING_ASSET_ADDRESS() external view returns (address); - } - --// downloads/ARBITRUM/LIQUIDATION_LOGIC/LiquidationLogic/src/contracts/interfaces/IAToken.sol -+// downloads/LINEA/LIQUIDATION_LOGIC/LiquidationLogic/src/contracts/interfaces/IAToken.sol - - /** - * @title IAToken -@@ -4142,7 +4144,7 @@ interface IAToken is IERC20, IScaledBalanceToken, IInitializableAToken { - function rescueTokens(address token, address to, uint256 amount) external; - } - --// downloads/ARBITRUM/LIQUIDATION_LOGIC/LiquidationLogic/src/contracts/protocol/tokenization/base/IncentivizedERC20.sol -+// downloads/LINEA/LIQUIDATION_LOGIC/LiquidationLogic/src/contracts/protocol/tokenization/base/IncentivizedERC20.sol - - /** - * @title IncentivizedERC20 -@@ -4365,7 +4367,7 @@ abstract contract IncentivizedERC20 is Context, IERC20Detailed { - } - } - --// downloads/ARBITRUM/LIQUIDATION_LOGIC/LiquidationLogic/src/contracts/protocol/libraries/logic/ReserveLogic.sol -+// downloads/LINEA/LIQUIDATION_LOGIC/LiquidationLogic/src/contracts/protocol/libraries/logic/ReserveLogic.sol - - /** - * @title ReserveLogic library -@@ -4666,7 +4668,7 @@ library ReserveLogic { - } - } - --// downloads/ARBITRUM/LIQUIDATION_LOGIC/LiquidationLogic/src/contracts/protocol/libraries/logic/EModeLogic.sol -+// downloads/LINEA/LIQUIDATION_LOGIC/LiquidationLogic/src/contracts/protocol/libraries/logic/EModeLogic.sol - - /** - * @title EModeLogic library -@@ -4728,7 +4730,7 @@ library EModeLogic { - } - } - --// downloads/ARBITRUM/LIQUIDATION_LOGIC/LiquidationLogic/src/contracts/protocol/libraries/logic/GenericLogic.sol -+// downloads/LINEA/LIQUIDATION_LOGIC/LiquidationLogic/src/contracts/protocol/libraries/logic/GenericLogic.sol - - /** - * @title GenericLogic library -@@ -4972,7 +4974,7 @@ library GenericLogic { - } - } - --// downloads/ARBITRUM/LIQUIDATION_LOGIC/LiquidationLogic/src/contracts/protocol/libraries/logic/ValidationLogic.sol -+// downloads/LINEA/LIQUIDATION_LOGIC/LiquidationLogic/src/contracts/protocol/libraries/logic/ValidationLogic.sol - - /** - * @title ReserveLogic library -@@ -5592,7 +5594,7 @@ library ValidationLogic { - } - } - --// downloads/ARBITRUM/LIQUIDATION_LOGIC/LiquidationLogic/src/contracts/protocol/libraries/logic/LiquidationLogic.sol -+// downloads/LINEA/LIQUIDATION_LOGIC/LiquidationLogic/src/contracts/protocol/libraries/logic/LiquidationLogic.sol - - /** - * @title LiquidationLogic library + ``` diff --git a/diffs/ARBITRUM_LINEA/ORACLE_DIFF.md b/diffs/ARBITRUM_LINEA/ORACLE_DIFF.md index a34261f6..24883aa9 100644 --- a/diffs/ARBITRUM_LINEA/ORACLE_DIFF.md +++ b/diffs/ARBITRUM_LINEA/ORACLE_DIFF.md @@ -3,246 +3,14 @@ diff --git a/./downloads/ARBITRUM/ORACLE.sol b/./downloads/LINEA/ORACLE.sol index 4729969..9828b58 100644 --- a/./downloads/ARBITRUM/ORACLE.sol +++ b/./downloads/LINEA/ORACLE.sol -@@ -1,7 +1,7 @@ --// SPDX-License-Identifier: BUSL-1.1 --pragma solidity =0.8.10 ^0.8.0; -+// SPDX-License-Identifier: MIT -+pragma solidity ^0.8.0 ^0.8.10; - --// downloads/ARBITRUM/ORACLE/AaveOracle/@aave/core-v3/contracts/dependencies/chainlink/AggregatorInterface.sol -+// downloads/LINEA/ORACLE/AaveOracle/src/contracts/dependencies/chainlink/AggregatorInterface.sol - - // Chainlink Contracts v0.8 - -@@ -21,13 +21,13 @@ interface AggregatorInterface { - event NewRound(uint256 indexed roundId, address indexed startedBy, uint256 startedAt); - } - --// downloads/ARBITRUM/ORACLE/AaveOracle/@aave/core-v3/contracts/interfaces/IPoolAddressesProvider.sol -+// downloads/LINEA/ORACLE/AaveOracle/src/contracts/interfaces/IPoolAddressesProvider.sol - - /** - * @title IPoolAddressesProvider - * @author Aave - * @notice Defines the basic interface for a Pool Addresses Provider. -- **/ -+ */ - interface IPoolAddressesProvider { - /** - * @dev Emitted when the market identifier is updated. -@@ -122,7 +122,7 @@ interface IPoolAddressesProvider { - /** - * @notice Returns the id of the Aave market to which this contract points to. - * @return The market id -- **/ -+ */ - function getMarketId() external view returns (string memory); - - /** -@@ -164,27 +164,27 @@ interface IPoolAddressesProvider { - /** - * @notice Returns the address of the Pool proxy. - * @return The Pool proxy address -- **/ -+ */ - function getPool() external view returns (address); - - /** - * @notice Updates the implementation of the Pool, or creates a proxy - * setting the new `pool` implementation when the function is called for the first time. - * @param newPoolImpl The new Pool implementation -- **/ -+ */ - function setPoolImpl(address newPoolImpl) external; - - /** - * @notice Returns the address of the PoolConfigurator proxy. - * @return The PoolConfigurator proxy address -- **/ -+ */ - function getPoolConfigurator() external view returns (address); - - /** - * @notice Updates the implementation of the PoolConfigurator, or creates a proxy - * setting the new `PoolConfigurator` implementation when the function is called for the first time. - * @param newPoolConfiguratorImpl The new PoolConfigurator implementation -- **/ -+ */ - function setPoolConfiguratorImpl(address newPoolConfiguratorImpl) external; - - /** -@@ -208,7 +208,7 @@ interface IPoolAddressesProvider { - /** - * @notice Updates the address of the ACL manager. - * @param newAclManager The address of the new ACLManager -- **/ -+ */ - function setACLManager(address newAclManager) external; - - /** -@@ -232,7 +232,7 @@ interface IPoolAddressesProvider { - /** - * @notice Updates the address of the price oracle sentinel. - * @param newPriceOracleSentinel The address of the new PriceOracleSentinel -- **/ -+ */ - function setPriceOracleSentinel(address newPriceOracleSentinel) external; - - /** -@@ -244,41 +244,41 @@ interface IPoolAddressesProvider { - /** - * @notice Updates the address of the data provider. - * @param newDataProvider The address of the new DataProvider -- **/ -+ */ - function setPoolDataProvider(address newDataProvider) external; - } - --// downloads/ARBITRUM/ORACLE/AaveOracle/@aave/core-v3/contracts/interfaces/IPriceOracleGetter.sol -+// downloads/LINEA/ORACLE/AaveOracle/src/contracts/interfaces/IPriceOracleGetter.sol - - /** - * @title IPriceOracleGetter - * @author Aave - * @notice Interface for the Aave price oracle. -- **/ -+ */ - interface IPriceOracleGetter { - /** - * @notice Returns the base currency address - * @dev Address 0x0 is reserved for USD as base currency. - * @return Returns the base currency address. -- **/ -+ */ - function BASE_CURRENCY() external view returns (address); - - /** - * @notice Returns the base currency unit - * @dev 1 ether for ETH, 1e8 for USD. - * @return Returns the base currency unit. -- **/ -+ */ - function BASE_CURRENCY_UNIT() external view returns (uint256); - - /** - * @notice Returns the asset price in the base currency - * @param asset The address of the asset - * @return The price of the asset -- **/ -+ */ - function getAssetPrice(address asset) external view returns (uint256); - } - --// downloads/ARBITRUM/ORACLE/AaveOracle/@aave/core-v3/contracts/protocol/libraries/helpers/Errors.sol -+// downloads/LINEA/ORACLE/AaveOracle/src/contracts/protocol/libraries/helpers/Errors.sol - - /** - * @title Errors library -@@ -316,38 +316,33 @@ library Errors { - string public constant RESERVE_FROZEN = '28'; // 'Action cannot be performed because the reserve is frozen' - string public constant RESERVE_PAUSED = '29'; // 'Action cannot be performed because the reserve is paused' - string public constant BORROWING_NOT_ENABLED = '30'; // 'Borrowing is not enabled' -- string public constant STABLE_BORROWING_NOT_ENABLED = '31'; // 'Stable borrowing is not enabled' - string public constant NOT_ENOUGH_AVAILABLE_USER_BALANCE = '32'; // 'User cannot withdraw more than the available balance' - string public constant INVALID_INTEREST_RATE_MODE_SELECTED = '33'; // 'Invalid interest rate mode selected' - string public constant COLLATERAL_BALANCE_IS_ZERO = '34'; // 'The collateral balance is 0' - string public constant HEALTH_FACTOR_LOWER_THAN_LIQUIDATION_THRESHOLD = '35'; // 'Health factor is lesser than the liquidation threshold' - string public constant COLLATERAL_CANNOT_COVER_NEW_BORROW = '36'; // 'There is not enough collateral to cover a new borrow' - string public constant COLLATERAL_SAME_AS_BORROWING_CURRENCY = '37'; // 'Collateral is (mostly) the same currency that is being borrowed' -- string public constant AMOUNT_BIGGER_THAN_MAX_LOAN_SIZE_STABLE = '38'; // 'The requested amount is greater than the max loan size in stable rate mode' - string public constant NO_DEBT_OF_SELECTED_TYPE = '39'; // 'For repayment of a specific type of debt, the user needs to have debt that type' - string public constant NO_EXPLICIT_AMOUNT_TO_REPAY_ON_BEHALF = '40'; // 'To repay on behalf of a user an explicit amount to repay is needed' -- string public constant NO_OUTSTANDING_STABLE_DEBT = '41'; // 'User does not have outstanding stable rate debt on this reserve' - string public constant NO_OUTSTANDING_VARIABLE_DEBT = '42'; // 'User does not have outstanding variable rate debt on this reserve' - string public constant UNDERLYING_BALANCE_ZERO = '43'; // 'The underlying balance needs to be greater than 0' - string public constant INTEREST_RATE_REBALANCE_CONDITIONS_NOT_MET = '44'; // 'Interest rate rebalance conditions were not met' - string public constant HEALTH_FACTOR_NOT_BELOW_THRESHOLD = '45'; // 'Health factor is not below the threshold' - string public constant COLLATERAL_CANNOT_BE_LIQUIDATED = '46'; // 'The collateral chosen cannot be liquidated' - string public constant SPECIFIED_CURRENCY_NOT_BORROWED_BY_USER = '47'; // 'User did not borrow the specified currency' -- string public constant SAME_BLOCK_BORROW_REPAY = '48'; // 'Borrow and repay in same block is not allowed' - string public constant INCONSISTENT_FLASHLOAN_PARAMS = '49'; // 'Inconsistent flashloan parameters' - string public constant BORROW_CAP_EXCEEDED = '50'; // 'Borrow cap is exceeded' - string public constant SUPPLY_CAP_EXCEEDED = '51'; // 'Supply cap is exceeded' - string public constant UNBACKED_MINT_CAP_EXCEEDED = '52'; // 'Unbacked mint cap is exceeded' - string public constant DEBT_CEILING_EXCEEDED = '53'; // 'Debt ceiling is exceeded' -- string public constant ATOKEN_SUPPLY_NOT_ZERO = '54'; // 'AToken supply is not zero' -- string public constant STABLE_DEBT_NOT_ZERO = '55'; // 'Stable debt supply is not zero' -+ string public constant UNDERLYING_CLAIMABLE_RIGHTS_NOT_ZERO = '54'; // 'Claimable rights over underlying not zero (aToken supply or accruedToTreasury)' - string public constant VARIABLE_DEBT_SUPPLY_NOT_ZERO = '56'; // 'Variable debt supply is not zero' - string public constant LTV_VALIDATION_FAILED = '57'; // 'Ltv validation failed' - string public constant INCONSISTENT_EMODE_CATEGORY = '58'; // 'Inconsistent eMode category' - string public constant PRICE_ORACLE_SENTINEL_CHECK_FAILED = '59'; // 'Price oracle sentinel validation failed' - string public constant ASSET_NOT_BORROWABLE_IN_ISOLATION = '60'; // 'Asset is not borrowable in isolation mode' - string public constant RESERVE_ALREADY_INITIALIZED = '61'; // 'Reserve has already been initialized' -- string public constant USER_IN_ISOLATION_MODE = '62'; // 'User is in isolation mode' -+ string public constant USER_IN_ISOLATION_MODE_OR_LTV_ZERO = '62'; // 'User is in isolation mode or ltv is zero' - string public constant INVALID_LTV = '63'; // 'Invalid ltv parameter for the reserve' - string public constant INVALID_LIQ_THRESHOLD = '64'; // 'Invalid liquidity threshold parameter for the reserve' - string public constant INVALID_LIQ_BONUS = '65'; // 'Invalid liquidity bonus parameter for the reserve' -@@ -369,22 +364,30 @@ library Errors { - string public constant DEBT_CEILING_NOT_ZERO = '81'; // 'Debt ceiling is not zero' - string public constant ASSET_NOT_LISTED = '82'; // 'Asset is not listed' - string public constant INVALID_OPTIMAL_USAGE_RATIO = '83'; // 'Invalid optimal usage ratio' -- string public constant INVALID_OPTIMAL_STABLE_TO_TOTAL_DEBT_RATIO = '84'; // 'Invalid optimal stable to total debt ratio' - string public constant UNDERLYING_CANNOT_BE_RESCUED = '85'; // 'The underlying asset cannot be rescued' - string public constant ADDRESSES_PROVIDER_ALREADY_ADDED = '86'; // 'Reserve has already been added to reserve list' - string public constant POOL_ADDRESSES_DO_NOT_MATCH = '87'; // 'The token implementation pool address and the pool address provided by the initializing pool do not match' -- string public constant STABLE_BORROWING_ENABLED = '88'; // 'Stable borrowing is enabled' - string public constant SILOED_BORROWING_VIOLATION = '89'; // 'User is trying to borrow multiple assets including a siloed one' - string public constant RESERVE_DEBT_NOT_ZERO = '90'; // the total debt of the reserve needs to be 0 -+ string public constant FLASHLOAN_DISABLED = '91'; // FlashLoaning for this asset is disabled -+ string public constant INVALID_MAX_RATE = '92'; // The expect maximum borrow rate is invalid -+ string public constant WITHDRAW_TO_ATOKEN = '93'; // Withdrawing to the aToken is not allowed -+ string public constant SUPPLY_TO_ATOKEN = '94'; // Supplying to the aToken is not allowed -+ string public constant SLOPE_2_MUST_BE_GTE_SLOPE_1 = '95'; // Variable interest rate slope 2 can not be lower than slope 1 -+ string public constant CALLER_NOT_RISK_OR_POOL_OR_EMERGENCY_ADMIN = '96'; // 'The caller of the function is not a risk, pool or emergency admin' -+ string public constant LIQUIDATION_GRACE_SENTINEL_CHECK_FAILED = '97'; // 'Liquidation grace sentinel validation failed' -+ string public constant INVALID_GRACE_PERIOD = '98'; // Grace period above a valid range -+ string public constant INVALID_FREEZE_STATE = '99'; // Reserve is already in the passed freeze state -+ string public constant NOT_BORROWABLE_IN_EMODE = '100'; // Asset not borrowable in eMode - } - --// downloads/ARBITRUM/ORACLE/AaveOracle/@aave/core-v3/contracts/interfaces/IACLManager.sol -+// downloads/LINEA/ORACLE/AaveOracle/src/contracts/interfaces/IACLManager.sol - - /** - * @title IACLManager - * @author Aave - * @notice Defines the basic interface for the ACL Manager -- **/ -+ */ - interface IACLManager { - /** - * @notice Returns the contract address of the PoolAddressesProvider -@@ -500,7 +503,7 @@ interface IACLManager { - function addFlashBorrower(address borrower) external; - - /** -- * @notice Removes an admin as FlashBorrower -+ * @notice Removes an address as FlashBorrower - * @param borrower The address of the FlashBorrower to remove - */ - function removeFlashBorrower(address borrower) external; -@@ -551,7 +554,7 @@ interface IACLManager { - function isAssetListingAdmin(address admin) external view returns (bool); - } - --// downloads/ARBITRUM/ORACLE/AaveOracle/@aave/core-v3/contracts/interfaces/IAaveOracle.sol -+// downloads/LINEA/ORACLE/AaveOracle/src/contracts/interfaces/IAaveOracle.sol - - /** - * @title IAaveOracle -@@ -619,7 +622,7 @@ interface IAaveOracle is IPriceOracleGetter { - function getFallbackOracle() external view returns (address); - } - + -// downloads/ARBITRUM/ORACLE/AaveOracle/@aave/core-v3/contracts/misc/AaveOracle.sol +// downloads/LINEA/ORACLE/AaveOracle/src/contracts/misc/AaveOracle.sol - + /** * @title AaveOracle @@ -641,7 +644,7 @@ contract AaveOracle is IAaveOracle { - + /** * @dev Only asset listing or pool admin can call functions marked by this modifier. - **/ diff --git a/diffs/ARBITRUM_LINEA/POOL_ADDRESSES_PROVIDER_DIFF.md b/diffs/ARBITRUM_LINEA/POOL_ADDRESSES_PROVIDER_DIFF.md index 29683e64..484e3bae 100644 --- a/diffs/ARBITRUM_LINEA/POOL_ADDRESSES_PROVIDER_DIFF.md +++ b/diffs/ARBITRUM_LINEA/POOL_ADDRESSES_PROVIDER_DIFF.md @@ -3,229 +3,16 @@ diff --git a/./downloads/ARBITRUM/POOL_ADDRESSES_PROVIDER.sol b/./downloads/LINE index 9478e36..7a14597 100644 --- a/./downloads/ARBITRUM/POOL_ADDRESSES_PROVIDER.sol +++ b/./downloads/LINEA/POOL_ADDRESSES_PROVIDER.sol -@@ -1,7 +1,9 @@ - // SPDX-License-Identifier: BUSL-1.1 --pragma solidity =0.8.10; -+pragma solidity ^0.8.0 ^0.8.10; - --// downloads/ARBITRUM/POOL_ADDRESSES_PROVIDER/PoolAddressesProvider/@aave/core-v3/contracts/dependencies/openzeppelin/contracts/Address.sol -+// downloads/LINEA/POOL_ADDRESSES_PROVIDER/PoolAddressesProvider/src/contracts/dependencies/openzeppelin/contracts/Address.sol -+ -+// OpenZeppelin Contracts v4.4.1 (utils/Address.sol) - - /** - * @dev Collection of functions related to the address type -@@ -25,16 +27,15 @@ library Address { - * ==== - */ - function isContract(address account) internal view returns (bool) { -- // According to EIP-1052, 0x0 is the value returned for not-yet created accounts -- // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned -- // for accounts without code, i.e. `keccak256('')` -- bytes32 codehash; -- bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; -- // solhint-disable-next-line no-inline-assembly -+ // This method relies on extcodesize, which returns 0 for contracts in -+ // construction, since the code is only stored at the end of the -+ // constructor execution. -+ -+ uint256 size; - assembly { -- codehash := extcodehash(account) -+ size := extcodesize(account) - } -- return (codehash != accountHash && codehash != 0x0); -+ return size > 0; - } - - /** -@@ -56,13 +57,171 @@ library Address { - function sendValue(address payable recipient, uint256 amount) internal { - require(address(this).balance >= amount, 'Address: insufficient balance'); - -- // solhint-disable-next-line avoid-low-level-calls, avoid-call-value - (bool success, ) = recipient.call{value: amount}(''); - require(success, 'Address: unable to send value, recipient may have reverted'); - } -+ -+ /** -+ * @dev Performs a Solidity function call using a low level `call`. A -+ * plain `call` is an unsafe replacement for a function call: use this -+ * function instead. -+ * -+ * If `target` reverts with a revert reason, it is bubbled up by this -+ * function (like regular Solidity function calls). -+ * -+ * Returns the raw returned data. To convert to the expected return value, -+ * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. -+ * -+ * Requirements: -+ * -+ * - `target` must be a contract. -+ * - calling `target` with `data` must not revert. -+ * -+ * _Available since v3.1._ -+ */ -+ function functionCall(address target, bytes memory data) internal returns (bytes memory) { -+ return functionCall(target, data, 'Address: low-level call failed'); -+ } -+ -+ /** -+ * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with -+ * `errorMessage` as a fallback revert reason when `target` reverts. -+ * -+ * _Available since v3.1._ -+ */ -+ function functionCall( -+ address target, -+ bytes memory data, -+ string memory errorMessage -+ ) internal returns (bytes memory) { -+ return functionCallWithValue(target, data, 0, errorMessage); -+ } -+ -+ /** -+ * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], -+ * but also transferring `value` wei to `target`. -+ * -+ * Requirements: -+ * -+ * - the calling contract must have an ETH balance of at least `value`. -+ * - the called Solidity function must be `payable`. -+ * -+ * _Available since v3.1._ -+ */ -+ function functionCallWithValue( -+ address target, -+ bytes memory data, -+ uint256 value -+ ) internal returns (bytes memory) { -+ return functionCallWithValue(target, data, value, 'Address: low-level call with value failed'); -+ } -+ -+ /** -+ * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but -+ * with `errorMessage` as a fallback revert reason when `target` reverts. -+ * -+ * _Available since v3.1._ -+ */ -+ function functionCallWithValue( -+ address target, -+ bytes memory data, -+ uint256 value, -+ string memory errorMessage -+ ) internal returns (bytes memory) { -+ require(address(this).balance >= value, 'Address: insufficient balance for call'); -+ require(isContract(target), 'Address: call to non-contract'); -+ -+ (bool success, bytes memory returndata) = target.call{value: value}(data); -+ return verifyCallResult(success, returndata, errorMessage); -+ } -+ -+ /** -+ * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], -+ * but performing a static call. -+ * -+ * _Available since v3.3._ -+ */ -+ function functionStaticCall( -+ address target, -+ bytes memory data -+ ) internal view returns (bytes memory) { -+ return functionStaticCall(target, data, 'Address: low-level static call failed'); -+ } -+ -+ /** -+ * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], -+ * but performing a static call. -+ * -+ * _Available since v3.3._ -+ */ -+ function functionStaticCall( -+ address target, -+ bytes memory data, -+ string memory errorMessage -+ ) internal view returns (bytes memory) { -+ require(isContract(target), 'Address: static call to non-contract'); -+ -+ (bool success, bytes memory returndata) = target.staticcall(data); -+ return verifyCallResult(success, returndata, errorMessage); -+ } -+ -+ /** -+ * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], -+ * but performing a delegate call. -+ * -+ * _Available since v3.4._ -+ */ -+ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { -+ return functionDelegateCall(target, data, 'Address: low-level delegate call failed'); -+ } -+ -+ /** -+ * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], -+ * but performing a delegate call. -+ * -+ * _Available since v3.4._ -+ */ -+ function functionDelegateCall( -+ address target, -+ bytes memory data, -+ string memory errorMessage -+ ) internal returns (bytes memory) { -+ require(isContract(target), 'Address: delegate call to non-contract'); -+ -+ (bool success, bytes memory returndata) = target.delegatecall(data); -+ return verifyCallResult(success, returndata, errorMessage); -+ } -+ -+ /** -+ * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the -+ * revert reason using the provided one. -+ * -+ * _Available since v4.3._ -+ */ -+ function verifyCallResult( -+ bool success, -+ bytes memory returndata, -+ string memory errorMessage -+ ) internal pure returns (bytes memory) { -+ if (success) { -+ return returndata; -+ } else { -+ // Look for revert reason and bubble it up if present -+ if (returndata.length > 0) { -+ // The easiest way to bubble the revert reason is using memory via assembly -+ -+ assembly { -+ let returndata_size := mload(returndata) -+ revert(add(32, returndata), returndata_size) -+ } -+ } else { -+ revert(errorMessage); -+ } -+ } -+ } - } - --// downloads/ARBITRUM/POOL_ADDRESSES_PROVIDER/PoolAddressesProvider/@aave/core-v3/contracts/dependencies/openzeppelin/contracts/Context.sol -+// downloads/LINEA/POOL_ADDRESSES_PROVIDER/PoolAddressesProvider/src/contracts/dependencies/openzeppelin/contracts/Context.sol - - /* - * @dev Provides information about the current execution context, including the -@@ -85,7 +244,7 @@ abstract contract Context { - } - } - + -// downloads/ARBITRUM/POOL_ADDRESSES_PROVIDER/PoolAddressesProvider/@aave/core-v3/contracts/dependencies/openzeppelin/upgradeability/Proxy.sol +// downloads/LINEA/POOL_ADDRESSES_PROVIDER/PoolAddressesProvider/src/contracts/dependencies/openzeppelin/upgradeability/Proxy.sol - + /** * @title Proxy @@ -104,6 +263,14 @@ abstract contract Proxy { _fallback(); } - + + /** + * @dev Fallback function that will run if call data is empty. + * IMPORTANT. receive() on implementation contracts will be unreachable @@ -240,121 +27,14 @@ index 9478e36..7a14597 100644 @@ -158,13 +325,13 @@ abstract contract Proxy { } } - --// downloads/ARBITRUM/POOL_ADDRESSES_PROVIDER/PoolAddressesProvider/@aave/core-v3/contracts/interfaces/IPoolAddressesProvider.sol -+// downloads/LINEA/POOL_ADDRESSES_PROVIDER/PoolAddressesProvider/src/contracts/interfaces/IPoolAddressesProvider.sol - - /** - * @title IPoolAddressesProvider - * @author Aave - * @notice Defines the basic interface for a Pool Addresses Provider. -- **/ -+ */ - interface IPoolAddressesProvider { - /** - * @dev Emitted when the market identifier is updated. -@@ -259,7 +426,7 @@ interface IPoolAddressesProvider { - /** - * @notice Returns the id of the Aave market to which this contract points to. - * @return The market id -- **/ -+ */ - function getMarketId() external view returns (string memory); - - /** -@@ -301,27 +468,27 @@ interface IPoolAddressesProvider { - /** - * @notice Returns the address of the Pool proxy. - * @return The Pool proxy address -- **/ -+ */ - function getPool() external view returns (address); - - /** - * @notice Updates the implementation of the Pool, or creates a proxy - * setting the new `pool` implementation when the function is called for the first time. - * @param newPoolImpl The new Pool implementation -- **/ -+ */ - function setPoolImpl(address newPoolImpl) external; - - /** - * @notice Returns the address of the PoolConfigurator proxy. - * @return The PoolConfigurator proxy address -- **/ -+ */ - function getPoolConfigurator() external view returns (address); - - /** - * @notice Updates the implementation of the PoolConfigurator, or creates a proxy - * setting the new `PoolConfigurator` implementation when the function is called for the first time. - * @param newPoolConfiguratorImpl The new PoolConfigurator implementation -- **/ -+ */ - function setPoolConfiguratorImpl(address newPoolConfiguratorImpl) external; - - /** -@@ -345,7 +512,7 @@ interface IPoolAddressesProvider { - /** - * @notice Updates the address of the ACL manager. - * @param newAclManager The address of the new ACLManager -- **/ -+ */ - function setACLManager(address newAclManager) external; - - /** -@@ -369,7 +536,7 @@ interface IPoolAddressesProvider { - /** - * @notice Updates the address of the price oracle sentinel. - * @param newPriceOracleSentinel The address of the new PriceOracleSentinel -- **/ -+ */ - function setPriceOracleSentinel(address newPriceOracleSentinel) external; - - /** -@@ -381,11 +548,11 @@ interface IPoolAddressesProvider { - /** - * @notice Updates the address of the data provider. - * @param newDataProvider The address of the new DataProvider -- **/ -+ */ - function setPoolDataProvider(address newDataProvider) external; - } - --// downloads/ARBITRUM/POOL_ADDRESSES_PROVIDER/PoolAddressesProvider/@aave/core-v3/contracts/dependencies/openzeppelin/contracts/Ownable.sol -+// downloads/LINEA/POOL_ADDRESSES_PROVIDER/PoolAddressesProvider/src/contracts/dependencies/openzeppelin/contracts/Ownable.sol - - /** - * @dev Contract module which provides a basic access control mechanism, where -@@ -451,7 +618,7 @@ contract Ownable is Context { - } - } - --// downloads/ARBITRUM/POOL_ADDRESSES_PROVIDER/PoolAddressesProvider/@aave/core-v3/contracts/dependencies/openzeppelin/upgradeability/BaseUpgradeabilityProxy.sol -+// downloads/LINEA/POOL_ADDRESSES_PROVIDER/PoolAddressesProvider/src/contracts/dependencies/openzeppelin/upgradeability/BaseUpgradeabilityProxy.sol - - /** - * @title BaseUpgradeabilityProxy -@@ -514,7 +681,7 @@ contract BaseUpgradeabilityProxy is Proxy { - } - } - --// downloads/ARBITRUM/POOL_ADDRESSES_PROVIDER/PoolAddressesProvider/@aave/core-v3/contracts/dependencies/openzeppelin/upgradeability/InitializableUpgradeabilityProxy.sol -+// downloads/LINEA/POOL_ADDRESSES_PROVIDER/PoolAddressesProvider/src/contracts/dependencies/openzeppelin/upgradeability/InitializableUpgradeabilityProxy.sol - - /** - * @title InitializableUpgradeabilityProxy -@@ -541,7 +708,7 @@ contract InitializableUpgradeabilityProxy is BaseUpgradeabilityProxy { - } - } - + -// downloads/ARBITRUM/POOL_ADDRESSES_PROVIDER/PoolAddressesProvider/@aave/core-v3/contracts/protocol/libraries/aave-upgradeability/BaseImmutableAdminUpgradeabilityProxy.sol +// downloads/LINEA/POOL_ADDRESSES_PROVIDER/PoolAddressesProvider/src/contracts/misc/aave-upgradeability/BaseImmutableAdminUpgradeabilityProxy.sol - + /** * @title BaseImmutableAdminUpgradeabilityProxy @@ -558,10 +725,10 @@ contract BaseImmutableAdminUpgradeabilityProxy is BaseUpgradeabilityProxy { - + /** * @dev Constructor. - * @param admin The address of the admin @@ -365,24 +45,15 @@ index 9478e36..7a14597 100644 + constructor(address admin_) { + _admin = admin_; } - + modifier ifAdmin() { @@ -624,7 +791,7 @@ contract BaseImmutableAdminUpgradeabilityProxy is BaseUpgradeabilityProxy { } } - --// downloads/ARBITRUM/POOL_ADDRESSES_PROVIDER/PoolAddressesProvider/@aave/core-v3/contracts/protocol/libraries/aave-upgradeability/InitializableImmutableAdminUpgradeabilityProxy.sol -+// downloads/LINEA/POOL_ADDRESSES_PROVIDER/PoolAddressesProvider/src/contracts/misc/aave-upgradeability/InitializableImmutableAdminUpgradeabilityProxy.sol - - /** - * @title InitializableAdminUpgradeabilityProxy -@@ -649,7 +816,7 @@ contract InitializableImmutableAdminUpgradeabilityProxy is - } - } - + -// downloads/ARBITRUM/POOL_ADDRESSES_PROVIDER/PoolAddressesProvider/@aave/core-v3/contracts/protocol/configuration/PoolAddressesProvider.sol +// downloads/LINEA/POOL_ADDRESSES_PROVIDER/PoolAddressesProvider/src/contracts/protocol/configuration/PoolAddressesProvider.sol - + /** * @title PoolAddressesProvider @@ -657,7 +824,7 @@ contract InitializableImmutableAdminUpgradeabilityProxy is diff --git a/diffs/ARBITRUM_LINEA/POOL_ADDRESSES_PROVIDER_REGISTRY_DIFF.md b/diffs/ARBITRUM_LINEA/POOL_ADDRESSES_PROVIDER_REGISTRY_DIFF.md index ca9bad4f..0e867b6f 100644 --- a/diffs/ARBITRUM_LINEA/POOL_ADDRESSES_PROVIDER_REGISTRY_DIFF.md +++ b/diffs/ARBITRUM_LINEA/POOL_ADDRESSES_PROVIDER_REGISTRY_DIFF.md @@ -3,138 +3,10 @@ diff --git a/./downloads/ARBITRUM/POOL_ADDRESSES_PROVIDER_REGISTRY.sol b/./downl index b396e1f..8ab717f 100644 --- a/./downloads/ARBITRUM/POOL_ADDRESSES_PROVIDER_REGISTRY.sol +++ b/./downloads/LINEA/POOL_ADDRESSES_PROVIDER_REGISTRY.sol -@@ -1,7 +1,7 @@ - // SPDX-License-Identifier: BUSL-1.1 --pragma solidity =0.8.10; -+pragma solidity ^0.8.0 ^0.8.10; - --// downloads/ARBITRUM/POOL_ADDRESSES_PROVIDER_REGISTRY/PoolAddressesProviderRegistry/@aave/core-v3/contracts/dependencies/openzeppelin/contracts/Context.sol -+// downloads/LINEA/POOL_ADDRESSES_PROVIDER_REGISTRY/PoolAddressesProviderRegistry/src/contracts/dependencies/openzeppelin/contracts/Context.sol - - /* - * @dev Provides information about the current execution context, including the -@@ -24,13 +24,13 @@ abstract contract Context { - } - } - --// downloads/ARBITRUM/POOL_ADDRESSES_PROVIDER_REGISTRY/PoolAddressesProviderRegistry/@aave/core-v3/contracts/interfaces/IPoolAddressesProviderRegistry.sol -+// downloads/LINEA/POOL_ADDRESSES_PROVIDER_REGISTRY/PoolAddressesProviderRegistry/src/contracts/interfaces/IPoolAddressesProviderRegistry.sol - - /** - * @title IPoolAddressesProviderRegistry - * @author Aave - * @notice Defines the basic interface for an Aave Pool Addresses Provider Registry. -- **/ -+ */ - interface IPoolAddressesProviderRegistry { - /** - * @dev Emitted when a new AddressesProvider is registered. -@@ -49,7 +49,7 @@ interface IPoolAddressesProviderRegistry { - /** - * @notice Returns the list of registered addresses providers - * @return The list of addresses providers -- **/ -+ */ - function getAddressesProvidersList() external view returns (address[] memory); - - /** -@@ -74,17 +74,17 @@ interface IPoolAddressesProviderRegistry { - * @dev The id must not be used by an already registered PoolAddressesProvider - * @param provider The address of the new PoolAddressesProvider - * @param id The id for the new PoolAddressesProvider, referring to the market it belongs to -- **/ -+ */ - function registerAddressesProvider(address provider, uint256 id) external; - - /** - * @notice Removes an addresses provider from the list of registered addresses providers - * @param provider The PoolAddressesProvider address -- **/ -+ */ - function unregisterAddressesProvider(address provider) external; - } - --// downloads/ARBITRUM/POOL_ADDRESSES_PROVIDER_REGISTRY/PoolAddressesProviderRegistry/@aave/core-v3/contracts/protocol/libraries/helpers/Errors.sol -+// downloads/LINEA/POOL_ADDRESSES_PROVIDER_REGISTRY/PoolAddressesProviderRegistry/src/contracts/protocol/libraries/helpers/Errors.sol - - /** - * @title Errors library -@@ -122,38 +122,33 @@ library Errors { - string public constant RESERVE_FROZEN = '28'; // 'Action cannot be performed because the reserve is frozen' - string public constant RESERVE_PAUSED = '29'; // 'Action cannot be performed because the reserve is paused' - string public constant BORROWING_NOT_ENABLED = '30'; // 'Borrowing is not enabled' -- string public constant STABLE_BORROWING_NOT_ENABLED = '31'; // 'Stable borrowing is not enabled' - string public constant NOT_ENOUGH_AVAILABLE_USER_BALANCE = '32'; // 'User cannot withdraw more than the available balance' - string public constant INVALID_INTEREST_RATE_MODE_SELECTED = '33'; // 'Invalid interest rate mode selected' - string public constant COLLATERAL_BALANCE_IS_ZERO = '34'; // 'The collateral balance is 0' - string public constant HEALTH_FACTOR_LOWER_THAN_LIQUIDATION_THRESHOLD = '35'; // 'Health factor is lesser than the liquidation threshold' - string public constant COLLATERAL_CANNOT_COVER_NEW_BORROW = '36'; // 'There is not enough collateral to cover a new borrow' - string public constant COLLATERAL_SAME_AS_BORROWING_CURRENCY = '37'; // 'Collateral is (mostly) the same currency that is being borrowed' -- string public constant AMOUNT_BIGGER_THAN_MAX_LOAN_SIZE_STABLE = '38'; // 'The requested amount is greater than the max loan size in stable rate mode' - string public constant NO_DEBT_OF_SELECTED_TYPE = '39'; // 'For repayment of a specific type of debt, the user needs to have debt that type' - string public constant NO_EXPLICIT_AMOUNT_TO_REPAY_ON_BEHALF = '40'; // 'To repay on behalf of a user an explicit amount to repay is needed' -- string public constant NO_OUTSTANDING_STABLE_DEBT = '41'; // 'User does not have outstanding stable rate debt on this reserve' - string public constant NO_OUTSTANDING_VARIABLE_DEBT = '42'; // 'User does not have outstanding variable rate debt on this reserve' - string public constant UNDERLYING_BALANCE_ZERO = '43'; // 'The underlying balance needs to be greater than 0' - string public constant INTEREST_RATE_REBALANCE_CONDITIONS_NOT_MET = '44'; // 'Interest rate rebalance conditions were not met' - string public constant HEALTH_FACTOR_NOT_BELOW_THRESHOLD = '45'; // 'Health factor is not below the threshold' - string public constant COLLATERAL_CANNOT_BE_LIQUIDATED = '46'; // 'The collateral chosen cannot be liquidated' - string public constant SPECIFIED_CURRENCY_NOT_BORROWED_BY_USER = '47'; // 'User did not borrow the specified currency' -- string public constant SAME_BLOCK_BORROW_REPAY = '48'; // 'Borrow and repay in same block is not allowed' - string public constant INCONSISTENT_FLASHLOAN_PARAMS = '49'; // 'Inconsistent flashloan parameters' - string public constant BORROW_CAP_EXCEEDED = '50'; // 'Borrow cap is exceeded' - string public constant SUPPLY_CAP_EXCEEDED = '51'; // 'Supply cap is exceeded' - string public constant UNBACKED_MINT_CAP_EXCEEDED = '52'; // 'Unbacked mint cap is exceeded' - string public constant DEBT_CEILING_EXCEEDED = '53'; // 'Debt ceiling is exceeded' -- string public constant ATOKEN_SUPPLY_NOT_ZERO = '54'; // 'AToken supply is not zero' -- string public constant STABLE_DEBT_NOT_ZERO = '55'; // 'Stable debt supply is not zero' -+ string public constant UNDERLYING_CLAIMABLE_RIGHTS_NOT_ZERO = '54'; // 'Claimable rights over underlying not zero (aToken supply or accruedToTreasury)' - string public constant VARIABLE_DEBT_SUPPLY_NOT_ZERO = '56'; // 'Variable debt supply is not zero' - string public constant LTV_VALIDATION_FAILED = '57'; // 'Ltv validation failed' - string public constant INCONSISTENT_EMODE_CATEGORY = '58'; // 'Inconsistent eMode category' - string public constant PRICE_ORACLE_SENTINEL_CHECK_FAILED = '59'; // 'Price oracle sentinel validation failed' - string public constant ASSET_NOT_BORROWABLE_IN_ISOLATION = '60'; // 'Asset is not borrowable in isolation mode' - string public constant RESERVE_ALREADY_INITIALIZED = '61'; // 'Reserve has already been initialized' -- string public constant USER_IN_ISOLATION_MODE = '62'; // 'User is in isolation mode' -+ string public constant USER_IN_ISOLATION_MODE_OR_LTV_ZERO = '62'; // 'User is in isolation mode or ltv is zero' - string public constant INVALID_LTV = '63'; // 'Invalid ltv parameter for the reserve' - string public constant INVALID_LIQ_THRESHOLD = '64'; // 'Invalid liquidity threshold parameter for the reserve' - string public constant INVALID_LIQ_BONUS = '65'; // 'Invalid liquidity bonus parameter for the reserve' -@@ -175,16 +170,24 @@ library Errors { - string public constant DEBT_CEILING_NOT_ZERO = '81'; // 'Debt ceiling is not zero' - string public constant ASSET_NOT_LISTED = '82'; // 'Asset is not listed' - string public constant INVALID_OPTIMAL_USAGE_RATIO = '83'; // 'Invalid optimal usage ratio' -- string public constant INVALID_OPTIMAL_STABLE_TO_TOTAL_DEBT_RATIO = '84'; // 'Invalid optimal stable to total debt ratio' - string public constant UNDERLYING_CANNOT_BE_RESCUED = '85'; // 'The underlying asset cannot be rescued' - string public constant ADDRESSES_PROVIDER_ALREADY_ADDED = '86'; // 'Reserve has already been added to reserve list' - string public constant POOL_ADDRESSES_DO_NOT_MATCH = '87'; // 'The token implementation pool address and the pool address provided by the initializing pool do not match' -- string public constant STABLE_BORROWING_ENABLED = '88'; // 'Stable borrowing is enabled' - string public constant SILOED_BORROWING_VIOLATION = '89'; // 'User is trying to borrow multiple assets including a siloed one' - string public constant RESERVE_DEBT_NOT_ZERO = '90'; // the total debt of the reserve needs to be 0 -+ string public constant FLASHLOAN_DISABLED = '91'; // FlashLoaning for this asset is disabled -+ string public constant INVALID_MAX_RATE = '92'; // The expect maximum borrow rate is invalid -+ string public constant WITHDRAW_TO_ATOKEN = '93'; // Withdrawing to the aToken is not allowed -+ string public constant SUPPLY_TO_ATOKEN = '94'; // Supplying to the aToken is not allowed -+ string public constant SLOPE_2_MUST_BE_GTE_SLOPE_1 = '95'; // Variable interest rate slope 2 can not be lower than slope 1 -+ string public constant CALLER_NOT_RISK_OR_POOL_OR_EMERGENCY_ADMIN = '96'; // 'The caller of the function is not a risk, pool or emergency admin' -+ string public constant LIQUIDATION_GRACE_SENTINEL_CHECK_FAILED = '97'; // 'Liquidation grace sentinel validation failed' -+ string public constant INVALID_GRACE_PERIOD = '98'; // Grace period above a valid range -+ string public constant INVALID_FREEZE_STATE = '99'; // Reserve is already in the passed freeze state -+ string public constant NOT_BORROWABLE_IN_EMODE = '100'; // Asset not borrowable in eMode - } - --// downloads/ARBITRUM/POOL_ADDRESSES_PROVIDER_REGISTRY/PoolAddressesProviderRegistry/@aave/core-v3/contracts/dependencies/openzeppelin/contracts/Ownable.sol -+// downloads/LINEA/POOL_ADDRESSES_PROVIDER_REGISTRY/PoolAddressesProviderRegistry/src/contracts/dependencies/openzeppelin/contracts/Ownable.sol - - /** - * @dev Contract module which provides a basic access control mechanism, where -@@ -250,7 +253,7 @@ contract Ownable is Context { - } - } - + -// downloads/ARBITRUM/POOL_ADDRESSES_PROVIDER_REGISTRY/PoolAddressesProviderRegistry/@aave/core-v3/contracts/protocol/configuration/PoolAddressesProviderRegistry.sol +// downloads/LINEA/POOL_ADDRESSES_PROVIDER_REGISTRY/PoolAddressesProviderRegistry/src/contracts/protocol/configuration/PoolAddressesProviderRegistry.sol - + /** * @title PoolAddressesProviderRegistry @@ -258,7 +261,7 @@ contract Ownable is Context { diff --git a/diffs/ARBITRUM_LINEA/POOL_CONFIGURATOR_IMPL_DIFF.md b/diffs/ARBITRUM_LINEA/POOL_CONFIGURATOR_IMPL_DIFF.md index f0f29d46..6ae4183d 100644 --- a/diffs/ARBITRUM_LINEA/POOL_CONFIGURATOR_IMPL_DIFF.md +++ b/diffs/ARBITRUM_LINEA/POOL_CONFIGURATOR_IMPL_DIFF.md @@ -3,256 +3,5 @@ diff --git a/./downloads/ARBITRUM/POOL_CONFIGURATOR_IMPL.sol b/./downloads/LINEA index 09a7d9d..e6effd0 100644 --- a/./downloads/ARBITRUM/POOL_CONFIGURATOR_IMPL.sol +++ b/./downloads/LINEA/POOL_CONFIGURATOR_IMPL.sol -@@ -1,7 +1,7 @@ - // SPDX-License-Identifier: BUSL-1.1 - pragma solidity ^0.8.0 ^0.8.10; - --// downloads/ARBITRUM/POOL_CONFIGURATOR_IMPL/PoolConfiguratorInstance/lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/dependencies/openzeppelin/contracts/Address.sol -+// downloads/LINEA/POOL_CONFIGURATOR_IMPL/PoolConfiguratorInstance/src/contracts/dependencies/openzeppelin/contracts/Address.sol - - // OpenZeppelin Contracts v4.4.1 (utils/Address.sol) - -@@ -221,7 +221,7 @@ library Address { - } - } - --// downloads/ARBITRUM/POOL_CONFIGURATOR_IMPL/PoolConfiguratorInstance/lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/dependencies/openzeppelin/contracts/IERC20.sol -+// downloads/LINEA/POOL_CONFIGURATOR_IMPL/PoolConfiguratorInstance/src/contracts/dependencies/openzeppelin/contracts/IERC20.sol - - /** - * @dev Interface of the ERC20 standard as defined in the EIP. -@@ -297,7 +297,7 @@ interface IERC20 { - event Approval(address indexed owner, address indexed spender, uint256 value); - } - --// downloads/ARBITRUM/POOL_CONFIGURATOR_IMPL/PoolConfiguratorInstance/lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/dependencies/openzeppelin/upgradeability/Proxy.sol -+// downloads/LINEA/POOL_CONFIGURATOR_IMPL/PoolConfiguratorInstance/src/contracts/dependencies/openzeppelin/upgradeability/Proxy.sol - - /** - * @title Proxy -@@ -378,7 +378,7 @@ abstract contract Proxy { - } - } - --// downloads/ARBITRUM/POOL_CONFIGURATOR_IMPL/PoolConfiguratorInstance/lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/interfaces/IAaveIncentivesController.sol -+// downloads/LINEA/POOL_CONFIGURATOR_IMPL/PoolConfiguratorInstance/src/contracts/interfaces/IAaveIncentivesController.sol - - /** - * @title IAaveIncentivesController -@@ -397,7 +397,7 @@ interface IAaveIncentivesController { - function handleAction(address user, uint256 totalSupply, uint256 userBalance) external; - } - --// downloads/ARBITRUM/POOL_CONFIGURATOR_IMPL/PoolConfiguratorInstance/lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/interfaces/IPoolAddressesProvider.sol -+// downloads/LINEA/POOL_CONFIGURATOR_IMPL/PoolConfiguratorInstance/src/contracts/interfaces/IPoolAddressesProvider.sol - - /** - * @title IPoolAddressesProvider -@@ -624,7 +624,7 @@ interface IPoolAddressesProvider { - function setPoolDataProvider(address newDataProvider) external; - } - --// downloads/ARBITRUM/POOL_CONFIGURATOR_IMPL/PoolConfiguratorInstance/lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/misc/aave-upgradeability/VersionedInitializable.sol -+// downloads/LINEA/POOL_CONFIGURATOR_IMPL/PoolConfiguratorInstance/src/contracts/misc/aave-upgradeability/VersionedInitializable.sol - - /** - * @title VersionedInitializable -@@ -701,7 +701,7 @@ abstract contract VersionedInitializable { - uint256[50] private ______gap; - } - --// downloads/ARBITRUM/POOL_CONFIGURATOR_IMPL/PoolConfiguratorInstance/lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/protocol/libraries/helpers/Errors.sol -+// downloads/LINEA/POOL_CONFIGURATOR_IMPL/PoolConfiguratorInstance/src/contracts/protocol/libraries/helpers/Errors.sol - - /** - * @title Errors library -@@ -804,7 +804,7 @@ library Errors { - string public constant NOT_BORROWABLE_IN_EMODE = '100'; // Asset not borrowable in eMode - } - --// downloads/ARBITRUM/POOL_CONFIGURATOR_IMPL/PoolConfiguratorInstance/lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/protocol/libraries/math/PercentageMath.sol -+// downloads/LINEA/POOL_CONFIGURATOR_IMPL/PoolConfiguratorInstance/src/contracts/protocol/libraries/math/PercentageMath.sol - - /** - * @title PercentageMath library -@@ -865,7 +865,7 @@ library PercentageMath { - } - } - --// downloads/ARBITRUM/POOL_CONFIGURATOR_IMPL/PoolConfiguratorInstance/lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/protocol/libraries/types/ConfiguratorInputTypes.sol -+// downloads/LINEA/POOL_CONFIGURATOR_IMPL/PoolConfiguratorInstance/src/contracts/protocol/libraries/types/ConfiguratorInputTypes.sol - - library ConfiguratorInputTypes { - struct InitReserveInput { -@@ -904,7 +904,7 @@ library ConfiguratorInputTypes { - } - } - --// downloads/ARBITRUM/POOL_CONFIGURATOR_IMPL/PoolConfiguratorInstance/lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/protocol/libraries/types/DataTypes.sol -+// downloads/LINEA/POOL_CONFIGURATOR_IMPL/PoolConfiguratorInstance/src/contracts/protocol/libraries/types/DataTypes.sol - - library DataTypes { - /** -@@ -1228,7 +1228,7 @@ library DataTypes { - } - } - --// downloads/ARBITRUM/POOL_CONFIGURATOR_IMPL/PoolConfiguratorInstance/lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/dependencies/openzeppelin/contracts/IERC20Detailed.sol -+// downloads/LINEA/POOL_CONFIGURATOR_IMPL/PoolConfiguratorInstance/src/contracts/dependencies/openzeppelin/contracts/IERC20Detailed.sol - - interface IERC20Detailed is IERC20 { - function name() external view returns (string memory); -@@ -1238,7 +1238,7 @@ interface IERC20Detailed is IERC20 { - function decimals() external view returns (uint8); - } - --// downloads/ARBITRUM/POOL_CONFIGURATOR_IMPL/PoolConfiguratorInstance/lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/interfaces/IACLManager.sol -+// downloads/LINEA/POOL_CONFIGURATOR_IMPL/PoolConfiguratorInstance/src/contracts/interfaces/IACLManager.sol - - /** - * @title IACLManager -@@ -1411,7 +1411,7 @@ interface IACLManager { - function isAssetListingAdmin(address admin) external view returns (bool); - } - --// downloads/ARBITRUM/POOL_CONFIGURATOR_IMPL/PoolConfiguratorInstance/lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/interfaces/IPoolDataProvider.sol -+// downloads/LINEA/POOL_CONFIGURATOR_IMPL/PoolConfiguratorInstance/src/contracts/interfaces/IPoolDataProvider.sol - - /** - * @title IPoolDataProvider -@@ -1659,7 +1659,7 @@ interface IPoolDataProvider { - function getVirtualUnderlyingBalance(address asset) external view returns (uint256); - } - --// downloads/ARBITRUM/POOL_CONFIGURATOR_IMPL/PoolConfiguratorInstance/lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/interfaces/IReserveInterestRateStrategy.sol -+// downloads/LINEA/POOL_CONFIGURATOR_IMPL/PoolConfiguratorInstance/src/contracts/interfaces/IReserveInterestRateStrategy.sol - - /** - * @title IReserveInterestRateStrategy -@@ -1686,7 +1686,7 @@ interface IReserveInterestRateStrategy { - ) external view returns (uint256, uint256); - } - --// downloads/ARBITRUM/POOL_CONFIGURATOR_IMPL/PoolConfiguratorInstance/lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/dependencies/openzeppelin/upgradeability/BaseUpgradeabilityProxy.sol -+// downloads/LINEA/POOL_CONFIGURATOR_IMPL/PoolConfiguratorInstance/src/contracts/dependencies/openzeppelin/upgradeability/BaseUpgradeabilityProxy.sol - - /** - * @title BaseUpgradeabilityProxy -@@ -1749,7 +1749,7 @@ contract BaseUpgradeabilityProxy is Proxy { - } - } - --// downloads/ARBITRUM/POOL_CONFIGURATOR_IMPL/PoolConfiguratorInstance/lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/interfaces/IPool.sol -+// downloads/LINEA/POOL_CONFIGURATOR_IMPL/PoolConfiguratorInstance/src/contracts/interfaces/IPool.sol - - /** - * @title IPool -@@ -2580,7 +2580,7 @@ interface IPool { - function getSupplyLogic() external view returns (address); - } - --// downloads/ARBITRUM/POOL_CONFIGURATOR_IMPL/PoolConfiguratorInstance/lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/protocol/libraries/configuration/ReserveConfiguration.sol -+// downloads/LINEA/POOL_CONFIGURATOR_IMPL/PoolConfiguratorInstance/src/contracts/protocol/libraries/configuration/ReserveConfiguration.sol - - /** - * @title ReserveConfiguration library -@@ -3161,7 +3161,7 @@ library ReserveConfiguration { - } - } - --// downloads/ARBITRUM/POOL_CONFIGURATOR_IMPL/PoolConfiguratorInstance/lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/dependencies/openzeppelin/upgradeability/InitializableUpgradeabilityProxy.sol -+// downloads/LINEA/POOL_CONFIGURATOR_IMPL/PoolConfiguratorInstance/src/contracts/dependencies/openzeppelin/upgradeability/InitializableUpgradeabilityProxy.sol - - /** - * @title InitializableUpgradeabilityProxy -@@ -3188,7 +3188,7 @@ contract InitializableUpgradeabilityProxy is BaseUpgradeabilityProxy { - } - } - --// downloads/ARBITRUM/POOL_CONFIGURATOR_IMPL/PoolConfiguratorInstance/lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/interfaces/IDefaultInterestRateStrategyV2.sol -+// downloads/LINEA/POOL_CONFIGURATOR_IMPL/PoolConfiguratorInstance/src/contracts/interfaces/IDefaultInterestRateStrategyV2.sol - - /** - * @title IDefaultInterestRateStrategyV2 -@@ -3346,7 +3346,7 @@ interface IDefaultInterestRateStrategyV2 is IReserveInterestRateStrategy { - function setInterestRateParams(address reserve, InterestRateData calldata rateData) external; - } - --// downloads/ARBITRUM/POOL_CONFIGURATOR_IMPL/PoolConfiguratorInstance/lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/misc/aave-upgradeability/BaseImmutableAdminUpgradeabilityProxy.sol -+// downloads/LINEA/POOL_CONFIGURATOR_IMPL/PoolConfiguratorInstance/src/contracts/misc/aave-upgradeability/BaseImmutableAdminUpgradeabilityProxy.sol - - /** - * @title BaseImmutableAdminUpgradeabilityProxy -@@ -3429,7 +3429,7 @@ contract BaseImmutableAdminUpgradeabilityProxy is BaseUpgradeabilityProxy { - } - } - --// downloads/ARBITRUM/POOL_CONFIGURATOR_IMPL/PoolConfiguratorInstance/lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/protocol/libraries/configuration/EModeConfiguration.sol -+// downloads/LINEA/POOL_CONFIGURATOR_IMPL/PoolConfiguratorInstance/src/contracts/protocol/libraries/configuration/EModeConfiguration.sol - - /** - * @title EModeConfiguration library -@@ -3478,7 +3478,7 @@ library EModeConfiguration { - } - } - --// downloads/ARBITRUM/POOL_CONFIGURATOR_IMPL/PoolConfiguratorInstance/lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/interfaces/IInitializableAToken.sol -+// downloads/LINEA/POOL_CONFIGURATOR_IMPL/PoolConfiguratorInstance/src/contracts/interfaces/IInitializableAToken.sol - - /** - * @title IInitializableAToken -@@ -3531,7 +3531,7 @@ interface IInitializableAToken { - ) external; - } - --// downloads/ARBITRUM/POOL_CONFIGURATOR_IMPL/PoolConfiguratorInstance/lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/interfaces/IInitializableDebtToken.sol -+// downloads/LINEA/POOL_CONFIGURATOR_IMPL/PoolConfiguratorInstance/src/contracts/interfaces/IInitializableDebtToken.sol - - /** - * @title IInitializableDebtToken -@@ -3580,7 +3580,7 @@ interface IInitializableDebtToken { - ) external; - } - --// downloads/ARBITRUM/POOL_CONFIGURATOR_IMPL/PoolConfiguratorInstance/lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/interfaces/IPoolConfigurator.sol -+// downloads/LINEA/POOL_CONFIGURATOR_IMPL/PoolConfiguratorInstance/src/contracts/interfaces/IPoolConfigurator.sol - - /** - * @title IPoolConfigurator -@@ -4128,7 +4128,7 @@ interface IPoolConfigurator { - function MAX_GRACE_PERIOD() external view returns (uint40); - } - --// downloads/ARBITRUM/POOL_CONFIGURATOR_IMPL/PoolConfiguratorInstance/lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/misc/aave-upgradeability/InitializableImmutableAdminUpgradeabilityProxy.sol -+// downloads/LINEA/POOL_CONFIGURATOR_IMPL/PoolConfiguratorInstance/src/contracts/misc/aave-upgradeability/InitializableImmutableAdminUpgradeabilityProxy.sol - - /** - * @title InitializableAdminUpgradeabilityProxy -@@ -4153,7 +4153,7 @@ contract InitializableImmutableAdminUpgradeabilityProxy is - } - } - --// downloads/ARBITRUM/POOL_CONFIGURATOR_IMPL/PoolConfiguratorInstance/lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/protocol/libraries/logic/ConfiguratorLogic.sol -+// downloads/LINEA/POOL_CONFIGURATOR_IMPL/PoolConfiguratorInstance/src/contracts/protocol/libraries/logic/ConfiguratorLogic.sol - - /** - * @title ConfiguratorLogic library -@@ -4365,7 +4365,7 @@ library ConfiguratorLogic { - } - } - --// downloads/ARBITRUM/POOL_CONFIGURATOR_IMPL/PoolConfiguratorInstance/lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/protocol/pool/PoolConfigurator.sol -+// downloads/LINEA/POOL_CONFIGURATOR_IMPL/PoolConfiguratorInstance/src/contracts/protocol/pool/PoolConfigurator.sol - - /** - * @title PoolConfigurator -@@ -4978,7 +4978,7 @@ abstract contract PoolConfigurator is VersionedInitializable, IPoolConfigurator - } - } - --// downloads/ARBITRUM/POOL_CONFIGURATOR_IMPL/PoolConfiguratorInstance/lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/instances/PoolConfiguratorInstance.sol -+// downloads/LINEA/POOL_CONFIGURATOR_IMPL/PoolConfiguratorInstance/src/contracts/instances/PoolConfiguratorInstance.sol - - contract PoolConfiguratorInstance is PoolConfigurator { - uint256 public constant CONFIGURATOR_REVISION = 4; + ``` diff --git a/diffs/ARBITRUM_LINEA/POOL_LOGIC_DIFF.md b/diffs/ARBITRUM_LINEA/POOL_LOGIC_DIFF.md index b8418ee8..4979a570 100644 --- a/diffs/ARBITRUM_LINEA/POOL_LOGIC_DIFF.md +++ b/diffs/ARBITRUM_LINEA/POOL_LOGIC_DIFF.md @@ -3,326 +3,5 @@ diff --git a/./downloads/ARBITRUM/POOL_LOGIC.sol b/./downloads/LINEA/POOL_LOGIC. index a04f0bb..61a4f73 100644 --- a/./downloads/ARBITRUM/POOL_LOGIC.sol +++ b/./downloads/LINEA/POOL_LOGIC.sol -@@ -1,7 +1,7 @@ - // SPDX-License-Identifier: BUSL-1.1 - pragma solidity ^0.8.0 ^0.8.10; - --// downloads/ARBITRUM/POOL_LOGIC/PoolLogic/src/contracts/dependencies/openzeppelin/contracts/Address.sol -+// downloads/LINEA/POOL_LOGIC/PoolLogic/src/contracts/dependencies/openzeppelin/contracts/Address.sol - - // OpenZeppelin Contracts v4.4.1 (utils/Address.sol) - -@@ -221,7 +221,7 @@ library Address { - } - } - --// downloads/ARBITRUM/POOL_LOGIC/PoolLogic/src/contracts/dependencies/openzeppelin/contracts/Context.sol -+// downloads/LINEA/POOL_LOGIC/PoolLogic/src/contracts/dependencies/openzeppelin/contracts/Context.sol - - /* - * @dev Provides information about the current execution context, including the -@@ -244,7 +244,7 @@ abstract contract Context { - } - } - --// downloads/ARBITRUM/POOL_LOGIC/PoolLogic/src/contracts/dependencies/openzeppelin/contracts/IAccessControl.sol -+// downloads/LINEA/POOL_LOGIC/PoolLogic/src/contracts/dependencies/openzeppelin/contracts/IAccessControl.sol - - /** - * @dev External interface of AccessControl declared to support ERC165 detection. -@@ -334,7 +334,7 @@ interface IAccessControl { - function renounceRole(bytes32 role, address account) external; - } - --// downloads/ARBITRUM/POOL_LOGIC/PoolLogic/src/contracts/dependencies/openzeppelin/contracts/IERC20.sol -+// downloads/LINEA/POOL_LOGIC/PoolLogic/src/contracts/dependencies/openzeppelin/contracts/IERC20.sol - - /** - * @dev Interface of the ERC20 standard as defined in the EIP. -@@ -410,7 +410,7 @@ interface IERC20 { - event Approval(address indexed owner, address indexed spender, uint256 value); - } - --// downloads/ARBITRUM/POOL_LOGIC/PoolLogic/src/contracts/dependencies/openzeppelin/contracts/SafeCast.sol -+// downloads/LINEA/POOL_LOGIC/PoolLogic/src/contracts/dependencies/openzeppelin/contracts/SafeCast.sol - - // OpenZeppelin Contracts v4.4.1 (utils/math/SafeCast.sol) - -@@ -666,7 +666,7 @@ library SafeCast { - } - } - --// downloads/ARBITRUM/POOL_LOGIC/PoolLogic/src/contracts/interfaces/IAaveIncentivesController.sol -+// downloads/LINEA/POOL_LOGIC/PoolLogic/src/contracts/interfaces/IAaveIncentivesController.sol - - /** - * @title IAaveIncentivesController -@@ -685,7 +685,7 @@ interface IAaveIncentivesController { - function handleAction(address user, uint256 totalSupply, uint256 userBalance) external; - } - --// downloads/ARBITRUM/POOL_LOGIC/PoolLogic/src/contracts/interfaces/IPoolAddressesProvider.sol -+// downloads/LINEA/POOL_LOGIC/PoolLogic/src/contracts/interfaces/IPoolAddressesProvider.sol - - /** - * @title IPoolAddressesProvider -@@ -912,7 +912,7 @@ interface IPoolAddressesProvider { - function setPoolDataProvider(address newDataProvider) external; - } - --// downloads/ARBITRUM/POOL_LOGIC/PoolLogic/src/contracts/interfaces/IPriceOracleGetter.sol -+// downloads/LINEA/POOL_LOGIC/PoolLogic/src/contracts/interfaces/IPriceOracleGetter.sol - - /** - * @title IPriceOracleGetter -@@ -942,7 +942,7 @@ interface IPriceOracleGetter { - function getAssetPrice(address asset) external view returns (uint256); - } - --// downloads/ARBITRUM/POOL_LOGIC/PoolLogic/src/contracts/interfaces/IScaledBalanceToken.sol -+// downloads/LINEA/POOL_LOGIC/PoolLogic/src/contracts/interfaces/IScaledBalanceToken.sol - - /** - * @title IScaledBalanceToken -@@ -1014,7 +1014,7 @@ interface IScaledBalanceToken { - function getPreviousIndex(address user) external view returns (uint256); - } - --// downloads/ARBITRUM/POOL_LOGIC/PoolLogic/src/contracts/protocol/libraries/helpers/Errors.sol -+// downloads/LINEA/POOL_LOGIC/PoolLogic/src/contracts/protocol/libraries/helpers/Errors.sol - - /** - * @title Errors library -@@ -1117,7 +1117,7 @@ library Errors { - string public constant NOT_BORROWABLE_IN_EMODE = '100'; // Asset not borrowable in eMode - } - --// downloads/ARBITRUM/POOL_LOGIC/PoolLogic/src/contracts/protocol/libraries/math/PercentageMath.sol -+// downloads/LINEA/POOL_LOGIC/PoolLogic/src/contracts/protocol/libraries/math/PercentageMath.sol - - /** - * @title PercentageMath library -@@ -1178,7 +1178,7 @@ library PercentageMath { - } - } - --// downloads/ARBITRUM/POOL_LOGIC/PoolLogic/src/contracts/protocol/libraries/math/WadRayMath.sol -+// downloads/LINEA/POOL_LOGIC/PoolLogic/src/contracts/protocol/libraries/math/WadRayMath.sol - - /** - * @title WadRayMath library -@@ -1304,7 +1304,7 @@ library WadRayMath { - } - } - --// downloads/ARBITRUM/POOL_LOGIC/PoolLogic/src/contracts/protocol/libraries/types/DataTypes.sol -+// downloads/LINEA/POOL_LOGIC/PoolLogic/src/contracts/protocol/libraries/types/DataTypes.sol - - library DataTypes { - /** -@@ -1628,7 +1628,7 @@ library DataTypes { - } - } - --// downloads/ARBITRUM/POOL_LOGIC/PoolLogic/src/contracts/dependencies/gnosis/contracts/GPv2SafeERC20.sol -+// downloads/LINEA/POOL_LOGIC/PoolLogic/src/contracts/dependencies/gnosis/contracts/GPv2SafeERC20.sol - - /// @title Gnosis Protocol v2 Safe ERC20 Transfer Library - /// @author Gnosis Developers -@@ -1741,7 +1741,7 @@ library GPv2SafeERC20 { - } - } - --// downloads/ARBITRUM/POOL_LOGIC/PoolLogic/src/contracts/dependencies/openzeppelin/contracts/IERC20Detailed.sol -+// downloads/LINEA/POOL_LOGIC/PoolLogic/src/contracts/dependencies/openzeppelin/contracts/IERC20Detailed.sol - - interface IERC20Detailed is IERC20 { - function name() external view returns (string memory); -@@ -1751,7 +1751,7 @@ interface IERC20Detailed is IERC20 { - function decimals() external view returns (uint8); - } - --// downloads/ARBITRUM/POOL_LOGIC/PoolLogic/src/contracts/interfaces/IACLManager.sol -+// downloads/LINEA/POOL_LOGIC/PoolLogic/src/contracts/interfaces/IACLManager.sol - - /** - * @title IACLManager -@@ -1924,7 +1924,7 @@ interface IACLManager { - function isAssetListingAdmin(address admin) external view returns (bool); - } - --// downloads/ARBITRUM/POOL_LOGIC/PoolLogic/src/contracts/interfaces/IPriceOracleSentinel.sol -+// downloads/LINEA/POOL_LOGIC/PoolLogic/src/contracts/interfaces/IPriceOracleSentinel.sol - - /** - * @title IPriceOracleSentinel -@@ -1989,7 +1989,7 @@ interface IPriceOracleSentinel { - function getGracePeriod() external view returns (uint256); - } - --// downloads/ARBITRUM/POOL_LOGIC/PoolLogic/src/contracts/interfaces/IReserveInterestRateStrategy.sol -+// downloads/LINEA/POOL_LOGIC/PoolLogic/src/contracts/interfaces/IReserveInterestRateStrategy.sol - - /** - * @title IReserveInterestRateStrategy -@@ -2016,7 +2016,7 @@ interface IReserveInterestRateStrategy { - ) external view returns (uint256, uint256); - } - --// downloads/ARBITRUM/POOL_LOGIC/PoolLogic/src/contracts/protocol/libraries/math/MathUtils.sol -+// downloads/LINEA/POOL_LOGIC/PoolLogic/src/contracts/protocol/libraries/math/MathUtils.sol - - /** - * @title MathUtils library -@@ -2113,7 +2113,7 @@ library MathUtils { - } - } - --// downloads/ARBITRUM/POOL_LOGIC/PoolLogic/src/contracts/interfaces/IPool.sol -+// downloads/LINEA/POOL_LOGIC/PoolLogic/src/contracts/interfaces/IPool.sol - - /** - * @title IPool -@@ -2672,6 +2672,7 @@ interface IPool { - - /** - * @notice Returns the state and configuration of the reserve, including extra data included with Aave v3.1 -+ * @dev DEPRECATED use independent getters instead (getReserveData, getLiquidationGracePeriod) - * @param asset The address of the underlying asset of the reserve - * @return The state and configuration data of the reserve with virtual accounting - */ -@@ -2943,7 +2944,7 @@ interface IPool { - function getSupplyLogic() external view returns (address); - } - --// downloads/ARBITRUM/POOL_LOGIC/PoolLogic/src/contracts/protocol/libraries/configuration/ReserveConfiguration.sol -+// downloads/LINEA/POOL_LOGIC/PoolLogic/src/contracts/protocol/libraries/configuration/ReserveConfiguration.sol - - /** - * @title ReserveConfiguration library -@@ -2958,6 +2959,7 @@ library ReserveConfiguration { - uint256 internal constant ACTIVE_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFF; // prettier-ignore - uint256 internal constant FROZEN_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFDFFFFFFFFFFFFFF; // prettier-ignore - uint256 internal constant BORROWING_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFBFFFFFFFFFFFFFF; // prettier-ignore -+ // @notice there is an unoccupied hole of 1 bit at position 59 from pre 3.2 stableBorrowRateEnabled - uint256 internal constant PAUSED_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFF; // prettier-ignore - uint256 internal constant BORROWABLE_IN_ISOLATION_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFDFFFFFFFFFFFFFFF; // prettier-ignore - uint256 internal constant SILOED_BORROWING_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFBFFFFFFFFFFFFFFF; // prettier-ignore -@@ -2966,7 +2968,7 @@ library ReserveConfiguration { - uint256 internal constant BORROW_CAP_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000FFFFFFFFFFFFFFFFFFFF; // prettier-ignore - uint256 internal constant SUPPLY_CAP_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFF000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFF; // prettier-ignore - uint256 internal constant LIQUIDATION_PROTOCOL_FEE_MASK = 0xFFFFFFFFFFFFFFFFFFFFFF0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF; // prettier-ignore -- //@notice there is an unoccupied hole of 8 bits from 168 to 176 left from pre 3.2 eModeCategory -+ // @notice there is an unoccupied hole of 8 bits from 168 to 176 left from pre 3.2 eModeCategory - uint256 internal constant UNBACKED_MINT_CAP_MASK = 0xFFFFFFFFFFF000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF; // prettier-ignore - uint256 internal constant DEBT_CEILING_MASK = 0xF0000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF; // prettier-ignore - uint256 internal constant VIRTUAL_ACC_ACTIVE_MASK = 0xEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF; // prettier-ignore -@@ -3523,7 +3525,7 @@ library ReserveConfiguration { - } - } - --// downloads/ARBITRUM/POOL_LOGIC/PoolLogic/src/contracts/protocol/libraries/configuration/EModeConfiguration.sol -+// downloads/LINEA/POOL_LOGIC/PoolLogic/src/contracts/protocol/libraries/configuration/EModeConfiguration.sol - - /** - * @title EModeConfiguration library -@@ -3572,7 +3574,7 @@ library EModeConfiguration { - } - } - --// downloads/ARBITRUM/POOL_LOGIC/PoolLogic/src/contracts/protocol/libraries/configuration/UserConfiguration.sol -+// downloads/LINEA/POOL_LOGIC/PoolLogic/src/contracts/protocol/libraries/configuration/UserConfiguration.sol - - /** - * @title UserConfiguration library -@@ -3804,7 +3806,7 @@ library UserConfiguration { - } - } - --// downloads/ARBITRUM/POOL_LOGIC/PoolLogic/src/contracts/interfaces/IInitializableAToken.sol -+// downloads/LINEA/POOL_LOGIC/PoolLogic/src/contracts/interfaces/IInitializableAToken.sol - - /** - * @title IInitializableAToken -@@ -3857,7 +3859,7 @@ interface IInitializableAToken { - ) external; - } - --// downloads/ARBITRUM/POOL_LOGIC/PoolLogic/src/contracts/interfaces/IInitializableDebtToken.sol -+// downloads/LINEA/POOL_LOGIC/PoolLogic/src/contracts/interfaces/IInitializableDebtToken.sol - - /** - * @title IInitializableDebtToken -@@ -3906,7 +3908,7 @@ interface IInitializableDebtToken { - ) external; - } - --// downloads/ARBITRUM/POOL_LOGIC/PoolLogic/src/contracts/interfaces/IVariableDebtToken.sol -+// downloads/LINEA/POOL_LOGIC/PoolLogic/src/contracts/interfaces/IVariableDebtToken.sol - - /** - * @title IVariableDebtToken -@@ -3949,7 +3951,7 @@ interface IVariableDebtToken is IScaledBalanceToken, IInitializableDebtToken { - function UNDERLYING_ASSET_ADDRESS() external view returns (address); - } - --// downloads/ARBITRUM/POOL_LOGIC/PoolLogic/src/contracts/interfaces/IAToken.sol -+// downloads/LINEA/POOL_LOGIC/PoolLogic/src/contracts/interfaces/IAToken.sol - - /** - * @title IAToken -@@ -4083,7 +4085,7 @@ interface IAToken is IERC20, IScaledBalanceToken, IInitializableAToken { - function rescueTokens(address token, address to, uint256 amount) external; - } - --// downloads/ARBITRUM/POOL_LOGIC/PoolLogic/src/contracts/protocol/tokenization/base/IncentivizedERC20.sol -+// downloads/LINEA/POOL_LOGIC/PoolLogic/src/contracts/protocol/tokenization/base/IncentivizedERC20.sol - - /** - * @title IncentivizedERC20 -@@ -4306,7 +4308,7 @@ abstract contract IncentivizedERC20 is Context, IERC20Detailed { - } - } - --// downloads/ARBITRUM/POOL_LOGIC/PoolLogic/src/contracts/protocol/libraries/logic/ReserveLogic.sol -+// downloads/LINEA/POOL_LOGIC/PoolLogic/src/contracts/protocol/libraries/logic/ReserveLogic.sol - - /** - * @title ReserveLogic library -@@ -4607,7 +4609,7 @@ library ReserveLogic { - } - } - --// downloads/ARBITRUM/POOL_LOGIC/PoolLogic/src/contracts/protocol/libraries/logic/EModeLogic.sol -+// downloads/LINEA/POOL_LOGIC/PoolLogic/src/contracts/protocol/libraries/logic/EModeLogic.sol - - /** - * @title EModeLogic library -@@ -4669,7 +4671,7 @@ library EModeLogic { - } - } - --// downloads/ARBITRUM/POOL_LOGIC/PoolLogic/src/contracts/protocol/libraries/logic/GenericLogic.sol -+// downloads/LINEA/POOL_LOGIC/PoolLogic/src/contracts/protocol/libraries/logic/GenericLogic.sol - - /** - * @title GenericLogic library -@@ -4913,7 +4915,7 @@ library GenericLogic { - } - } - --// downloads/ARBITRUM/POOL_LOGIC/PoolLogic/src/contracts/protocol/libraries/logic/ValidationLogic.sol -+// downloads/LINEA/POOL_LOGIC/PoolLogic/src/contracts/protocol/libraries/logic/ValidationLogic.sol - - /** - * @title ReserveLogic library -@@ -5533,7 +5535,7 @@ library ValidationLogic { - } - } - --// downloads/ARBITRUM/POOL_LOGIC/PoolLogic/src/contracts/protocol/libraries/logic/PoolLogic.sol -+// downloads/LINEA/POOL_LOGIC/PoolLogic/src/contracts/protocol/libraries/logic/PoolLogic.sol - - /** - * @title PoolLogic library + ``` diff --git a/diffs/ARBITRUM_LINEA/SUPPLY_LOGIC_DIFF.md b/diffs/ARBITRUM_LINEA/SUPPLY_LOGIC_DIFF.md index 15ac15e3..a081e3f5 100644 --- a/diffs/ARBITRUM_LINEA/SUPPLY_LOGIC_DIFF.md +++ b/diffs/ARBITRUM_LINEA/SUPPLY_LOGIC_DIFF.md @@ -3,326 +3,5 @@ diff --git a/./downloads/ARBITRUM/SUPPLY_LOGIC.sol b/./downloads/LINEA/SUPPLY_LO index 99515df..a3cc5dd 100644 --- a/./downloads/ARBITRUM/SUPPLY_LOGIC.sol +++ b/./downloads/LINEA/SUPPLY_LOGIC.sol -@@ -1,7 +1,7 @@ - // SPDX-License-Identifier: BUSL-1.1 - pragma solidity ^0.8.0 ^0.8.10; - --// downloads/ARBITRUM/SUPPLY_LOGIC/SupplyLogic/src/contracts/dependencies/openzeppelin/contracts/Address.sol -+// downloads/LINEA/SUPPLY_LOGIC/SupplyLogic/src/contracts/dependencies/openzeppelin/contracts/Address.sol - - // OpenZeppelin Contracts v4.4.1 (utils/Address.sol) - -@@ -221,7 +221,7 @@ library Address { - } - } - --// downloads/ARBITRUM/SUPPLY_LOGIC/SupplyLogic/src/contracts/dependencies/openzeppelin/contracts/Context.sol -+// downloads/LINEA/SUPPLY_LOGIC/SupplyLogic/src/contracts/dependencies/openzeppelin/contracts/Context.sol - - /* - * @dev Provides information about the current execution context, including the -@@ -244,7 +244,7 @@ abstract contract Context { - } - } - --// downloads/ARBITRUM/SUPPLY_LOGIC/SupplyLogic/src/contracts/dependencies/openzeppelin/contracts/IAccessControl.sol -+// downloads/LINEA/SUPPLY_LOGIC/SupplyLogic/src/contracts/dependencies/openzeppelin/contracts/IAccessControl.sol - - /** - * @dev External interface of AccessControl declared to support ERC165 detection. -@@ -334,7 +334,7 @@ interface IAccessControl { - function renounceRole(bytes32 role, address account) external; - } - --// downloads/ARBITRUM/SUPPLY_LOGIC/SupplyLogic/src/contracts/dependencies/openzeppelin/contracts/IERC20.sol -+// downloads/LINEA/SUPPLY_LOGIC/SupplyLogic/src/contracts/dependencies/openzeppelin/contracts/IERC20.sol - - /** - * @dev Interface of the ERC20 standard as defined in the EIP. -@@ -410,7 +410,7 @@ interface IERC20 { - event Approval(address indexed owner, address indexed spender, uint256 value); - } - --// downloads/ARBITRUM/SUPPLY_LOGIC/SupplyLogic/src/contracts/dependencies/openzeppelin/contracts/SafeCast.sol -+// downloads/LINEA/SUPPLY_LOGIC/SupplyLogic/src/contracts/dependencies/openzeppelin/contracts/SafeCast.sol - - // OpenZeppelin Contracts v4.4.1 (utils/math/SafeCast.sol) - -@@ -666,7 +666,7 @@ library SafeCast { - } - } - --// downloads/ARBITRUM/SUPPLY_LOGIC/SupplyLogic/src/contracts/interfaces/IAaveIncentivesController.sol -+// downloads/LINEA/SUPPLY_LOGIC/SupplyLogic/src/contracts/interfaces/IAaveIncentivesController.sol - - /** - * @title IAaveIncentivesController -@@ -685,7 +685,7 @@ interface IAaveIncentivesController { - function handleAction(address user, uint256 totalSupply, uint256 userBalance) external; - } - --// downloads/ARBITRUM/SUPPLY_LOGIC/SupplyLogic/src/contracts/interfaces/IPoolAddressesProvider.sol -+// downloads/LINEA/SUPPLY_LOGIC/SupplyLogic/src/contracts/interfaces/IPoolAddressesProvider.sol - - /** - * @title IPoolAddressesProvider -@@ -912,7 +912,7 @@ interface IPoolAddressesProvider { - function setPoolDataProvider(address newDataProvider) external; - } - --// downloads/ARBITRUM/SUPPLY_LOGIC/SupplyLogic/src/contracts/interfaces/IPriceOracleGetter.sol -+// downloads/LINEA/SUPPLY_LOGIC/SupplyLogic/src/contracts/interfaces/IPriceOracleGetter.sol - - /** - * @title IPriceOracleGetter -@@ -942,7 +942,7 @@ interface IPriceOracleGetter { - function getAssetPrice(address asset) external view returns (uint256); - } - --// downloads/ARBITRUM/SUPPLY_LOGIC/SupplyLogic/src/contracts/interfaces/IScaledBalanceToken.sol -+// downloads/LINEA/SUPPLY_LOGIC/SupplyLogic/src/contracts/interfaces/IScaledBalanceToken.sol - - /** - * @title IScaledBalanceToken -@@ -1014,7 +1014,7 @@ interface IScaledBalanceToken { - function getPreviousIndex(address user) external view returns (uint256); - } - --// downloads/ARBITRUM/SUPPLY_LOGIC/SupplyLogic/src/contracts/protocol/libraries/helpers/Errors.sol -+// downloads/LINEA/SUPPLY_LOGIC/SupplyLogic/src/contracts/protocol/libraries/helpers/Errors.sol - - /** - * @title Errors library -@@ -1117,7 +1117,7 @@ library Errors { - string public constant NOT_BORROWABLE_IN_EMODE = '100'; // Asset not borrowable in eMode - } - --// downloads/ARBITRUM/SUPPLY_LOGIC/SupplyLogic/src/contracts/protocol/libraries/math/PercentageMath.sol -+// downloads/LINEA/SUPPLY_LOGIC/SupplyLogic/src/contracts/protocol/libraries/math/PercentageMath.sol - - /** - * @title PercentageMath library -@@ -1178,7 +1178,7 @@ library PercentageMath { - } - } - --// downloads/ARBITRUM/SUPPLY_LOGIC/SupplyLogic/src/contracts/protocol/libraries/math/WadRayMath.sol -+// downloads/LINEA/SUPPLY_LOGIC/SupplyLogic/src/contracts/protocol/libraries/math/WadRayMath.sol - - /** - * @title WadRayMath library -@@ -1304,7 +1304,7 @@ library WadRayMath { - } - } - --// downloads/ARBITRUM/SUPPLY_LOGIC/SupplyLogic/src/contracts/protocol/libraries/types/DataTypes.sol -+// downloads/LINEA/SUPPLY_LOGIC/SupplyLogic/src/contracts/protocol/libraries/types/DataTypes.sol - - library DataTypes { - /** -@@ -1628,7 +1628,7 @@ library DataTypes { - } - } - --// downloads/ARBITRUM/SUPPLY_LOGIC/SupplyLogic/src/contracts/dependencies/gnosis/contracts/GPv2SafeERC20.sol -+// downloads/LINEA/SUPPLY_LOGIC/SupplyLogic/src/contracts/dependencies/gnosis/contracts/GPv2SafeERC20.sol - - /// @title Gnosis Protocol v2 Safe ERC20 Transfer Library - /// @author Gnosis Developers -@@ -1741,7 +1741,7 @@ library GPv2SafeERC20 { - } - } - --// downloads/ARBITRUM/SUPPLY_LOGIC/SupplyLogic/src/contracts/dependencies/openzeppelin/contracts/IERC20Detailed.sol -+// downloads/LINEA/SUPPLY_LOGIC/SupplyLogic/src/contracts/dependencies/openzeppelin/contracts/IERC20Detailed.sol - - interface IERC20Detailed is IERC20 { - function name() external view returns (string memory); -@@ -1751,7 +1751,7 @@ interface IERC20Detailed is IERC20 { - function decimals() external view returns (uint8); - } - --// downloads/ARBITRUM/SUPPLY_LOGIC/SupplyLogic/src/contracts/interfaces/IACLManager.sol -+// downloads/LINEA/SUPPLY_LOGIC/SupplyLogic/src/contracts/interfaces/IACLManager.sol - - /** - * @title IACLManager -@@ -1924,7 +1924,7 @@ interface IACLManager { - function isAssetListingAdmin(address admin) external view returns (bool); - } - --// downloads/ARBITRUM/SUPPLY_LOGIC/SupplyLogic/src/contracts/interfaces/IPriceOracleSentinel.sol -+// downloads/LINEA/SUPPLY_LOGIC/SupplyLogic/src/contracts/interfaces/IPriceOracleSentinel.sol - - /** - * @title IPriceOracleSentinel -@@ -1989,7 +1989,7 @@ interface IPriceOracleSentinel { - function getGracePeriod() external view returns (uint256); - } - --// downloads/ARBITRUM/SUPPLY_LOGIC/SupplyLogic/src/contracts/interfaces/IReserveInterestRateStrategy.sol -+// downloads/LINEA/SUPPLY_LOGIC/SupplyLogic/src/contracts/interfaces/IReserveInterestRateStrategy.sol - - /** - * @title IReserveInterestRateStrategy -@@ -2016,7 +2016,7 @@ interface IReserveInterestRateStrategy { - ) external view returns (uint256, uint256); - } - --// downloads/ARBITRUM/SUPPLY_LOGIC/SupplyLogic/src/contracts/protocol/libraries/math/MathUtils.sol -+// downloads/LINEA/SUPPLY_LOGIC/SupplyLogic/src/contracts/protocol/libraries/math/MathUtils.sol - - /** - * @title MathUtils library -@@ -2113,7 +2113,7 @@ library MathUtils { - } - } - --// downloads/ARBITRUM/SUPPLY_LOGIC/SupplyLogic/src/contracts/interfaces/IPool.sol -+// downloads/LINEA/SUPPLY_LOGIC/SupplyLogic/src/contracts/interfaces/IPool.sol - - /** - * @title IPool -@@ -2672,6 +2672,7 @@ interface IPool { - - /** - * @notice Returns the state and configuration of the reserve, including extra data included with Aave v3.1 -+ * @dev DEPRECATED use independent getters instead (getReserveData, getLiquidationGracePeriod) - * @param asset The address of the underlying asset of the reserve - * @return The state and configuration data of the reserve with virtual accounting - */ -@@ -2943,7 +2944,7 @@ interface IPool { - function getSupplyLogic() external view returns (address); - } - --// downloads/ARBITRUM/SUPPLY_LOGIC/SupplyLogic/src/contracts/protocol/libraries/configuration/ReserveConfiguration.sol -+// downloads/LINEA/SUPPLY_LOGIC/SupplyLogic/src/contracts/protocol/libraries/configuration/ReserveConfiguration.sol - - /** - * @title ReserveConfiguration library -@@ -2958,6 +2959,7 @@ library ReserveConfiguration { - uint256 internal constant ACTIVE_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFF; // prettier-ignore - uint256 internal constant FROZEN_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFDFFFFFFFFFFFFFF; // prettier-ignore - uint256 internal constant BORROWING_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFBFFFFFFFFFFFFFF; // prettier-ignore -+ // @notice there is an unoccupied hole of 1 bit at position 59 from pre 3.2 stableBorrowRateEnabled - uint256 internal constant PAUSED_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFF; // prettier-ignore - uint256 internal constant BORROWABLE_IN_ISOLATION_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFDFFFFFFFFFFFFFFF; // prettier-ignore - uint256 internal constant SILOED_BORROWING_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFBFFFFFFFFFFFFFFF; // prettier-ignore -@@ -2966,7 +2968,7 @@ library ReserveConfiguration { - uint256 internal constant BORROW_CAP_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000FFFFFFFFFFFFFFFFFFFF; // prettier-ignore - uint256 internal constant SUPPLY_CAP_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFF000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFF; // prettier-ignore - uint256 internal constant LIQUIDATION_PROTOCOL_FEE_MASK = 0xFFFFFFFFFFFFFFFFFFFFFF0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF; // prettier-ignore -- //@notice there is an unoccupied hole of 8 bits from 168 to 176 left from pre 3.2 eModeCategory -+ // @notice there is an unoccupied hole of 8 bits from 168 to 176 left from pre 3.2 eModeCategory - uint256 internal constant UNBACKED_MINT_CAP_MASK = 0xFFFFFFFFFFF000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF; // prettier-ignore - uint256 internal constant DEBT_CEILING_MASK = 0xF0000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF; // prettier-ignore - uint256 internal constant VIRTUAL_ACC_ACTIVE_MASK = 0xEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF; // prettier-ignore -@@ -3523,7 +3525,7 @@ library ReserveConfiguration { - } - } - --// downloads/ARBITRUM/SUPPLY_LOGIC/SupplyLogic/src/contracts/protocol/libraries/configuration/EModeConfiguration.sol -+// downloads/LINEA/SUPPLY_LOGIC/SupplyLogic/src/contracts/protocol/libraries/configuration/EModeConfiguration.sol - - /** - * @title EModeConfiguration library -@@ -3572,7 +3574,7 @@ library EModeConfiguration { - } - } - --// downloads/ARBITRUM/SUPPLY_LOGIC/SupplyLogic/src/contracts/protocol/libraries/configuration/UserConfiguration.sol -+// downloads/LINEA/SUPPLY_LOGIC/SupplyLogic/src/contracts/protocol/libraries/configuration/UserConfiguration.sol - - /** - * @title UserConfiguration library -@@ -3804,7 +3806,7 @@ library UserConfiguration { - } - } - --// downloads/ARBITRUM/SUPPLY_LOGIC/SupplyLogic/src/contracts/interfaces/IInitializableAToken.sol -+// downloads/LINEA/SUPPLY_LOGIC/SupplyLogic/src/contracts/interfaces/IInitializableAToken.sol - - /** - * @title IInitializableAToken -@@ -3857,7 +3859,7 @@ interface IInitializableAToken { - ) external; - } - --// downloads/ARBITRUM/SUPPLY_LOGIC/SupplyLogic/src/contracts/interfaces/IInitializableDebtToken.sol -+// downloads/LINEA/SUPPLY_LOGIC/SupplyLogic/src/contracts/interfaces/IInitializableDebtToken.sol - - /** - * @title IInitializableDebtToken -@@ -3906,7 +3908,7 @@ interface IInitializableDebtToken { - ) external; - } - --// downloads/ARBITRUM/SUPPLY_LOGIC/SupplyLogic/src/contracts/interfaces/IVariableDebtToken.sol -+// downloads/LINEA/SUPPLY_LOGIC/SupplyLogic/src/contracts/interfaces/IVariableDebtToken.sol - - /** - * @title IVariableDebtToken -@@ -3949,7 +3951,7 @@ interface IVariableDebtToken is IScaledBalanceToken, IInitializableDebtToken { - function UNDERLYING_ASSET_ADDRESS() external view returns (address); - } - --// downloads/ARBITRUM/SUPPLY_LOGIC/SupplyLogic/src/contracts/interfaces/IAToken.sol -+// downloads/LINEA/SUPPLY_LOGIC/SupplyLogic/src/contracts/interfaces/IAToken.sol - - /** - * @title IAToken -@@ -4083,7 +4085,7 @@ interface IAToken is IERC20, IScaledBalanceToken, IInitializableAToken { - function rescueTokens(address token, address to, uint256 amount) external; - } - --// downloads/ARBITRUM/SUPPLY_LOGIC/SupplyLogic/src/contracts/protocol/tokenization/base/IncentivizedERC20.sol -+// downloads/LINEA/SUPPLY_LOGIC/SupplyLogic/src/contracts/protocol/tokenization/base/IncentivizedERC20.sol - - /** - * @title IncentivizedERC20 -@@ -4306,7 +4308,7 @@ abstract contract IncentivizedERC20 is Context, IERC20Detailed { - } - } - --// downloads/ARBITRUM/SUPPLY_LOGIC/SupplyLogic/src/contracts/protocol/libraries/logic/ReserveLogic.sol -+// downloads/LINEA/SUPPLY_LOGIC/SupplyLogic/src/contracts/protocol/libraries/logic/ReserveLogic.sol - - /** - * @title ReserveLogic library -@@ -4607,7 +4609,7 @@ library ReserveLogic { - } - } - --// downloads/ARBITRUM/SUPPLY_LOGIC/SupplyLogic/src/contracts/protocol/libraries/logic/EModeLogic.sol -+// downloads/LINEA/SUPPLY_LOGIC/SupplyLogic/src/contracts/protocol/libraries/logic/EModeLogic.sol - - /** - * @title EModeLogic library -@@ -4669,7 +4671,7 @@ library EModeLogic { - } - } - --// downloads/ARBITRUM/SUPPLY_LOGIC/SupplyLogic/src/contracts/protocol/libraries/logic/GenericLogic.sol -+// downloads/LINEA/SUPPLY_LOGIC/SupplyLogic/src/contracts/protocol/libraries/logic/GenericLogic.sol - - /** - * @title GenericLogic library -@@ -4913,7 +4915,7 @@ library GenericLogic { - } - } - --// downloads/ARBITRUM/SUPPLY_LOGIC/SupplyLogic/src/contracts/protocol/libraries/logic/ValidationLogic.sol -+// downloads/LINEA/SUPPLY_LOGIC/SupplyLogic/src/contracts/protocol/libraries/logic/ValidationLogic.sol - - /** - * @title ReserveLogic library -@@ -5533,7 +5535,7 @@ library ValidationLogic { - } - } - --// downloads/ARBITRUM/SUPPLY_LOGIC/SupplyLogic/src/contracts/protocol/libraries/logic/SupplyLogic.sol -+// downloads/LINEA/SUPPLY_LOGIC/SupplyLogic/src/contracts/protocol/libraries/logic/SupplyLogic.sol - - /** - * @title SupplyLogic library + ``` diff --git a/diffs/ARBITRUM_LINEA/UI_INCENTIVE_DATA_PROVIDER_DIFF.md b/diffs/ARBITRUM_LINEA/UI_INCENTIVE_DATA_PROVIDER_DIFF.md index 94901233..6c9d4d8a 100644 --- a/diffs/ARBITRUM_LINEA/UI_INCENTIVE_DATA_PROVIDER_DIFF.md +++ b/diffs/ARBITRUM_LINEA/UI_INCENTIVE_DATA_PROVIDER_DIFF.md @@ -3,193 +3,5 @@ diff --git a/./downloads/ARBITRUM/UI_INCENTIVE_DATA_PROVIDER.sol b/./downloads/L index d31e3f7..64c6bd5 100644 --- a/./downloads/ARBITRUM/UI_INCENTIVE_DATA_PROVIDER.sol +++ b/./downloads/LINEA/UI_INCENTIVE_DATA_PROVIDER.sol -@@ -1,7 +1,7 @@ - // SPDX-License-Identifier: BUSL-1.1 - pragma solidity ^0.8.0 ^0.8.10; - --// downloads/ARBITRUM/UI_INCENTIVE_DATA_PROVIDER/UiIncentiveDataProviderV3/src/contracts/dependencies/openzeppelin/contracts/Context.sol -+// downloads/LINEA/UI_INCENTIVE_DATA_PROVIDER/UiIncentiveDataProviderV3/src/contracts/dependencies/openzeppelin/contracts/Context.sol - - /* - * @dev Provides information about the current execution context, including the -@@ -24,7 +24,7 @@ abstract contract Context { - } - } - --// downloads/ARBITRUM/UI_INCENTIVE_DATA_PROVIDER/UiIncentiveDataProviderV3/src/contracts/dependencies/openzeppelin/contracts/IERC20.sol -+// downloads/LINEA/UI_INCENTIVE_DATA_PROVIDER/UiIncentiveDataProviderV3/src/contracts/dependencies/openzeppelin/contracts/IERC20.sol - - /** - * @dev Interface of the ERC20 standard as defined in the EIP. -@@ -100,7 +100,7 @@ interface IERC20 { - event Approval(address indexed owner, address indexed spender, uint256 value); - } - --// downloads/ARBITRUM/UI_INCENTIVE_DATA_PROVIDER/UiIncentiveDataProviderV3/src/contracts/dependencies/openzeppelin/contracts/SafeCast.sol -+// downloads/LINEA/UI_INCENTIVE_DATA_PROVIDER/UiIncentiveDataProviderV3/src/contracts/dependencies/openzeppelin/contracts/SafeCast.sol - - // OpenZeppelin Contracts v4.4.1 (utils/math/SafeCast.sol) - -@@ -356,7 +356,7 @@ library SafeCast { - } - } - --// downloads/ARBITRUM/UI_INCENTIVE_DATA_PROVIDER/UiIncentiveDataProviderV3/src/contracts/helpers/interfaces/IEACAggregatorProxy.sol -+// downloads/LINEA/UI_INCENTIVE_DATA_PROVIDER/UiIncentiveDataProviderV3/src/contracts/helpers/interfaces/IEACAggregatorProxy.sol - - interface IEACAggregatorProxy { - function decimals() external view returns (uint8); -@@ -375,7 +375,7 @@ interface IEACAggregatorProxy { - event NewRound(uint256 indexed roundId, address indexed startedBy); - } - --// downloads/ARBITRUM/UI_INCENTIVE_DATA_PROVIDER/UiIncentiveDataProviderV3/src/contracts/interfaces/IAaveIncentivesController.sol -+// downloads/LINEA/UI_INCENTIVE_DATA_PROVIDER/UiIncentiveDataProviderV3/src/contracts/interfaces/IAaveIncentivesController.sol - - /** - * @title IAaveIncentivesController -@@ -394,7 +394,7 @@ interface IAaveIncentivesController { - function handleAction(address user, uint256 totalSupply, uint256 userBalance) external; - } - --// downloads/ARBITRUM/UI_INCENTIVE_DATA_PROVIDER/UiIncentiveDataProviderV3/src/contracts/interfaces/IPoolAddressesProvider.sol -+// downloads/LINEA/UI_INCENTIVE_DATA_PROVIDER/UiIncentiveDataProviderV3/src/contracts/interfaces/IPoolAddressesProvider.sol - - /** - * @title IPoolAddressesProvider -@@ -621,7 +621,7 @@ interface IPoolAddressesProvider { - function setPoolDataProvider(address newDataProvider) external; - } - --// downloads/ARBITRUM/UI_INCENTIVE_DATA_PROVIDER/UiIncentiveDataProviderV3/src/contracts/protocol/libraries/helpers/Errors.sol -+// downloads/LINEA/UI_INCENTIVE_DATA_PROVIDER/UiIncentiveDataProviderV3/src/contracts/protocol/libraries/helpers/Errors.sol - - /** - * @title Errors library -@@ -724,7 +724,7 @@ library Errors { - string public constant NOT_BORROWABLE_IN_EMODE = '100'; // Asset not borrowable in eMode - } - --// downloads/ARBITRUM/UI_INCENTIVE_DATA_PROVIDER/UiIncentiveDataProviderV3/src/contracts/protocol/libraries/math/WadRayMath.sol -+// downloads/LINEA/UI_INCENTIVE_DATA_PROVIDER/UiIncentiveDataProviderV3/src/contracts/protocol/libraries/math/WadRayMath.sol - - /** - * @title WadRayMath library -@@ -850,7 +850,7 @@ library WadRayMath { - } - } - --// downloads/ARBITRUM/UI_INCENTIVE_DATA_PROVIDER/UiIncentiveDataProviderV3/src/contracts/protocol/libraries/types/DataTypes.sol -+// downloads/LINEA/UI_INCENTIVE_DATA_PROVIDER/UiIncentiveDataProviderV3/src/contracts/protocol/libraries/types/DataTypes.sol - - library DataTypes { - /** -@@ -1174,7 +1174,7 @@ library DataTypes { - } - } - --// downloads/ARBITRUM/UI_INCENTIVE_DATA_PROVIDER/UiIncentiveDataProviderV3/src/contracts/rewards/interfaces/IRewardsDistributor.sol -+// downloads/LINEA/UI_INCENTIVE_DATA_PROVIDER/UiIncentiveDataProviderV3/src/contracts/rewards/interfaces/IRewardsDistributor.sol - - /** - * @title IRewardsDistributor -@@ -1351,7 +1351,7 @@ interface IRewardsDistributor { - function getEmissionManager() external view returns (address); - } - --// downloads/ARBITRUM/UI_INCENTIVE_DATA_PROVIDER/UiIncentiveDataProviderV3/src/contracts/rewards/interfaces/ITransferStrategyBase.sol -+// downloads/LINEA/UI_INCENTIVE_DATA_PROVIDER/UiIncentiveDataProviderV3/src/contracts/rewards/interfaces/ITransferStrategyBase.sol - - interface ITransferStrategyBase { - event EmergencyWithdrawal( -@@ -1389,7 +1389,7 @@ interface ITransferStrategyBase { - function emergencyWithdrawal(address token, address to, uint256 amount) external; - } - --// downloads/ARBITRUM/UI_INCENTIVE_DATA_PROVIDER/UiIncentiveDataProviderV3/src/contracts/dependencies/openzeppelin/contracts/IERC20Detailed.sol -+// downloads/LINEA/UI_INCENTIVE_DATA_PROVIDER/UiIncentiveDataProviderV3/src/contracts/dependencies/openzeppelin/contracts/IERC20Detailed.sol - - interface IERC20Detailed is IERC20 { - function name() external view returns (string memory); -@@ -1399,7 +1399,7 @@ interface IERC20Detailed is IERC20 { - function decimals() external view returns (uint8); - } - --// downloads/ARBITRUM/UI_INCENTIVE_DATA_PROVIDER/UiIncentiveDataProviderV3/src/contracts/helpers/interfaces/IUiIncentiveDataProviderV3.sol -+// downloads/LINEA/UI_INCENTIVE_DATA_PROVIDER/UiIncentiveDataProviderV3/src/contracts/helpers/interfaces/IUiIncentiveDataProviderV3.sol - - interface IUiIncentiveDataProviderV3 { - struct AggregatedReserveIncentiveData { -@@ -1470,7 +1470,7 @@ interface IUiIncentiveDataProviderV3 { - returns (AggregatedReserveIncentiveData[] memory, UserReserveIncentiveData[] memory); - } - --// downloads/ARBITRUM/UI_INCENTIVE_DATA_PROVIDER/UiIncentiveDataProviderV3/src/contracts/interfaces/IACLManager.sol -+// downloads/LINEA/UI_INCENTIVE_DATA_PROVIDER/UiIncentiveDataProviderV3/src/contracts/interfaces/IACLManager.sol - - /** - * @title IACLManager -@@ -1643,7 +1643,7 @@ interface IACLManager { - function isAssetListingAdmin(address admin) external view returns (bool); - } - --// downloads/ARBITRUM/UI_INCENTIVE_DATA_PROVIDER/UiIncentiveDataProviderV3/src/contracts/interfaces/IPool.sol -+// downloads/LINEA/UI_INCENTIVE_DATA_PROVIDER/UiIncentiveDataProviderV3/src/contracts/interfaces/IPool.sol - - /** - * @title IPool -@@ -2474,7 +2474,7 @@ interface IPool { - function getSupplyLogic() external view returns (address); - } - --// downloads/ARBITRUM/UI_INCENTIVE_DATA_PROVIDER/UiIncentiveDataProviderV3/src/contracts/protocol/libraries/configuration/ReserveConfiguration.sol -+// downloads/LINEA/UI_INCENTIVE_DATA_PROVIDER/UiIncentiveDataProviderV3/src/contracts/protocol/libraries/configuration/ReserveConfiguration.sol - - /** - * @title ReserveConfiguration library -@@ -3055,7 +3055,7 @@ library ReserveConfiguration { - } - } - --// downloads/ARBITRUM/UI_INCENTIVE_DATA_PROVIDER/UiIncentiveDataProviderV3/src/contracts/rewards/libraries/RewardsDataTypes.sol -+// downloads/LINEA/UI_INCENTIVE_DATA_PROVIDER/UiIncentiveDataProviderV3/src/contracts/rewards/libraries/RewardsDataTypes.sol - - library RewardsDataTypes { - struct RewardsConfigInput { -@@ -3106,7 +3106,7 @@ library RewardsDataTypes { - } - } - --// downloads/ARBITRUM/UI_INCENTIVE_DATA_PROVIDER/UiIncentiveDataProviderV3/src/contracts/protocol/libraries/configuration/UserConfiguration.sol -+// downloads/LINEA/UI_INCENTIVE_DATA_PROVIDER/UiIncentiveDataProviderV3/src/contracts/protocol/libraries/configuration/UserConfiguration.sol - - /** - * @title UserConfiguration library -@@ -3338,7 +3338,7 @@ library UserConfiguration { - } - } - --// downloads/ARBITRUM/UI_INCENTIVE_DATA_PROVIDER/UiIncentiveDataProviderV3/src/contracts/rewards/interfaces/IRewardsController.sol -+// downloads/LINEA/UI_INCENTIVE_DATA_PROVIDER/UiIncentiveDataProviderV3/src/contracts/rewards/interfaces/IRewardsController.sol - - /** - * @title IRewardsController -@@ -3536,7 +3536,7 @@ interface IRewardsController is IRewardsDistributor { - ) external returns (address[] memory rewardsList, uint256[] memory claimedAmounts); - } - --// downloads/ARBITRUM/UI_INCENTIVE_DATA_PROVIDER/UiIncentiveDataProviderV3/src/contracts/protocol/tokenization/base/IncentivizedERC20.sol -+// downloads/LINEA/UI_INCENTIVE_DATA_PROVIDER/UiIncentiveDataProviderV3/src/contracts/protocol/tokenization/base/IncentivizedERC20.sol - - /** - * @title IncentivizedERC20 -@@ -3759,7 +3759,7 @@ abstract contract IncentivizedERC20 is Context, IERC20Detailed { - } - } - --// downloads/ARBITRUM/UI_INCENTIVE_DATA_PROVIDER/UiIncentiveDataProviderV3/src/contracts/helpers/UiIncentiveDataProviderV3.sol -+// downloads/LINEA/UI_INCENTIVE_DATA_PROVIDER/UiIncentiveDataProviderV3/src/contracts/helpers/UiIncentiveDataProviderV3.sol - - contract UiIncentiveDataProviderV3 is IUiIncentiveDataProviderV3 { - using UserConfiguration for DataTypes.UserConfigurationMap; + ``` diff --git a/diffs/ARBITRUM_LINEA/UI_POOL_DATA_PROVIDER_DIFF.md b/diffs/ARBITRUM_LINEA/UI_POOL_DATA_PROVIDER_DIFF.md index 7d95d85b..3bc4996e 100644 --- a/diffs/ARBITRUM_LINEA/UI_POOL_DATA_PROVIDER_DIFF.md +++ b/diffs/ARBITRUM_LINEA/UI_POOL_DATA_PROVIDER_DIFF.md @@ -3,229 +3,5 @@ diff --git a/./downloads/ARBITRUM/UI_POOL_DATA_PROVIDER.sol b/./downloads/LINEA/ index 1457bcc..2d97366 100644 --- a/./downloads/ARBITRUM/UI_POOL_DATA_PROVIDER.sol +++ b/./downloads/LINEA/UI_POOL_DATA_PROVIDER.sol -@@ -1,7 +1,7 @@ - // SPDX-License-Identifier: BUSL-1.1 - pragma solidity ^0.8.0 ^0.8.10; - --// downloads/ARBITRUM/UI_POOL_DATA_PROVIDER/UiPoolDataProviderV3/src/contracts/dependencies/openzeppelin/contracts/IERC20.sol -+// downloads/LINEA/UI_POOL_DATA_PROVIDER/UiPoolDataProviderV3/src/contracts/dependencies/openzeppelin/contracts/IERC20.sol - - /** - * @dev Interface of the ERC20 standard as defined in the EIP. -@@ -77,7 +77,7 @@ interface IERC20 { - event Approval(address indexed owner, address indexed spender, uint256 value); - } - --// downloads/ARBITRUM/UI_POOL_DATA_PROVIDER/UiPoolDataProviderV3/src/contracts/helpers/interfaces/IEACAggregatorProxy.sol -+// downloads/LINEA/UI_POOL_DATA_PROVIDER/UiPoolDataProviderV3/src/contracts/helpers/interfaces/IEACAggregatorProxy.sol - - interface IEACAggregatorProxy { - function decimals() external view returns (uint8); -@@ -96,7 +96,7 @@ interface IEACAggregatorProxy { - event NewRound(uint256 indexed roundId, address indexed startedBy); - } - --// downloads/ARBITRUM/UI_POOL_DATA_PROVIDER/UiPoolDataProviderV3/src/contracts/interfaces/IAaveIncentivesController.sol -+// downloads/LINEA/UI_POOL_DATA_PROVIDER/UiPoolDataProviderV3/src/contracts/interfaces/IAaveIncentivesController.sol - - /** - * @title IAaveIncentivesController -@@ -115,7 +115,7 @@ interface IAaveIncentivesController { - function handleAction(address user, uint256 totalSupply, uint256 userBalance) external; - } - --// downloads/ARBITRUM/UI_POOL_DATA_PROVIDER/UiPoolDataProviderV3/src/contracts/interfaces/IPoolAddressesProvider.sol -+// downloads/LINEA/UI_POOL_DATA_PROVIDER/UiPoolDataProviderV3/src/contracts/interfaces/IPoolAddressesProvider.sol - - /** - * @title IPoolAddressesProvider -@@ -342,7 +342,7 @@ interface IPoolAddressesProvider { - function setPoolDataProvider(address newDataProvider) external; - } - --// downloads/ARBITRUM/UI_POOL_DATA_PROVIDER/UiPoolDataProviderV3/src/contracts/interfaces/IPriceOracleGetter.sol -+// downloads/LINEA/UI_POOL_DATA_PROVIDER/UiPoolDataProviderV3/src/contracts/interfaces/IPriceOracleGetter.sol - - /** - * @title IPriceOracleGetter -@@ -372,7 +372,7 @@ interface IPriceOracleGetter { - function getAssetPrice(address asset) external view returns (uint256); - } - --// downloads/ARBITRUM/UI_POOL_DATA_PROVIDER/UiPoolDataProviderV3/src/contracts/interfaces/IScaledBalanceToken.sol -+// downloads/LINEA/UI_POOL_DATA_PROVIDER/UiPoolDataProviderV3/src/contracts/interfaces/IScaledBalanceToken.sol - - /** - * @title IScaledBalanceToken -@@ -444,7 +444,7 @@ interface IScaledBalanceToken { - function getPreviousIndex(address user) external view returns (uint256); - } - --// downloads/ARBITRUM/UI_POOL_DATA_PROVIDER/UiPoolDataProviderV3/src/contracts/protocol/libraries/helpers/Errors.sol -+// downloads/LINEA/UI_POOL_DATA_PROVIDER/UiPoolDataProviderV3/src/contracts/protocol/libraries/helpers/Errors.sol - - /** - * @title Errors library -@@ -547,7 +547,7 @@ library Errors { - string public constant NOT_BORROWABLE_IN_EMODE = '100'; // Asset not borrowable in eMode - } - --// downloads/ARBITRUM/UI_POOL_DATA_PROVIDER/UiPoolDataProviderV3/src/contracts/protocol/libraries/math/WadRayMath.sol -+// downloads/LINEA/UI_POOL_DATA_PROVIDER/UiPoolDataProviderV3/src/contracts/protocol/libraries/math/WadRayMath.sol - - /** - * @title WadRayMath library -@@ -673,7 +673,7 @@ library WadRayMath { - } - } - --// downloads/ARBITRUM/UI_POOL_DATA_PROVIDER/UiPoolDataProviderV3/src/contracts/protocol/libraries/types/DataTypes.sol -+// downloads/LINEA/UI_POOL_DATA_PROVIDER/UiPoolDataProviderV3/src/contracts/protocol/libraries/types/DataTypes.sol - - library DataTypes { - /** -@@ -997,7 +997,7 @@ library DataTypes { - } - } - --// downloads/ARBITRUM/UI_POOL_DATA_PROVIDER/UiPoolDataProviderV3/src/contracts/dependencies/openzeppelin/contracts/IERC20Detailed.sol -+// downloads/LINEA/UI_POOL_DATA_PROVIDER/UiPoolDataProviderV3/src/contracts/dependencies/openzeppelin/contracts/IERC20Detailed.sol - - interface IERC20Detailed is IERC20 { - function name() external view returns (string memory); -@@ -1007,7 +1007,7 @@ interface IERC20Detailed is IERC20 { - function decimals() external view returns (uint8); - } - --// downloads/ARBITRUM/UI_POOL_DATA_PROVIDER/UiPoolDataProviderV3/src/contracts/helpers/interfaces/IERC20DetailedBytes.sol -+// downloads/LINEA/UI_POOL_DATA_PROVIDER/UiPoolDataProviderV3/src/contracts/helpers/interfaces/IERC20DetailedBytes.sol - - interface IERC20DetailedBytes is IERC20 { - function name() external view returns (bytes32); -@@ -1017,7 +1017,7 @@ interface IERC20DetailedBytes is IERC20 { - function decimals() external view returns (uint8); - } - --// downloads/ARBITRUM/UI_POOL_DATA_PROVIDER/UiPoolDataProviderV3/src/contracts/interfaces/IPoolDataProvider.sol -+// downloads/LINEA/UI_POOL_DATA_PROVIDER/UiPoolDataProviderV3/src/contracts/interfaces/IPoolDataProvider.sol - - /** - * @title IPoolDataProvider -@@ -1265,7 +1265,7 @@ interface IPoolDataProvider { - function getVirtualUnderlyingBalance(address asset) external view returns (uint256); - } - --// downloads/ARBITRUM/UI_POOL_DATA_PROVIDER/UiPoolDataProviderV3/src/contracts/interfaces/IReserveInterestRateStrategy.sol -+// downloads/LINEA/UI_POOL_DATA_PROVIDER/UiPoolDataProviderV3/src/contracts/interfaces/IReserveInterestRateStrategy.sol - - /** - * @title IReserveInterestRateStrategy -@@ -1292,7 +1292,7 @@ interface IReserveInterestRateStrategy { - ) external view returns (uint256, uint256); - } - --// downloads/ARBITRUM/UI_POOL_DATA_PROVIDER/UiPoolDataProviderV3/src/contracts/helpers/interfaces/IUiPoolDataProviderV3.sol -+// downloads/LINEA/UI_POOL_DATA_PROVIDER/UiPoolDataProviderV3/src/contracts/helpers/interfaces/IUiPoolDataProviderV3.sol - - interface IUiPoolDataProviderV3 { - struct AggregatedReserveData { -@@ -1384,7 +1384,7 @@ interface IUiPoolDataProviderV3 { - function getEModes(IPoolAddressesProvider provider) external view returns (Emode[] memory); - } - --// downloads/ARBITRUM/UI_POOL_DATA_PROVIDER/UiPoolDataProviderV3/src/contracts/interfaces/IAaveOracle.sol -+// downloads/LINEA/UI_POOL_DATA_PROVIDER/UiPoolDataProviderV3/src/contracts/interfaces/IAaveOracle.sol - - /** - * @title IAaveOracle -@@ -1452,7 +1452,7 @@ interface IAaveOracle is IPriceOracleGetter { - function getFallbackOracle() external view returns (address); - } - --// downloads/ARBITRUM/UI_POOL_DATA_PROVIDER/UiPoolDataProviderV3/src/contracts/interfaces/IPool.sol -+// downloads/LINEA/UI_POOL_DATA_PROVIDER/UiPoolDataProviderV3/src/contracts/interfaces/IPool.sol - - /** - * @title IPool -@@ -2283,7 +2283,7 @@ interface IPool { - function getSupplyLogic() external view returns (address); - } - --// downloads/ARBITRUM/UI_POOL_DATA_PROVIDER/UiPoolDataProviderV3/src/contracts/protocol/libraries/configuration/ReserveConfiguration.sol -+// downloads/LINEA/UI_POOL_DATA_PROVIDER/UiPoolDataProviderV3/src/contracts/protocol/libraries/configuration/ReserveConfiguration.sol - - /** - * @title ReserveConfiguration library -@@ -2864,7 +2864,7 @@ library ReserveConfiguration { - } - } - --// downloads/ARBITRUM/UI_POOL_DATA_PROVIDER/UiPoolDataProviderV3/src/contracts/interfaces/IDefaultInterestRateStrategyV2.sol -+// downloads/LINEA/UI_POOL_DATA_PROVIDER/UiPoolDataProviderV3/src/contracts/interfaces/IDefaultInterestRateStrategyV2.sol - - /** - * @title IDefaultInterestRateStrategyV2 -@@ -3022,7 +3022,7 @@ interface IDefaultInterestRateStrategyV2 is IReserveInterestRateStrategy { - function setInterestRateParams(address reserve, InterestRateData calldata rateData) external; - } - --// downloads/ARBITRUM/UI_POOL_DATA_PROVIDER/UiPoolDataProviderV3/src/contracts/protocol/libraries/configuration/UserConfiguration.sol -+// downloads/LINEA/UI_POOL_DATA_PROVIDER/UiPoolDataProviderV3/src/contracts/protocol/libraries/configuration/UserConfiguration.sol - - /** - * @title UserConfiguration library -@@ -3254,7 +3254,7 @@ library UserConfiguration { - } - } - --// downloads/ARBITRUM/UI_POOL_DATA_PROVIDER/UiPoolDataProviderV3/src/contracts/interfaces/IInitializableAToken.sol -+// downloads/LINEA/UI_POOL_DATA_PROVIDER/UiPoolDataProviderV3/src/contracts/interfaces/IInitializableAToken.sol - - /** - * @title IInitializableAToken -@@ -3307,7 +3307,7 @@ interface IInitializableAToken { - ) external; - } - --// downloads/ARBITRUM/UI_POOL_DATA_PROVIDER/UiPoolDataProviderV3/src/contracts/interfaces/IInitializableDebtToken.sol -+// downloads/LINEA/UI_POOL_DATA_PROVIDER/UiPoolDataProviderV3/src/contracts/interfaces/IInitializableDebtToken.sol - - /** - * @title IInitializableDebtToken -@@ -3356,7 +3356,7 @@ interface IInitializableDebtToken { - ) external; - } - --// downloads/ARBITRUM/UI_POOL_DATA_PROVIDER/UiPoolDataProviderV3/src/contracts/interfaces/IVariableDebtToken.sol -+// downloads/LINEA/UI_POOL_DATA_PROVIDER/UiPoolDataProviderV3/src/contracts/interfaces/IVariableDebtToken.sol - - /** - * @title IVariableDebtToken -@@ -3399,7 +3399,7 @@ interface IVariableDebtToken is IScaledBalanceToken, IInitializableDebtToken { - function UNDERLYING_ASSET_ADDRESS() external view returns (address); - } - --// downloads/ARBITRUM/UI_POOL_DATA_PROVIDER/UiPoolDataProviderV3/src/contracts/interfaces/IAToken.sol -+// downloads/LINEA/UI_POOL_DATA_PROVIDER/UiPoolDataProviderV3/src/contracts/interfaces/IAToken.sol - - /** - * @title IAToken -@@ -3533,7 +3533,7 @@ interface IAToken is IERC20, IScaledBalanceToken, IInitializableAToken { - function rescueTokens(address token, address to, uint256 amount) external; - } - --// downloads/ARBITRUM/UI_POOL_DATA_PROVIDER/UiPoolDataProviderV3/src/contracts/helpers/AaveProtocolDataProvider.sol -+// downloads/LINEA/UI_POOL_DATA_PROVIDER/UiPoolDataProviderV3/src/contracts/helpers/AaveProtocolDataProvider.sol - - /** - * @title AaveProtocolDataProvider -@@ -3818,7 +3818,7 @@ contract AaveProtocolDataProvider is IPoolDataProvider { - } - } - --// downloads/ARBITRUM/UI_POOL_DATA_PROVIDER/UiPoolDataProviderV3/src/contracts/helpers/UiPoolDataProviderV3.sol -+// downloads/LINEA/UI_POOL_DATA_PROVIDER/UiPoolDataProviderV3/src/contracts/helpers/UiPoolDataProviderV3.sol - - contract UiPoolDataProviderV3 is IUiPoolDataProviderV3 { - using WadRayMath for uint256; + ``` diff --git a/diffs/ARBITRUM_LINEA/WALLET_BALANCE_PROVIDER_DIFF.md b/diffs/ARBITRUM_LINEA/WALLET_BALANCE_PROVIDER_DIFF.md index 26ac0526..cac32656 100644 --- a/diffs/ARBITRUM_LINEA/WALLET_BALANCE_PROVIDER_DIFF.md +++ b/diffs/ARBITRUM_LINEA/WALLET_BALANCE_PROVIDER_DIFF.md @@ -3,1825 +3,19 @@ diff --git a/./downloads/ARBITRUM/WALLET_BALANCE_PROVIDER.sol b/./downloads/LINE index 0195ac0..a31677f 100644 --- a/./downloads/ARBITRUM/WALLET_BALANCE_PROVIDER.sol +++ b/./downloads/LINEA/WALLET_BALANCE_PROVIDER.sol -@@ -1,7 +1,9 @@ --// SPDX-License-Identifier: agpl-3.0 --pragma solidity =0.8.10; -+// SPDX-License-Identifier: BUSL-1.1 -+pragma solidity ^0.8.0 ^0.8.10; - --// downloads/ARBITRUM/WALLET_BALANCE_PROVIDER/WalletBalanceProvider/@aave/core-v3/contracts/dependencies/openzeppelin/contracts/Address.sol -+// downloads/LINEA/WALLET_BALANCE_PROVIDER/WalletBalanceProvider/src/contracts/dependencies/openzeppelin/contracts/Address.sol -+ -+// OpenZeppelin Contracts v4.4.1 (utils/Address.sol) - - /** - * @dev Collection of functions related to the address type -@@ -25,16 +27,15 @@ library Address { - * ==== - */ - function isContract(address account) internal view returns (bool) { -- // According to EIP-1052, 0x0 is the value returned for not-yet created accounts -- // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned -- // for accounts without code, i.e. `keccak256('')` -- bytes32 codehash; -- bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; -- // solhint-disable-next-line no-inline-assembly -+ // This method relies on extcodesize, which returns 0 for contracts in -+ // construction, since the code is only stored at the end of the -+ // constructor execution. -+ -+ uint256 size; - assembly { -- codehash := extcodehash(account) -+ size := extcodesize(account) - } -- return (codehash != accountHash && codehash != 0x0); -+ return size > 0; - } - - /** -@@ -56,13 +57,171 @@ library Address { - function sendValue(address payable recipient, uint256 amount) internal { - require(address(this).balance >= amount, 'Address: insufficient balance'); - -- // solhint-disable-next-line avoid-low-level-calls, avoid-call-value - (bool success, ) = recipient.call{value: amount}(''); - require(success, 'Address: unable to send value, recipient may have reverted'); - } -+ -+ /** -+ * @dev Performs a Solidity function call using a low level `call`. A -+ * plain `call` is an unsafe replacement for a function call: use this -+ * function instead. -+ * -+ * If `target` reverts with a revert reason, it is bubbled up by this -+ * function (like regular Solidity function calls). -+ * -+ * Returns the raw returned data. To convert to the expected return value, -+ * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. -+ * -+ * Requirements: -+ * -+ * - `target` must be a contract. -+ * - calling `target` with `data` must not revert. -+ * -+ * _Available since v3.1._ -+ */ -+ function functionCall(address target, bytes memory data) internal returns (bytes memory) { -+ return functionCall(target, data, 'Address: low-level call failed'); -+ } -+ -+ /** -+ * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with -+ * `errorMessage` as a fallback revert reason when `target` reverts. -+ * -+ * _Available since v3.1._ -+ */ -+ function functionCall( -+ address target, -+ bytes memory data, -+ string memory errorMessage -+ ) internal returns (bytes memory) { -+ return functionCallWithValue(target, data, 0, errorMessage); -+ } -+ -+ /** -+ * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], -+ * but also transferring `value` wei to `target`. -+ * -+ * Requirements: -+ * -+ * - the calling contract must have an ETH balance of at least `value`. -+ * - the called Solidity function must be `payable`. -+ * -+ * _Available since v3.1._ -+ */ -+ function functionCallWithValue( -+ address target, -+ bytes memory data, -+ uint256 value -+ ) internal returns (bytes memory) { -+ return functionCallWithValue(target, data, value, 'Address: low-level call with value failed'); -+ } -+ -+ /** -+ * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but -+ * with `errorMessage` as a fallback revert reason when `target` reverts. -+ * -+ * _Available since v3.1._ -+ */ -+ function functionCallWithValue( -+ address target, -+ bytes memory data, -+ uint256 value, -+ string memory errorMessage -+ ) internal returns (bytes memory) { -+ require(address(this).balance >= value, 'Address: insufficient balance for call'); -+ require(isContract(target), 'Address: call to non-contract'); -+ -+ (bool success, bytes memory returndata) = target.call{value: value}(data); -+ return verifyCallResult(success, returndata, errorMessage); -+ } -+ -+ /** -+ * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], -+ * but performing a static call. -+ * -+ * _Available since v3.3._ -+ */ -+ function functionStaticCall( -+ address target, -+ bytes memory data -+ ) internal view returns (bytes memory) { -+ return functionStaticCall(target, data, 'Address: low-level static call failed'); -+ } -+ -+ /** -+ * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], -+ * but performing a static call. -+ * -+ * _Available since v3.3._ -+ */ -+ function functionStaticCall( -+ address target, -+ bytes memory data, -+ string memory errorMessage -+ ) internal view returns (bytes memory) { -+ require(isContract(target), 'Address: static call to non-contract'); -+ -+ (bool success, bytes memory returndata) = target.staticcall(data); -+ return verifyCallResult(success, returndata, errorMessage); -+ } -+ -+ /** -+ * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], -+ * but performing a delegate call. -+ * -+ * _Available since v3.4._ -+ */ -+ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { -+ return functionDelegateCall(target, data, 'Address: low-level delegate call failed'); -+ } -+ -+ /** -+ * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], -+ * but performing a delegate call. -+ * -+ * _Available since v3.4._ -+ */ -+ function functionDelegateCall( -+ address target, -+ bytes memory data, -+ string memory errorMessage -+ ) internal returns (bytes memory) { -+ require(isContract(target), 'Address: delegate call to non-contract'); -+ -+ (bool success, bytes memory returndata) = target.delegatecall(data); -+ return verifyCallResult(success, returndata, errorMessage); -+ } -+ -+ /** -+ * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the -+ * revert reason using the provided one. -+ * -+ * _Available since v4.3._ -+ */ -+ function verifyCallResult( -+ bool success, -+ bytes memory returndata, -+ string memory errorMessage -+ ) internal pure returns (bytes memory) { -+ if (success) { -+ return returndata; -+ } else { -+ // Look for revert reason and bubble it up if present -+ if (returndata.length > 0) { -+ // The easiest way to bubble the revert reason is using memory via assembly -+ -+ assembly { -+ let returndata_size := mload(returndata) -+ revert(add(32, returndata), returndata_size) -+ } -+ } else { -+ revert(errorMessage); -+ } -+ } -+ } - } - --// downloads/ARBITRUM/WALLET_BALANCE_PROVIDER/WalletBalanceProvider/@aave/core-v3/contracts/dependencies/openzeppelin/contracts/IERC20.sol -+// downloads/LINEA/WALLET_BALANCE_PROVIDER/WalletBalanceProvider/src/contracts/dependencies/openzeppelin/contracts/IERC20.sol - - /** - * @dev Interface of the ERC20 standard as defined in the EIP. -@@ -138,13 +297,13 @@ interface IERC20 { - event Approval(address indexed owner, address indexed spender, uint256 value); - } - --// downloads/ARBITRUM/WALLET_BALANCE_PROVIDER/WalletBalanceProvider/@aave/core-v3/contracts/interfaces/IPoolAddressesProvider.sol -+// downloads/LINEA/WALLET_BALANCE_PROVIDER/WalletBalanceProvider/src/contracts/interfaces/IPoolAddressesProvider.sol - - /** - * @title IPoolAddressesProvider - * @author Aave - * @notice Defines the basic interface for a Pool Addresses Provider. -- **/ -+ */ - interface IPoolAddressesProvider { - /** - * @dev Emitted when the market identifier is updated. -@@ -239,7 +398,7 @@ interface IPoolAddressesProvider { - /** - * @notice Returns the id of the Aave market to which this contract points to. - * @return The market id -- **/ -+ */ - function getMarketId() external view returns (string memory); - - /** -@@ -281,27 +440,27 @@ interface IPoolAddressesProvider { - /** - * @notice Returns the address of the Pool proxy. - * @return The Pool proxy address -- **/ -+ */ - function getPool() external view returns (address); - - /** - * @notice Updates the implementation of the Pool, or creates a proxy - * setting the new `pool` implementation when the function is called for the first time. - * @param newPoolImpl The new Pool implementation -- **/ -+ */ - function setPoolImpl(address newPoolImpl) external; - - /** - * @notice Returns the address of the PoolConfigurator proxy. - * @return The PoolConfigurator proxy address -- **/ -+ */ - function getPoolConfigurator() external view returns (address); - - /** - * @notice Updates the implementation of the PoolConfigurator, or creates a proxy - * setting the new `PoolConfigurator` implementation when the function is called for the first time. - * @param newPoolConfiguratorImpl The new PoolConfigurator implementation -- **/ -+ */ - function setPoolConfiguratorImpl(address newPoolConfiguratorImpl) external; - - /** -@@ -325,7 +484,7 @@ interface IPoolAddressesProvider { - /** - * @notice Updates the address of the ACL manager. - * @param newAclManager The address of the new ACLManager -- **/ -+ */ - function setACLManager(address newAclManager) external; - - /** -@@ -349,7 +508,7 @@ interface IPoolAddressesProvider { - /** - * @notice Updates the address of the price oracle sentinel. - * @param newPriceOracleSentinel The address of the new PriceOracleSentinel -- **/ -+ */ - function setPriceOracleSentinel(address newPriceOracleSentinel) external; - - /** -@@ -361,11 +520,11 @@ interface IPoolAddressesProvider { - /** - * @notice Updates the address of the data provider. - * @param newDataProvider The address of the new DataProvider -- **/ -+ */ - function setPoolDataProvider(address newDataProvider) external; - } - --// downloads/ARBITRUM/WALLET_BALANCE_PROVIDER/WalletBalanceProvider/@aave/core-v3/contracts/protocol/libraries/helpers/Errors.sol -+// downloads/LINEA/WALLET_BALANCE_PROVIDER/WalletBalanceProvider/src/contracts/protocol/libraries/helpers/Errors.sol - - /** - * @title Errors library -@@ -403,38 +562,33 @@ library Errors { - string public constant RESERVE_FROZEN = '28'; // 'Action cannot be performed because the reserve is frozen' - string public constant RESERVE_PAUSED = '29'; // 'Action cannot be performed because the reserve is paused' - string public constant BORROWING_NOT_ENABLED = '30'; // 'Borrowing is not enabled' -- string public constant STABLE_BORROWING_NOT_ENABLED = '31'; // 'Stable borrowing is not enabled' - string public constant NOT_ENOUGH_AVAILABLE_USER_BALANCE = '32'; // 'User cannot withdraw more than the available balance' - string public constant INVALID_INTEREST_RATE_MODE_SELECTED = '33'; // 'Invalid interest rate mode selected' - string public constant COLLATERAL_BALANCE_IS_ZERO = '34'; // 'The collateral balance is 0' - string public constant HEALTH_FACTOR_LOWER_THAN_LIQUIDATION_THRESHOLD = '35'; // 'Health factor is lesser than the liquidation threshold' - string public constant COLLATERAL_CANNOT_COVER_NEW_BORROW = '36'; // 'There is not enough collateral to cover a new borrow' - string public constant COLLATERAL_SAME_AS_BORROWING_CURRENCY = '37'; // 'Collateral is (mostly) the same currency that is being borrowed' -- string public constant AMOUNT_BIGGER_THAN_MAX_LOAN_SIZE_STABLE = '38'; // 'The requested amount is greater than the max loan size in stable rate mode' - string public constant NO_DEBT_OF_SELECTED_TYPE = '39'; // 'For repayment of a specific type of debt, the user needs to have debt that type' - string public constant NO_EXPLICIT_AMOUNT_TO_REPAY_ON_BEHALF = '40'; // 'To repay on behalf of a user an explicit amount to repay is needed' -- string public constant NO_OUTSTANDING_STABLE_DEBT = '41'; // 'User does not have outstanding stable rate debt on this reserve' - string public constant NO_OUTSTANDING_VARIABLE_DEBT = '42'; // 'User does not have outstanding variable rate debt on this reserve' - string public constant UNDERLYING_BALANCE_ZERO = '43'; // 'The underlying balance needs to be greater than 0' - string public constant INTEREST_RATE_REBALANCE_CONDITIONS_NOT_MET = '44'; // 'Interest rate rebalance conditions were not met' - string public constant HEALTH_FACTOR_NOT_BELOW_THRESHOLD = '45'; // 'Health factor is not below the threshold' - string public constant COLLATERAL_CANNOT_BE_LIQUIDATED = '46'; // 'The collateral chosen cannot be liquidated' - string public constant SPECIFIED_CURRENCY_NOT_BORROWED_BY_USER = '47'; // 'User did not borrow the specified currency' -- string public constant SAME_BLOCK_BORROW_REPAY = '48'; // 'Borrow and repay in same block is not allowed' - string public constant INCONSISTENT_FLASHLOAN_PARAMS = '49'; // 'Inconsistent flashloan parameters' - string public constant BORROW_CAP_EXCEEDED = '50'; // 'Borrow cap is exceeded' - string public constant SUPPLY_CAP_EXCEEDED = '51'; // 'Supply cap is exceeded' - string public constant UNBACKED_MINT_CAP_EXCEEDED = '52'; // 'Unbacked mint cap is exceeded' - string public constant DEBT_CEILING_EXCEEDED = '53'; // 'Debt ceiling is exceeded' -- string public constant ATOKEN_SUPPLY_NOT_ZERO = '54'; // 'AToken supply is not zero' -- string public constant STABLE_DEBT_NOT_ZERO = '55'; // 'Stable debt supply is not zero' -+ string public constant UNDERLYING_CLAIMABLE_RIGHTS_NOT_ZERO = '54'; // 'Claimable rights over underlying not zero (aToken supply or accruedToTreasury)' - string public constant VARIABLE_DEBT_SUPPLY_NOT_ZERO = '56'; // 'Variable debt supply is not zero' - string public constant LTV_VALIDATION_FAILED = '57'; // 'Ltv validation failed' - string public constant INCONSISTENT_EMODE_CATEGORY = '58'; // 'Inconsistent eMode category' - string public constant PRICE_ORACLE_SENTINEL_CHECK_FAILED = '59'; // 'Price oracle sentinel validation failed' - string public constant ASSET_NOT_BORROWABLE_IN_ISOLATION = '60'; // 'Asset is not borrowable in isolation mode' - string public constant RESERVE_ALREADY_INITIALIZED = '61'; // 'Reserve has already been initialized' -- string public constant USER_IN_ISOLATION_MODE = '62'; // 'User is in isolation mode' -+ string public constant USER_IN_ISOLATION_MODE_OR_LTV_ZERO = '62'; // 'User is in isolation mode or ltv is zero' - string public constant INVALID_LTV = '63'; // 'Invalid ltv parameter for the reserve' - string public constant INVALID_LIQ_THRESHOLD = '64'; // 'Invalid liquidity threshold parameter for the reserve' - string public constant INVALID_LIQ_BONUS = '65'; // 'Invalid liquidity bonus parameter for the reserve' -@@ -456,19 +610,31 @@ library Errors { - string public constant DEBT_CEILING_NOT_ZERO = '81'; // 'Debt ceiling is not zero' - string public constant ASSET_NOT_LISTED = '82'; // 'Asset is not listed' - string public constant INVALID_OPTIMAL_USAGE_RATIO = '83'; // 'Invalid optimal usage ratio' -- string public constant INVALID_OPTIMAL_STABLE_TO_TOTAL_DEBT_RATIO = '84'; // 'Invalid optimal stable to total debt ratio' - string public constant UNDERLYING_CANNOT_BE_RESCUED = '85'; // 'The underlying asset cannot be rescued' - string public constant ADDRESSES_PROVIDER_ALREADY_ADDED = '86'; // 'Reserve has already been added to reserve list' - string public constant POOL_ADDRESSES_DO_NOT_MATCH = '87'; // 'The token implementation pool address and the pool address provided by the initializing pool do not match' -- string public constant STABLE_BORROWING_ENABLED = '88'; // 'Stable borrowing is enabled' - string public constant SILOED_BORROWING_VIOLATION = '89'; // 'User is trying to borrow multiple assets including a siloed one' - string public constant RESERVE_DEBT_NOT_ZERO = '90'; // the total debt of the reserve needs to be 0 -+ string public constant FLASHLOAN_DISABLED = '91'; // FlashLoaning for this asset is disabled -+ string public constant INVALID_MAX_RATE = '92'; // The expect maximum borrow rate is invalid -+ string public constant WITHDRAW_TO_ATOKEN = '93'; // Withdrawing to the aToken is not allowed -+ string public constant SUPPLY_TO_ATOKEN = '94'; // Supplying to the aToken is not allowed -+ string public constant SLOPE_2_MUST_BE_GTE_SLOPE_1 = '95'; // Variable interest rate slope 2 can not be lower than slope 1 -+ string public constant CALLER_NOT_RISK_OR_POOL_OR_EMERGENCY_ADMIN = '96'; // 'The caller of the function is not a risk, pool or emergency admin' -+ string public constant LIQUIDATION_GRACE_SENTINEL_CHECK_FAILED = '97'; // 'Liquidation grace sentinel validation failed' -+ string public constant INVALID_GRACE_PERIOD = '98'; // Grace period above a valid range -+ string public constant INVALID_FREEZE_STATE = '99'; // Reserve is already in the passed freeze state -+ string public constant NOT_BORROWABLE_IN_EMODE = '100'; // Asset not borrowable in eMode - } - --// downloads/ARBITRUM/WALLET_BALANCE_PROVIDER/WalletBalanceProvider/@aave/core-v3/contracts/protocol/libraries/types/DataTypes.sol -+// downloads/LINEA/WALLET_BALANCE_PROVIDER/WalletBalanceProvider/src/contracts/protocol/libraries/types/DataTypes.sol - - library DataTypes { -- struct ReserveData { -+ /** -+ * This exists specifically to maintain the `getReserveData()` interface, since the new, internal -+ * `ReserveData` struct includes the reserve's `virtualUnderlyingBalance`. -+ */ -+ struct ReserveDataLegacy { - //stores the reserve configuration - ReserveConfigurationMap configuration; - //the liquidity index. Expressed in ray -@@ -479,7 +645,7 @@ library DataTypes { - uint128 variableBorrowIndex; - //the current variable borrow rate. Expressed in ray - uint128 currentVariableBorrowRate; -- //the current stable borrow rate. Expressed in ray -+ // DEPRECATED on v3.2.0 - uint128 currentStableBorrowRate; - //timestamp of last update - uint40 lastUpdateTimestamp; -@@ -487,7 +653,7 @@ library DataTypes { - uint16 id; - //aToken address - address aTokenAddress; -- //stableDebtToken address -+ // DEPRECATED on v3.2.0 - address stableDebtTokenAddress; - //variableDebtToken address - address variableDebtTokenAddress; -@@ -501,6 +667,43 @@ library DataTypes { - uint128 isolationModeTotalDebt; - } - -+ struct ReserveData { -+ //stores the reserve configuration -+ ReserveConfigurationMap configuration; -+ //the liquidity index. Expressed in ray -+ uint128 liquidityIndex; -+ //the current supply rate. Expressed in ray -+ uint128 currentLiquidityRate; -+ //variable borrow index. Expressed in ray -+ uint128 variableBorrowIndex; -+ //the current variable borrow rate. Expressed in ray -+ uint128 currentVariableBorrowRate; -+ // DEPRECATED on v3.2.0 -+ uint128 __deprecatedStableBorrowRate; -+ //timestamp of last update -+ uint40 lastUpdateTimestamp; -+ //the id of the reserve. Represents the position in the list of the active reserves -+ uint16 id; -+ //timestamp until when liquidations are not allowed on the reserve, if set to past liquidations will be allowed -+ uint40 liquidationGracePeriodUntil; -+ //aToken address -+ address aTokenAddress; -+ // DEPRECATED on v3.2.0 -+ address __deprecatedStableDebtTokenAddress; -+ //variableDebtToken address -+ address variableDebtTokenAddress; -+ //address of the interest rate strategy -+ address interestRateStrategyAddress; -+ //the current treasury balance, scaled -+ uint128 accruedToTreasury; -+ //the outstanding unbacked aTokens minted through the bridging feature -+ uint128 unbacked; -+ //the outstanding debt borrowed against this asset in isolation mode -+ uint128 isolationModeTotalDebt; -+ //the amount of underlying accounted for by the protocol -+ uint128 virtualUnderlyingBalance; -+ } -+ - struct ReserveConfigurationMap { - //bit 0-15: LTV - //bit 16-31: Liq. threshold -@@ -509,18 +712,20 @@ library DataTypes { - //bit 56: reserve is active - //bit 57: reserve is frozen - //bit 58: borrowing is enabled -- //bit 59: stable rate borrowing enabled -+ //bit 59: DEPRECATED: stable rate borrowing enabled - //bit 60: asset is paused - //bit 61: borrowing in isolation mode is enabled -- //bit 62-63: reserved -+ //bit 62: siloed borrowing enabled -+ //bit 63: flashloaning enabled - //bit 64-79: reserve factor -- //bit 80-115 borrow cap in whole tokens, borrowCap == 0 => no cap -- //bit 116-151 supply cap in whole tokens, supplyCap == 0 => no cap -- //bit 152-167 liquidation protocol fee -- //bit 168-175 eMode category -- //bit 176-211 unbacked mint cap in whole tokens, unbackedMintCap == 0 => minting disabled -- //bit 212-251 debt ceiling for isolation mode with (ReserveConfiguration::DEBT_CEILING_DECIMALS) decimals -- //bit 252-255 unused -+ //bit 80-115: borrow cap in whole tokens, borrowCap == 0 => no cap -+ //bit 116-151: supply cap in whole tokens, supplyCap == 0 => no cap -+ //bit 152-167: liquidation protocol fee -+ //bit 168-175: DEPRECATED: eMode category -+ //bit 176-211: unbacked mint cap in whole tokens, unbackedMintCap == 0 => minting disabled -+ //bit 212-251: debt ceiling for isolation mode with (ReserveConfiguration::DEBT_CEILING_DECIMALS) decimals -+ //bit 252: virtual accounting is enabled for the reserve -+ //bit 253-255 unused - - uint256 data; - } -@@ -534,30 +739,49 @@ library DataTypes { - uint256 data; - } - -- struct EModeCategory { -+ // DEPRECATED: kept for backwards compatibility, might be removed in a future version -+ struct EModeCategoryLegacy { - // each eMode category has a custom ltv and liquidation threshold - uint16 ltv; - uint16 liquidationThreshold; - uint16 liquidationBonus; -- // each eMode category may or may not have a custom oracle to override the individual assets price oracles -+ // DEPRECATED - address priceSource; - string label; - } - -+ struct CollateralConfig { -+ uint16 ltv; -+ uint16 liquidationThreshold; -+ uint16 liquidationBonus; -+ } -+ -+ struct EModeCategoryBaseConfiguration { -+ uint16 ltv; -+ uint16 liquidationThreshold; -+ uint16 liquidationBonus; -+ string label; -+ } -+ -+ struct EModeCategory { -+ // each eMode category has a custom ltv and liquidation threshold -+ uint16 ltv; -+ uint16 liquidationThreshold; -+ uint16 liquidationBonus; -+ uint128 collateralBitmap; -+ string label; -+ uint128 borrowableBitmap; -+ } -+ - enum InterestRateMode { - NONE, -- STABLE, -+ __DEPRECATED, - VARIABLE - } - - struct ReserveCache { - uint256 currScaledVariableDebt; - uint256 nextScaledVariableDebt; -- uint256 currPrincipalStableDebt; -- uint256 currAvgStableBorrowRate; -- uint256 currTotalStableDebt; -- uint256 nextAvgStableBorrowRate; -- uint256 nextTotalStableDebt; - uint256 currLiquidityIndex; - uint256 nextLiquidityIndex; - uint256 currVariableBorrowIndex; -@@ -567,10 +791,8 @@ library DataTypes { - uint256 reserveFactor; - ReserveConfigurationMap reserveConfiguration; - address aTokenAddress; -- address stableDebtTokenAddress; - address variableDebtTokenAddress; - uint40 reserveLastUpdateTimestamp; -- uint40 stableDebtLastUpdateTimestamp; - } - - struct ExecuteLiquidationCallParams { -@@ -600,7 +822,6 @@ library DataTypes { - InterestRateMode interestRateMode; - uint16 referralCode; - bool releaseUnderlying; -- uint256 maxStableRateBorrowSizePercent; - uint256 reservesCount; - address oracle; - uint8 userEModeCategory; -@@ -652,9 +873,9 @@ library DataTypes { - uint16 referralCode; - uint256 flashLoanPremiumToProtocol; - uint256 flashLoanPremiumTotal; -- uint256 maxStableRateBorrowSizePercent; - uint256 reservesCount; - address addressesProvider; -+ address pool; - uint8 userEModeCategory; - bool isAuthorizedFlashBorrower; - } -@@ -693,7 +914,6 @@ library DataTypes { - address userAddress; - uint256 amount; - InterestRateMode interestRateMode; -- uint256 maxStableLoanPercent; - uint256 reservesCount; - address oracle; - uint8 userEModeCategory; -@@ -714,18 +934,16 @@ library DataTypes { - uint256 unbacked; - uint256 liquidityAdded; - uint256 liquidityTaken; -- uint256 totalStableDebt; -- uint256 totalVariableDebt; -- uint256 averageStableBorrowRate; -+ uint256 totalDebt; - uint256 reserveFactor; - address reserve; -- address aToken; -+ bool usingVirtualBalance; -+ uint256 virtualUnderlyingBalance; - } - - struct InitReserveParams { - address asset; - address aTokenAddress; -- address stableDebtAddress; - address variableDebtAddress; - address interestRateStrategyAddress; - uint16 reservesCount; -@@ -733,7 +951,7 @@ library DataTypes { - } - } - --// downloads/ARBITRUM/WALLET_BALANCE_PROVIDER/WalletBalanceProvider/@aave/core-v3/contracts/dependencies/gnosis/contracts/GPv2SafeERC20.sol -+// downloads/LINEA/WALLET_BALANCE_PROVIDER/WalletBalanceProvider/src/contracts/dependencies/gnosis/contracts/GPv2SafeERC20.sol - - /// @title Gnosis Protocol v2 Safe ERC20 Transfer Library - /// @author Gnosis Developers -@@ -846,13 +1064,13 @@ library GPv2SafeERC20 { - } - } - --// downloads/ARBITRUM/WALLET_BALANCE_PROVIDER/WalletBalanceProvider/@aave/core-v3/contracts/interfaces/IPool.sol -+// downloads/LINEA/WALLET_BALANCE_PROVIDER/WalletBalanceProvider/src/contracts/interfaces/IPool.sol - - /** - * @title IPool - * @author Aave - * @notice Defines the basic interface for an Aave Pool. -- **/ -+ */ - interface IPool { - /** - * @dev Emitted on mintUnbacked() -@@ -861,7 +1079,7 @@ interface IPool { - * @param onBehalfOf The beneficiary of the supplied assets, receiving the aTokens - * @param amount The amount of supplied assets - * @param referralCode The referral code used -- **/ -+ */ - event MintUnbacked( - address indexed reserve, - address user, -@@ -876,7 +1094,7 @@ interface IPool { - * @param backer The address paying for the backing - * @param amount The amount added as backing - * @param fee The amount paid in fees -- **/ -+ */ - event BackUnbacked(address indexed reserve, address indexed backer, uint256 amount, uint256 fee); - - /** -@@ -886,7 +1104,7 @@ interface IPool { - * @param onBehalfOf The beneficiary of the supply, receiving the aTokens - * @param amount The amount supplied - * @param referralCode The referral code used -- **/ -+ */ - event Supply( - address indexed reserve, - address user, -@@ -901,7 +1119,7 @@ interface IPool { - * @param user The address initiating the withdrawal, owner of aTokens - * @param to The address that will receive the underlying - * @param amount The amount to be withdrawn -- **/ -+ */ - event Withdraw(address indexed reserve, address indexed user, address indexed to, uint256 amount); - - /** -@@ -911,10 +1129,10 @@ interface IPool { - * initiator of the transaction on flashLoan() - * @param onBehalfOf The address that will be getting the debt - * @param amount The amount borrowed out -- * @param interestRateMode The rate mode: 1 for Stable, 2 for Variable -+ * @param interestRateMode The rate mode: 2 for Variable, 1 is deprecated (changed on v3.2.0) - * @param borrowRate The numeric rate at which the user has borrowed, expressed in ray - * @param referralCode The referral code used -- **/ -+ */ - event Borrow( - address indexed reserve, - address user, -@@ -932,7 +1150,7 @@ interface IPool { - * @param repayer The address of the user initiating the repay(), providing the funds - * @param amount The amount repaid - * @param useATokens True if the repayment is done using aTokens, `false` if done with underlying asset directly -- **/ -+ */ - event Repay( - address indexed reserve, - address indexed user, -@@ -941,18 +1159,6 @@ interface IPool { - bool useATokens - ); - -- /** -- * @dev Emitted on swapBorrowRateMode() -- * @param reserve The address of the underlying asset of the reserve -- * @param user The address of the user swapping his rate mode -- * @param interestRateMode The current interest rate mode of the position being swapped: 1 for Stable, 2 for Variable -- **/ -- event SwapBorrowRateMode( -- address indexed reserve, -- address indexed user, -- DataTypes.InterestRateMode interestRateMode -- ); -- - /** - * @dev Emitted on borrow(), repay() and liquidationCall() when using isolated assets - * @param asset The address of the underlying asset of the reserve -@@ -964,40 +1170,34 @@ interface IPool { - * @dev Emitted when the user selects a certain asset category for eMode - * @param user The address of the user - * @param categoryId The category id -- **/ -+ */ - event UserEModeSet(address indexed user, uint8 categoryId); - - /** - * @dev Emitted on setUserUseReserveAsCollateral() - * @param reserve The address of the underlying asset of the reserve - * @param user The address of the user enabling the usage as collateral -- **/ -+ */ - event ReserveUsedAsCollateralEnabled(address indexed reserve, address indexed user); - - /** - * @dev Emitted on setUserUseReserveAsCollateral() - * @param reserve The address of the underlying asset of the reserve - * @param user The address of the user enabling the usage as collateral -- **/ -+ */ - event ReserveUsedAsCollateralDisabled(address indexed reserve, address indexed user); - -- /** -- * @dev Emitted on rebalanceStableBorrowRate() -- * @param reserve The address of the underlying asset of the reserve -- * @param user The address of the user for which the rebalance has been executed -- **/ -- event RebalanceStableBorrowRate(address indexed reserve, address indexed user); -- - /** - * @dev Emitted on flashLoan() - * @param target The address of the flash loan receiver contract - * @param initiator The address initiating the flash loan - * @param asset The address of the asset being flash borrowed - * @param amount The amount flash borrowed -- * @param interestRateMode The flashloan mode: 0 for regular flashloan, 1 for Stable debt, 2 for Variable debt -+ * @param interestRateMode The flashloan mode: 0 for regular flashloan, -+ * 1 for Stable (Deprecated on v3.2.0), 2 for Variable - * @param premium The fee flash borrowed - * @param referralCode The referral code used -- **/ -+ */ - event FlashLoan( - address indexed target, - address initiator, -@@ -1018,7 +1218,7 @@ interface IPool { - * @param liquidator The address of the liquidator - * @param receiveAToken True if the liquidators wants to receive the collateral aTokens, `false` if he wants - * to receive the underlying collateral asset directly -- **/ -+ */ - event LiquidationCall( - address indexed collateralAsset, - address indexed debtAsset, -@@ -1033,11 +1233,11 @@ interface IPool { - * @dev Emitted when the state of a reserve is updated. - * @param reserve The address of the underlying asset of the reserve - * @param liquidityRate The next liquidity rate -- * @param stableBorrowRate The next stable borrow rate -+ * @param stableBorrowRate The next stable borrow rate @note deprecated on v3.2.0 - * @param variableBorrowRate The next variable borrow rate - * @param liquidityIndex The next liquidity index - * @param variableBorrowIndex The next variable borrow index -- **/ -+ */ - event ReserveDataUpdated( - address indexed reserve, - uint256 liquidityRate, -@@ -1051,17 +1251,17 @@ interface IPool { - * @dev Emitted when the protocol treasury receives minted aTokens from the accrued interest. - * @param reserve The address of the reserve - * @param amountMinted The amount minted to the treasury -- **/ -+ */ - event MintedToTreasury(address indexed reserve, uint256 amountMinted); - - /** -- * @dev Mints an `amount` of aTokens to the `onBehalfOf` -+ * @notice Mints an `amount` of aTokens to the `onBehalfOf` - * @param asset The address of the underlying asset to mint - * @param amount The amount to mint - * @param onBehalfOf The address that will receive the aTokens - * @param referralCode Code used to register the integrator originating the operation, for potential rewards. - * 0 if the action is executed directly by the user, without any middle-man -- **/ -+ */ - function mintUnbacked( - address asset, - uint256 amount, -@@ -1070,12 +1270,13 @@ interface IPool { - ) external; - - /** -- * @dev Back the current unbacked underlying with `amount` and pay `fee`. -+ * @notice Back the current unbacked underlying with `amount` and pay `fee`. - * @param asset The address of the underlying asset to back - * @param amount The amount to back - * @param fee The amount paid in fees -- **/ -- function backUnbacked(address asset, uint256 amount, uint256 fee) external; -+ * @return The backed amount -+ */ -+ function backUnbacked(address asset, uint256 amount, uint256 fee) external returns (uint256); - - /** - * @notice Supplies an `amount` of underlying asset into the reserve, receiving in return overlying aTokens. -@@ -1087,7 +1288,7 @@ interface IPool { - * is a different wallet - * @param referralCode Code used to register the integrator originating the operation, for potential rewards. - * 0 if the action is executed directly by the user, without any middle-man -- **/ -+ */ - function supply(address asset, uint256 amount, address onBehalfOf, uint16 referralCode) external; - - /** -@@ -1104,7 +1305,7 @@ interface IPool { - * @param permitV The V parameter of ERC712 permit sig - * @param permitR The R parameter of ERC712 permit sig - * @param permitS The S parameter of ERC712 permit sig -- **/ -+ */ - function supplyWithPermit( - address asset, - uint256 amount, -@@ -1126,24 +1327,23 @@ interface IPool { - * wants to receive it on his own wallet, or a different address if the beneficiary is a - * different wallet - * @return The final amount withdrawn -- **/ -+ */ - function withdraw(address asset, uint256 amount, address to) external returns (uint256); - - /** - * @notice Allows users to borrow a specific `amount` of the reserve underlying asset, provided that the borrower -- * already supplied enough collateral, or he was given enough allowance by a credit delegator on the -- * corresponding debt token (StableDebtToken or VariableDebtToken) -+ * already supplied enough collateral, or he was given enough allowance by a credit delegator on the VariableDebtToken - * - E.g. User borrows 100 USDC passing as `onBehalfOf` his own address, receiving the 100 USDC in his wallet -- * and 100 stable/variable debt tokens, depending on the `interestRateMode` -+ * and 100 variable debt tokens - * @param asset The address of the underlying asset to borrow - * @param amount The amount to be borrowed -- * @param interestRateMode The interest rate mode at which the user wants to borrow: 1 for Stable, 2 for Variable -+ * @param interestRateMode 2 for Variable, 1 is deprecated on v3.2.0 - * @param referralCode The code used to register the integrator originating the operation, for potential rewards. - * 0 if the action is executed directly by the user, without any middle-man - * @param onBehalfOf The address of the user who will receive the debt. Should be the address of the borrower itself - * calling the function if he wants to borrow against his own collateral, or the address of the credit delegator - * if he has been given credit delegation allowance -- **/ -+ */ - function borrow( - address asset, - uint256 amount, -@@ -1154,16 +1354,16 @@ interface IPool { - - /** - * @notice Repays a borrowed `amount` on a specific reserve, burning the equivalent debt tokens owned -- * - E.g. User repays 100 USDC, burning 100 variable/stable debt tokens of the `onBehalfOf` address -+ * - E.g. User repays 100 USDC, burning 100 variable debt tokens of the `onBehalfOf` address - * @param asset The address of the borrowed underlying asset previously borrowed - * @param amount The amount to repay - * - Send the value type(uint256).max in order to repay the whole debt for `asset` on the specific `debtMode` -- * @param interestRateMode The interest rate mode at of the debt the user wants to repay: 1 for Stable, 2 for Variable -+ * @param interestRateMode 2 for Variable, 1 is deprecated on v3.2.0 - * @param onBehalfOf The address of the user who will get his debt reduced/removed. Should be the address of the - * user calling the function if he wants to reduce/remove his own debt, or the address of any other - * other borrower whose debt should be removed - * @return The final amount repaid -- **/ -+ */ - function repay( - address asset, - uint256 amount, -@@ -1177,7 +1377,7 @@ interface IPool { - * @param asset The address of the borrowed underlying asset previously borrowed - * @param amount The amount to repay - * - Send the value type(uint256).max in order to repay the whole debt for `asset` on the specific `debtMode` -- * @param interestRateMode The interest rate mode at of the debt the user wants to repay: 1 for Stable, 2 for Variable -+ * @param interestRateMode 2 for Variable, 1 is deprecated on v3.2.0 - * @param onBehalfOf Address of the user who will get his debt reduced/removed. Should be the address of the - * user calling the function if he wants to reduce/remove his own debt, or the address of any other - * other borrower whose debt should be removed -@@ -1186,7 +1386,7 @@ interface IPool { - * @param permitR The R parameter of ERC712 permit sig - * @param permitS The S parameter of ERC712 permit sig - * @return The final amount repaid -- **/ -+ */ - function repayWithPermit( - address asset, - uint256 amount, -@@ -1201,44 +1401,26 @@ interface IPool { - /** - * @notice Repays a borrowed `amount` on a specific reserve using the reserve aTokens, burning the - * equivalent debt tokens -- * - E.g. User repays 100 USDC using 100 aUSDC, burning 100 variable/stable debt tokens -+ * - E.g. User repays 100 USDC using 100 aUSDC, burning 100 variable debt tokens - * @dev Passing uint256.max as amount will clean up any residual aToken dust balance, if the user aToken - * balance is not enough to cover the whole debt - * @param asset The address of the borrowed underlying asset previously borrowed - * @param amount The amount to repay - * - Send the value type(uint256).max in order to repay the whole debt for `asset` on the specific `debtMode` -- * @param interestRateMode The interest rate mode at of the debt the user wants to repay: 1 for Stable, 2 for Variable -+ * @param interestRateMode DEPRECATED in v3.2.0 - * @return The final amount repaid -- **/ -+ */ - function repayWithATokens( - address asset, - uint256 amount, - uint256 interestRateMode - ) external returns (uint256); - -- /** -- * @notice Allows a borrower to swap his debt between stable and variable mode, or vice versa -- * @param asset The address of the underlying asset borrowed -- * @param interestRateMode The current interest rate mode of the position being swapped: 1 for Stable, 2 for Variable -- **/ -- function swapBorrowRateMode(address asset, uint256 interestRateMode) external; -- -- /** -- * @notice Rebalances the stable interest rate of a user to the current stable rate defined on the reserve. -- * - Users can be rebalanced if the following conditions are satisfied: -- * 1. Usage ratio is above 95% -- * 2. the current supply APY is below REBALANCE_UP_THRESHOLD * maxVariableBorrowRate, which means that too -- * much has been borrowed at a stable rate and suppliers are not earning enough -- * @param asset The address of the underlying asset borrowed -- * @param user The address of the user to be rebalanced -- **/ -- function rebalanceStableBorrowRate(address asset, address user) external; -- - /** - * @notice Allows suppliers to enable/disable a specific supplied asset as collateral - * @param asset The address of the underlying asset supplied - * @param useAsCollateral True if the user wants to use the supply as collateral, false otherwise -- **/ -+ */ - function setUserUseReserveAsCollateral(address asset, bool useAsCollateral) external; - - /** -@@ -1251,7 +1433,7 @@ interface IPool { - * @param debtToCover The debt amount of borrowed `asset` the liquidator wants to cover - * @param receiveAToken True if the liquidators wants to receive the collateral aTokens, `false` if he wants - * to receive the underlying collateral asset directly -- **/ -+ */ - function liquidationCall( - address collateralAsset, - address debtAsset, -@@ -1264,19 +1446,19 @@ interface IPool { - * @notice Allows smartcontracts to access the liquidity of the pool within one transaction, - * as long as the amount taken plus a fee is returned. - * @dev IMPORTANT There are security concerns for developers of flashloan receiver contracts that must be kept -- * into consideration. For further details please visit https://developers.aave.com -+ * into consideration. For further details please visit https://docs.aave.com/developers/ - * @param receiverAddress The address of the contract receiving the funds, implementing IFlashLoanReceiver interface - * @param assets The addresses of the assets being flash-borrowed - * @param amounts The amounts of the assets being flash-borrowed - * @param interestRateModes Types of the debt to open if the flash loan is not returned: - * 0 -> Don't open any debt, just revert if funds can't be transferred from the receiver -- * 1 -> Open debt at stable rate for the value of the amount flash-borrowed to the `onBehalfOf` address -+ * 1 -> Deprecated on v3.2.0 - * 2 -> Open debt at variable rate for the value of the amount flash-borrowed to the `onBehalfOf` address -- * @param onBehalfOf The address that will receive the debt in the case of using on `modes` 1 or 2 -+ * @param onBehalfOf The address that will receive the debt in the case of using 2 on `modes` - * @param params Variadic packed params to pass to the receiver as extra information - * @param referralCode The code used to register the integrator originating the operation, for potential rewards. - * 0 if the action is executed directly by the user, without any middle-man -- **/ -+ */ - function flashLoan( - address receiverAddress, - address[] calldata assets, -@@ -1291,14 +1473,14 @@ interface IPool { - * @notice Allows smartcontracts to access the liquidity of the pool within one transaction, - * as long as the amount taken plus a fee is returned. - * @dev IMPORTANT There are security concerns for developers of flashloan receiver contracts that must be kept -- * into consideration. For further details please visit https://developers.aave.com -+ * into consideration. For further details please visit https://docs.aave.com/developers/ - * @param receiverAddress The address of the contract receiving the funds, implementing IFlashLoanSimpleReceiver interface - * @param asset The address of the asset being flash-borrowed - * @param amount The amount of the asset being flash-borrowed - * @param params Variadic packed params to pass to the receiver as extra information - * @param referralCode The code used to register the integrator originating the operation, for potential rewards. - * 0 if the action is executed directly by the user, without any middle-man -- **/ -+ */ - function flashLoanSimple( - address receiverAddress, - address asset, -@@ -1316,7 +1498,7 @@ interface IPool { - * @return currentLiquidationThreshold The liquidation threshold of the user - * @return ltv The loan to value of The user - * @return healthFactor The current health factor of the user -- **/ -+ */ - function getUserAccountData( - address user - ) -@@ -1337,14 +1519,12 @@ interface IPool { - * @dev Only callable by the PoolConfigurator contract - * @param asset The address of the underlying asset of the reserve - * @param aTokenAddress The address of the aToken that will be assigned to the reserve -- * @param stableDebtAddress The address of the StableDebtToken that will be assigned to the reserve - * @param variableDebtAddress The address of the VariableDebtToken that will be assigned to the reserve - * @param interestRateStrategyAddress The address of the interest rate strategy contract -- **/ -+ */ - function initReserve( - address asset, - address aTokenAddress, -- address stableDebtAddress, - address variableDebtAddress, - address interestRateStrategyAddress - ) external; -@@ -1352,8 +1532,9 @@ interface IPool { - /** - * @notice Drop a reserve - * @dev Only callable by the PoolConfigurator contract -+ * @dev Does not reset eMode flags, which must be considered when reusing the same reserve id for a different reserve. - * @param asset The address of the underlying asset of the reserve -- **/ -+ */ - function dropReserve(address asset) external; - - /** -@@ -1361,18 +1542,34 @@ interface IPool { - * @dev Only callable by the PoolConfigurator contract - * @param asset The address of the underlying asset of the reserve - * @param rateStrategyAddress The address of the interest rate strategy contract -- **/ -+ */ - function setReserveInterestRateStrategyAddress( - address asset, - address rateStrategyAddress - ) external; - -+ /** -+ * @notice Accumulates interest to all indexes of the reserve -+ * @dev Only callable by the PoolConfigurator contract -+ * @dev To be used when required by the configurator, for example when updating interest rates strategy data -+ * @param asset The address of the underlying asset of the reserve -+ */ -+ function syncIndexesState(address asset) external; -+ -+ /** -+ * @notice Updates interest rates on the reserve data -+ * @dev Only callable by the PoolConfigurator contract -+ * @dev To be used when required by the configurator, for example when updating interest rates strategy data -+ * @param asset The address of the underlying asset of the reserve -+ */ -+ function syncRatesState(address asset) external; -+ - /** - * @notice Sets the configuration bitmap of the reserve as a whole - * @dev Only callable by the PoolConfigurator contract - * @param asset The address of the underlying asset of the reserve - * @param configuration The new configuration bitmap -- **/ -+ */ - function setConfiguration( - address asset, - DataTypes.ReserveConfigurationMap calldata configuration -@@ -1382,7 +1579,7 @@ interface IPool { - * @notice Returns the configuration of the reserve - * @param asset The address of the underlying asset of the reserve - * @return The configuration of the reserve -- **/ -+ */ - function getConfiguration( - address asset - ) external view returns (DataTypes.ReserveConfigurationMap memory); -@@ -1391,13 +1588,13 @@ interface IPool { - * @notice Returns the configuration of the user across all the reserves - * @param user The user address - * @return The configuration of the user -- **/ -+ */ - function getUserConfiguration( - address user - ) external view returns (DataTypes.UserConfigurationMap memory); - - /** -- * @notice Returns the normalized income normalized income of the reserve -+ * @notice Returns the normalized income of the reserve - * @param asset The address of the underlying asset of the reserve - * @return The reserve's normalized income - */ -@@ -1405,6 +1602,13 @@ interface IPool { - - /** - * @notice Returns the normalized variable debt per unit of asset -+ * @dev WARNING: This function is intended to be used primarily by the protocol itself to get a -+ * "dynamic" variable index based on time, current stored index and virtual rate at the current -+ * moment (approx. a borrower would get if opening a position). This means that is always used in -+ * combination with variable debt supply/balances. -+ * If using this function externally, consider that is possible to have an increasing normalized -+ * variable debt that is not equivalent to how the variable debt index would be updated in storage -+ * (e.g. only updates with non-zero variable debt supply) - * @param asset The address of the underlying asset of the reserve - * @return The reserve normalized variable debt - */ -@@ -1414,8 +1618,25 @@ interface IPool { - * @notice Returns the state and configuration of the reserve - * @param asset The address of the underlying asset of the reserve - * @return The state and configuration data of the reserve -- **/ -- function getReserveData(address asset) external view returns (DataTypes.ReserveData memory); -+ */ -+ function getReserveData(address asset) external view returns (DataTypes.ReserveDataLegacy memory); -+ -+ /** -+ * @notice Returns the state and configuration of the reserve, including extra data included with Aave v3.1 -+ * @dev DEPRECATED use independent getters instead (getReserveData, getLiquidationGracePeriod) -+ * @param asset The address of the underlying asset of the reserve -+ * @return The state and configuration data of the reserve with virtual accounting -+ */ -+ function getReserveDataExtended( -+ address asset -+ ) external view returns (DataTypes.ReserveData memory); -+ -+ /** -+ * @notice Returns the virtual underlying balance of the reserve -+ * @param asset The address of the underlying asset of the reserve -+ * @return The reserve virtual underlying balance -+ */ -+ function getVirtualUnderlyingBalance(address asset) external view returns (uint128); - - /** - * @notice Validates and finalizes an aToken transfer -@@ -1440,20 +1661,27 @@ interface IPool { - * @notice Returns the list of the underlying assets of all the initialized reserves - * @dev It does not include dropped reserves - * @return The addresses of the underlying assets of the initialized reserves -- **/ -+ */ - function getReservesList() external view returns (address[] memory); - -+ /** -+ * @notice Returns the number of initialized reserves -+ * @dev It includes dropped reserves -+ * @return The count -+ */ -+ function getReservesCount() external view returns (uint256); -+ - /** - * @notice Returns the address of the underlying asset of a reserve by the reserve id as stored in the DataTypes.ReserveData struct - * @param id The id of the reserve as stored in the DataTypes.ReserveData struct - * @return The address of the reserve associated with id -- **/ -+ */ - function getReserveAddressById(uint16 id) external view returns (address); - - /** - * @notice Returns the PoolAddressesProvider connected to this contract - * @return The address of the PoolAddressesProvider -- **/ -+ */ - function ADDRESSES_PROVIDER() external view returns (IPoolAddressesProvider); - - /** -@@ -1478,20 +1706,70 @@ interface IPool { - ) external; - - /** -- * @notice Configures a new category for the eMode. -+ * @notice Configures a new or alters an existing collateral configuration of an eMode. - * @dev In eMode, the protocol allows very high borrowing power to borrow assets of the same category. - * The category 0 is reserved as it's the default for volatile assets - * @param id The id of the category - * @param config The configuration of the category - */ -- function configureEModeCategory(uint8 id, DataTypes.EModeCategory memory config) external; -+ function configureEModeCategory( -+ uint8 id, -+ DataTypes.EModeCategoryBaseConfiguration memory config -+ ) external; -+ -+ /** -+ * @notice Replaces the current eMode collateralBitmap. -+ * @param id The id of the category -+ * @param collateralBitmap The collateralBitmap of the category -+ */ -+ function configureEModeCategoryCollateralBitmap(uint8 id, uint128 collateralBitmap) external; -+ -+ /** -+ * @notice Replaces the current eMode borrowableBitmap. -+ * @param id The id of the category -+ * @param borrowableBitmap The borrowableBitmap of the category -+ */ -+ function configureEModeCategoryBorrowableBitmap(uint8 id, uint128 borrowableBitmap) external; - - /** - * @notice Returns the data of an eMode category -+ * @dev DEPRECATED use independent getters instead - * @param id The id of the category - * @return The configuration data of the category - */ -- function getEModeCategoryData(uint8 id) external view returns (DataTypes.EModeCategory memory); -+ function getEModeCategoryData( -+ uint8 id -+ ) external view returns (DataTypes.EModeCategoryLegacy memory); -+ -+ /** -+ * @notice Returns the label of an eMode category -+ * @param id The id of the category -+ * @return The label of the category -+ */ -+ function getEModeCategoryLabel(uint8 id) external view returns (string memory); -+ -+ /** -+ * @notice Returns the collateral config of an eMode category -+ * @param id The id of the category -+ * @return The ltv,lt,lb of the category -+ */ -+ function getEModeCategoryCollateralConfig( -+ uint8 id -+ ) external view returns (DataTypes.CollateralConfig memory); -+ -+ /** -+ * @notice Returns the collateralBitmap of an eMode category -+ * @param id The id of the category -+ * @return The collateralBitmap of the category -+ */ -+ function getEModeCategoryCollateralBitmap(uint8 id) external view returns (uint128); -+ -+ /** -+ * @notice Returns the borrowableBitmap of an eMode category -+ * @param id The id of the category -+ * @return The borrowableBitmap of the category -+ */ -+ function getEModeCategoryBorrowableBitmap(uint8 id) external view returns (uint128); - - /** - * @notice Allows a user to use the protocol in eMode -@@ -1514,10 +1792,20 @@ interface IPool { - function resetIsolationModeTotalDebt(address asset) external; - - /** -- * @notice Returns the percentage of available liquidity that can be borrowed at once at stable rate -- * @return The percentage of available liquidity to borrow, expressed in bps -- */ -- function MAX_STABLE_RATE_BORROW_SIZE_PERCENT() external view returns (uint256); -+ * @notice Sets the liquidation grace period of the given asset -+ * @dev To enable a liquidation grace period, a timestamp in the future should be set, -+ * To disable a liquidation grace period, any timestamp in the past works, like 0 -+ * @param asset The address of the underlying asset to set the liquidationGracePeriod -+ * @param until Timestamp when the liquidation grace period will end -+ **/ -+ function setLiquidationGracePeriod(address asset, uint40 until) external; -+ -+ /** -+ * @notice Returns the liquidation grace period of the given asset -+ * @param asset The address of the underlying asset -+ * @return Timestamp when the liquidation grace period will end -+ **/ -+ function getLiquidationGracePeriod(address asset) external returns (uint40); - - /** - * @notice Returns the total fee on flash loans -@@ -1546,7 +1834,7 @@ interface IPool { - /** - * @notice Mints the assets accrued through the reserve factor to the treasury in the form of aTokens - * @param assets The list of reserves for which the minting needs to be executed -- **/ -+ */ - function mintToTreasury(address[] calldata assets) external; - - /** -@@ -1568,11 +1856,46 @@ interface IPool { - * is a different wallet - * @param referralCode Code used to register the integrator originating the operation, for potential rewards. - * 0 if the action is executed directly by the user, without any middle-man -- **/ -+ */ - function deposit(address asset, uint256 amount, address onBehalfOf, uint16 referralCode) external; -+ -+ /** -+ * @notice Gets the address of the external FlashLoanLogic -+ */ -+ function getFlashLoanLogic() external view returns (address); -+ -+ /** -+ * @notice Gets the address of the external BorrowLogic -+ */ -+ function getBorrowLogic() external view returns (address); -+ -+ /** -+ * @notice Gets the address of the external BridgeLogic -+ */ -+ function getBridgeLogic() external view returns (address); -+ -+ /** -+ * @notice Gets the address of the external EModeLogic -+ */ -+ function getEModeLogic() external view returns (address); -+ -+ /** -+ * @notice Gets the address of the external LiquidationLogic -+ */ -+ function getLiquidationLogic() external view returns (address); -+ -+ /** -+ * @notice Gets the address of the external PoolLogic -+ */ -+ function getPoolLogic() external view returns (address); -+ -+ /** -+ * @notice Gets the address of the external SupplyLogic -+ */ -+ function getSupplyLogic() external view returns (address); - } - --// downloads/ARBITRUM/WALLET_BALANCE_PROVIDER/WalletBalanceProvider/@aave/core-v3/contracts/protocol/libraries/configuration/ReserveConfiguration.sol -+// downloads/LINEA/WALLET_BALANCE_PROVIDER/WalletBalanceProvider/src/contracts/protocol/libraries/configuration/ReserveConfiguration.sol - - /** - * @title ReserveConfiguration library -@@ -1587,17 +1910,19 @@ library ReserveConfiguration { - uint256 internal constant ACTIVE_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFF; // prettier-ignore - uint256 internal constant FROZEN_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFDFFFFFFFFFFFFFF; // prettier-ignore - uint256 internal constant BORROWING_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFBFFFFFFFFFFFFFF; // prettier-ignore -- uint256 internal constant STABLE_BORROWING_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFFFFFFFFF; // prettier-ignore -+ // @notice there is an unoccupied hole of 1 bit at position 59 from pre 3.2 stableBorrowRateEnabled - uint256 internal constant PAUSED_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFF; // prettier-ignore - uint256 internal constant BORROWABLE_IN_ISOLATION_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFDFFFFFFFFFFFFFFF; // prettier-ignore - uint256 internal constant SILOED_BORROWING_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFBFFFFFFFFFFFFFFF; // prettier-ignore -+ uint256 internal constant FLASHLOAN_ENABLED_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFFFFFFFFFF; // prettier-ignore - uint256 internal constant RESERVE_FACTOR_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000FFFFFFFFFFFFFFFF; // prettier-ignore - uint256 internal constant BORROW_CAP_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000FFFFFFFFFFFFFFFFFFFF; // prettier-ignore - uint256 internal constant SUPPLY_CAP_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFF000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFF; // prettier-ignore - uint256 internal constant LIQUIDATION_PROTOCOL_FEE_MASK = 0xFFFFFFFFFFFFFFFFFFFFFF0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF; // prettier-ignore -- uint256 internal constant EMODE_CATEGORY_MASK = 0xFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF; // prettier-ignore -+ // @notice there is an unoccupied hole of 8 bits from 168 to 176 left from pre 3.2 eModeCategory - uint256 internal constant UNBACKED_MINT_CAP_MASK = 0xFFFFFFFFFFF000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF; // prettier-ignore - uint256 internal constant DEBT_CEILING_MASK = 0xF0000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF; // prettier-ignore -+ uint256 internal constant VIRTUAL_ACC_ACTIVE_MASK = 0xEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF; // prettier-ignore - - /// @dev For the LTV, the start bit is 0 (up to 15), hence no bitshifting is needed - uint256 internal constant LIQUIDATION_THRESHOLD_START_BIT_POSITION = 16; -@@ -1606,19 +1931,18 @@ library ReserveConfiguration { - uint256 internal constant IS_ACTIVE_START_BIT_POSITION = 56; - uint256 internal constant IS_FROZEN_START_BIT_POSITION = 57; - uint256 internal constant BORROWING_ENABLED_START_BIT_POSITION = 58; -- uint256 internal constant STABLE_BORROWING_ENABLED_START_BIT_POSITION = 59; - uint256 internal constant IS_PAUSED_START_BIT_POSITION = 60; - uint256 internal constant BORROWABLE_IN_ISOLATION_START_BIT_POSITION = 61; - uint256 internal constant SILOED_BORROWING_START_BIT_POSITION = 62; -- /// @dev bit 63 reserved -- -+ uint256 internal constant FLASHLOAN_ENABLED_START_BIT_POSITION = 63; - uint256 internal constant RESERVE_FACTOR_START_BIT_POSITION = 64; - uint256 internal constant BORROW_CAP_START_BIT_POSITION = 80; - uint256 internal constant SUPPLY_CAP_START_BIT_POSITION = 116; - uint256 internal constant LIQUIDATION_PROTOCOL_FEE_START_BIT_POSITION = 152; -- uint256 internal constant EMODE_CATEGORY_START_BIT_POSITION = 168; -+ //@notice there is an unoccupied hole of 8 bits from 168 to 176 left from pre 3.2 eModeCategory - uint256 internal constant UNBACKED_MINT_CAP_START_BIT_POSITION = 176; - uint256 internal constant DEBT_CEILING_START_BIT_POSITION = 212; -+ uint256 internal constant VIRTUAL_ACC_START_BIT_POSITION = 252; - - uint256 internal constant MAX_VALID_LTV = 65535; - uint256 internal constant MAX_VALID_LIQUIDATION_THRESHOLD = 65535; -@@ -1628,7 +1952,6 @@ library ReserveConfiguration { - uint256 internal constant MAX_VALID_BORROW_CAP = 68719476735; - uint256 internal constant MAX_VALID_SUPPLY_CAP = 68719476735; - uint256 internal constant MAX_VALID_LIQUIDATION_PROTOCOL_FEE = 65535; -- uint256 internal constant MAX_VALID_EMODE_CATEGORY = 255; - uint256 internal constant MAX_VALID_UNBACKED_MINT_CAP = 68719476735; - uint256 internal constant MAX_VALID_DEBT_CEILING = 1099511627775; - -@@ -1639,7 +1962,7 @@ library ReserveConfiguration { - * @notice Sets the Loan to Value of the reserve - * @param self The reserve configuration - * @param ltv The new ltv -- **/ -+ */ - function setLtv(DataTypes.ReserveConfigurationMap memory self, uint256 ltv) internal pure { - require(ltv <= MAX_VALID_LTV, Errors.INVALID_LTV); - -@@ -1650,7 +1973,7 @@ library ReserveConfiguration { - * @notice Gets the Loan to Value of the reserve - * @param self The reserve configuration - * @return The loan to value -- **/ -+ */ - function getLtv(DataTypes.ReserveConfigurationMap memory self) internal pure returns (uint256) { - return self.data & ~LTV_MASK; - } -@@ -1659,7 +1982,7 @@ library ReserveConfiguration { - * @notice Sets the liquidation threshold of the reserve - * @param self The reserve configuration - * @param threshold The new liquidation threshold -- **/ -+ */ - function setLiquidationThreshold( - DataTypes.ReserveConfigurationMap memory self, - uint256 threshold -@@ -1675,7 +1998,7 @@ library ReserveConfiguration { - * @notice Gets the liquidation threshold of the reserve - * @param self The reserve configuration - * @return The liquidation threshold -- **/ -+ */ - function getLiquidationThreshold( - DataTypes.ReserveConfigurationMap memory self - ) internal pure returns (uint256) { -@@ -1686,7 +2009,7 @@ library ReserveConfiguration { - * @notice Sets the liquidation bonus of the reserve - * @param self The reserve configuration - * @param bonus The new liquidation bonus -- **/ -+ */ - function setLiquidationBonus( - DataTypes.ReserveConfigurationMap memory self, - uint256 bonus -@@ -1702,7 +2025,7 @@ library ReserveConfiguration { - * @notice Gets the liquidation bonus of the reserve - * @param self The reserve configuration - * @return The liquidation bonus -- **/ -+ */ - function getLiquidationBonus( - DataTypes.ReserveConfigurationMap memory self - ) internal pure returns (uint256) { -@@ -1713,7 +2036,7 @@ library ReserveConfiguration { - * @notice Sets the decimals of the underlying asset of the reserve - * @param self The reserve configuration - * @param decimals The decimals -- **/ -+ */ - function setDecimals( - DataTypes.ReserveConfigurationMap memory self, - uint256 decimals -@@ -1727,7 +2050,7 @@ library ReserveConfiguration { - * @notice Gets the decimals of the underlying asset of the reserve - * @param self The reserve configuration - * @return The decimals of the asset -- **/ -+ */ - function getDecimals( - DataTypes.ReserveConfigurationMap memory self - ) internal pure returns (uint256) { -@@ -1738,7 +2061,7 @@ library ReserveConfiguration { - * @notice Sets the active state of the reserve - * @param self The reserve configuration - * @param active The active state -- **/ -+ */ - function setActive(DataTypes.ReserveConfigurationMap memory self, bool active) internal pure { - self.data = - (self.data & ACTIVE_MASK) | -@@ -1749,7 +2072,7 @@ library ReserveConfiguration { - * @notice Gets the active state of the reserve - * @param self The reserve configuration - * @return The active state -- **/ -+ */ - function getActive(DataTypes.ReserveConfigurationMap memory self) internal pure returns (bool) { - return (self.data & ~ACTIVE_MASK) != 0; - } -@@ -1758,7 +2081,7 @@ library ReserveConfiguration { - * @notice Sets the frozen state of the reserve - * @param self The reserve configuration - * @param frozen The frozen state -- **/ -+ */ - function setFrozen(DataTypes.ReserveConfigurationMap memory self, bool frozen) internal pure { - self.data = - (self.data & FROZEN_MASK) | -@@ -1769,7 +2092,7 @@ library ReserveConfiguration { - * @notice Gets the frozen state of the reserve - * @param self The reserve configuration - * @return The frozen state -- **/ -+ */ - function getFrozen(DataTypes.ReserveConfigurationMap memory self) internal pure returns (bool) { - return (self.data & ~FROZEN_MASK) != 0; - } -@@ -1778,7 +2101,7 @@ library ReserveConfiguration { - * @notice Sets the paused state of the reserve - * @param self The reserve configuration - * @param paused The paused state -- **/ -+ */ - function setPaused(DataTypes.ReserveConfigurationMap memory self, bool paused) internal pure { - self.data = - (self.data & PAUSED_MASK) | -@@ -1789,7 +2112,7 @@ library ReserveConfiguration { - * @notice Gets the paused state of the reserve - * @param self The reserve configuration - * @return The paused state -- **/ -+ */ - function getPaused(DataTypes.ReserveConfigurationMap memory self) internal pure returns (bool) { - return (self.data & ~PAUSED_MASK) != 0; - } -@@ -1802,7 +2125,7 @@ library ReserveConfiguration { - * consistency in the debt ceiling calculations. - * @param self The reserve configuration - * @param borrowable True if the asset is borrowable -- **/ -+ */ - function setBorrowableInIsolation( - DataTypes.ReserveConfigurationMap memory self, - bool borrowable -@@ -1820,7 +2143,7 @@ library ReserveConfiguration { - * consistency in the debt ceiling calculations. - * @param self The reserve configuration - * @return The borrowable in isolation flag -- **/ -+ */ - function getBorrowableInIsolation( - DataTypes.ReserveConfigurationMap memory self - ) internal pure returns (bool) { -@@ -1832,7 +2155,7 @@ library ReserveConfiguration { - * @dev When this flag is set to true, users borrowing this asset will not be allowed to borrow any other asset. - * @param self The reserve configuration - * @param siloed True if the asset is siloed -- **/ -+ */ - function setSiloedBorrowing( - DataTypes.ReserveConfigurationMap memory self, - bool siloed -@@ -1847,7 +2170,7 @@ library ReserveConfiguration { - * @dev When this flag is set to true, users borrowing this asset will not be allowed to borrow any other asset. - * @param self The reserve configuration - * @return The siloed borrowing flag -- **/ -+ */ - function getSiloedBorrowing( - DataTypes.ReserveConfigurationMap memory self - ) internal pure returns (bool) { -@@ -1858,7 +2181,7 @@ library ReserveConfiguration { - * @notice Enables or disables borrowing on the reserve - * @param self The reserve configuration - * @param enabled True if the borrowing needs to be enabled, false otherwise -- **/ -+ */ - function setBorrowingEnabled( - DataTypes.ReserveConfigurationMap memory self, - bool enabled -@@ -1872,43 +2195,18 @@ library ReserveConfiguration { - * @notice Gets the borrowing state of the reserve - * @param self The reserve configuration - * @return The borrowing state -- **/ -+ */ - function getBorrowingEnabled( - DataTypes.ReserveConfigurationMap memory self - ) internal pure returns (bool) { - return (self.data & ~BORROWING_MASK) != 0; - } - -- /** -- * @notice Enables or disables stable rate borrowing on the reserve -- * @param self The reserve configuration -- * @param enabled True if the stable rate borrowing needs to be enabled, false otherwise -- **/ -- function setStableRateBorrowingEnabled( -- DataTypes.ReserveConfigurationMap memory self, -- bool enabled -- ) internal pure { -- self.data = -- (self.data & STABLE_BORROWING_MASK) | -- (uint256(enabled ? 1 : 0) << STABLE_BORROWING_ENABLED_START_BIT_POSITION); -- } -- -- /** -- * @notice Gets the stable rate borrowing state of the reserve -- * @param self The reserve configuration -- * @return The stable rate borrowing state -- **/ -- function getStableRateBorrowingEnabled( -- DataTypes.ReserveConfigurationMap memory self -- ) internal pure returns (bool) { -- return (self.data & ~STABLE_BORROWING_MASK) != 0; -- } -- - /** - * @notice Sets the reserve factor of the reserve - * @param self The reserve configuration - * @param reserveFactor The reserve factor -- **/ -+ */ - function setReserveFactor( - DataTypes.ReserveConfigurationMap memory self, - uint256 reserveFactor -@@ -1924,7 +2222,7 @@ library ReserveConfiguration { - * @notice Gets the reserve factor of the reserve - * @param self The reserve configuration - * @return The reserve factor -- **/ -+ */ - function getReserveFactor( - DataTypes.ReserveConfigurationMap memory self - ) internal pure returns (uint256) { -@@ -1935,7 +2233,7 @@ library ReserveConfiguration { - * @notice Sets the borrow cap of the reserve - * @param self The reserve configuration - * @param borrowCap The borrow cap -- **/ -+ */ - function setBorrowCap( - DataTypes.ReserveConfigurationMap memory self, - uint256 borrowCap -@@ -1949,7 +2247,7 @@ library ReserveConfiguration { - * @notice Gets the borrow cap of the reserve - * @param self The reserve configuration - * @return The borrow cap -- **/ -+ */ - function getBorrowCap( - DataTypes.ReserveConfigurationMap memory self - ) internal pure returns (uint256) { -@@ -1960,7 +2258,7 @@ library ReserveConfiguration { - * @notice Sets the supply cap of the reserve - * @param self The reserve configuration - * @param supplyCap The supply cap -- **/ -+ */ - function setSupplyCap( - DataTypes.ReserveConfigurationMap memory self, - uint256 supplyCap -@@ -1974,7 +2272,7 @@ library ReserveConfiguration { - * @notice Gets the supply cap of the reserve - * @param self The reserve configuration - * @return The supply cap -- **/ -+ */ - function getSupplyCap( - DataTypes.ReserveConfigurationMap memory self - ) internal pure returns (uint256) { -@@ -1985,7 +2283,7 @@ library ReserveConfiguration { - * @notice Sets the debt ceiling in isolation mode for the asset - * @param self The reserve configuration - * @param ceiling The maximum debt ceiling for the asset -- **/ -+ */ - function setDebtCeiling( - DataTypes.ReserveConfigurationMap memory self, - uint256 ceiling -@@ -1999,7 +2297,7 @@ library ReserveConfiguration { - * @notice Gets the debt ceiling for the asset if the asset is in isolation mode - * @param self The reserve configuration - * @return The debt ceiling (0 = isolation mode disabled) -- **/ -+ */ - function getDebtCeiling( - DataTypes.ReserveConfigurationMap memory self - ) internal pure returns (uint256) { -@@ -2010,7 +2308,7 @@ library ReserveConfiguration { - * @notice Sets the liquidation protocol fee of the reserve - * @param self The reserve configuration - * @param liquidationProtocolFee The liquidation protocol fee -- **/ -+ */ - function setLiquidationProtocolFee( - DataTypes.ReserveConfigurationMap memory self, - uint256 liquidationProtocolFee -@@ -2029,7 +2327,7 @@ library ReserveConfiguration { - * @dev Gets the liquidation protocol fee - * @param self The reserve configuration - * @return The liquidation protocol fee -- **/ -+ */ - function getLiquidationProtocolFee( - DataTypes.ReserveConfigurationMap memory self - ) internal pure returns (uint256) { -@@ -2041,7 +2339,7 @@ library ReserveConfiguration { - * @notice Sets the unbacked mint cap of the reserve - * @param self The reserve configuration - * @param unbackedMintCap The unbacked mint cap -- **/ -+ */ - function setUnbackedMintCap( - DataTypes.ReserveConfigurationMap memory self, - uint256 unbackedMintCap -@@ -2057,7 +2355,7 @@ library ReserveConfiguration { - * @dev Gets the unbacked mint cap of the reserve - * @param self The reserve configuration - * @return The unbacked mint cap -- **/ -+ */ - function getUnbackedMintCap( - DataTypes.ReserveConfigurationMap memory self - ) internal pure returns (uint256) { -@@ -2065,28 +2363,55 @@ library ReserveConfiguration { - } - - /** -- * @notice Sets the eMode asset category -+ * @notice Sets the flashloanable flag for the reserve - * @param self The reserve configuration -- * @param category The asset category when the user selects the eMode -- **/ -- function setEModeCategory( -+ * @param flashLoanEnabled True if the asset is flashloanable, false otherwise -+ */ -+ function setFlashLoanEnabled( - DataTypes.ReserveConfigurationMap memory self, -- uint256 category -+ bool flashLoanEnabled - ) internal pure { -- require(category <= MAX_VALID_EMODE_CATEGORY, Errors.INVALID_EMODE_CATEGORY); -+ self.data = -+ (self.data & FLASHLOAN_ENABLED_MASK) | -+ (uint256(flashLoanEnabled ? 1 : 0) << FLASHLOAN_ENABLED_START_BIT_POSITION); -+ } -+ -+ /** -+ * @notice Gets the flashloanable flag for the reserve -+ * @param self The reserve configuration -+ * @return The flashloanable flag -+ */ -+ function getFlashLoanEnabled( -+ DataTypes.ReserveConfigurationMap memory self -+ ) internal pure returns (bool) { -+ return (self.data & ~FLASHLOAN_ENABLED_MASK) != 0; -+ } - -- self.data = (self.data & EMODE_CATEGORY_MASK) | (category << EMODE_CATEGORY_START_BIT_POSITION); -+ /** -+ * @notice Sets the virtual account active/not state of the reserve -+ * @param self The reserve configuration -+ * @param active The active state -+ */ -+ function setVirtualAccActive( -+ DataTypes.ReserveConfigurationMap memory self, -+ bool active -+ ) internal pure { -+ self.data = -+ (self.data & VIRTUAL_ACC_ACTIVE_MASK) | -+ (uint256(active ? 1 : 0) << VIRTUAL_ACC_START_BIT_POSITION); - } - - /** -- * @dev Gets the eMode asset category -+ * @notice Gets the virtual account active/not state of the reserve -+ * @dev The state should be true for all normal assets and should be false -+ * only in special cases (ex. GHO) where an asset is minted instead of supplied. - * @param self The reserve configuration -- * @return The eMode category for the asset -- **/ -- function getEModeCategory( -+ * @return The active state -+ */ -+ function getIsVirtualAccActive( - DataTypes.ReserveConfigurationMap memory self -- ) internal pure returns (uint256) { -- return (self.data & ~EMODE_CATEGORY_MASK) >> EMODE_CATEGORY_START_BIT_POSITION; -+ ) internal pure returns (bool) { -+ return (self.data & ~VIRTUAL_ACC_ACTIVE_MASK) != 0; - } - - /** -@@ -2095,19 +2420,17 @@ library ReserveConfiguration { - * @return The state flag representing active - * @return The state flag representing frozen - * @return The state flag representing borrowing enabled -- * @return The state flag representing stableRateBorrowing enabled - * @return The state flag representing paused -- **/ -+ */ - function getFlags( - DataTypes.ReserveConfigurationMap memory self -- ) internal pure returns (bool, bool, bool, bool, bool) { -+ ) internal pure returns (bool, bool, bool, bool) { - uint256 dataLocal = self.data; - - return ( - (dataLocal & ~ACTIVE_MASK) != 0, - (dataLocal & ~FROZEN_MASK) != 0, - (dataLocal & ~BORROWING_MASK) != 0, -- (dataLocal & ~STABLE_BORROWING_MASK) != 0, - (dataLocal & ~PAUSED_MASK) != 0 - ); - } -@@ -2120,11 +2443,10 @@ library ReserveConfiguration { - * @return The state param representing liquidation bonus - * @return The state param representing reserve decimals - * @return The state param representing reserve factor -- * @return The state param representing eMode category -- **/ -+ */ - function getParams( - DataTypes.ReserveConfigurationMap memory self -- ) internal pure returns (uint256, uint256, uint256, uint256, uint256, uint256) { -+ ) internal pure returns (uint256, uint256, uint256, uint256, uint256) { - uint256 dataLocal = self.data; - - return ( -@@ -2132,8 +2454,7 @@ library ReserveConfiguration { - (dataLocal & ~LIQUIDATION_THRESHOLD_MASK) >> LIQUIDATION_THRESHOLD_START_BIT_POSITION, - (dataLocal & ~LIQUIDATION_BONUS_MASK) >> LIQUIDATION_BONUS_START_BIT_POSITION, - (dataLocal & ~DECIMALS_MASK) >> RESERVE_DECIMALS_START_BIT_POSITION, -- (dataLocal & ~RESERVE_FACTOR_MASK) >> RESERVE_FACTOR_START_BIT_POSITION, -- (dataLocal & ~EMODE_CATEGORY_MASK) >> EMODE_CATEGORY_START_BIT_POSITION -+ (dataLocal & ~RESERVE_FACTOR_MASK) >> RESERVE_FACTOR_START_BIT_POSITION - ); - } - -@@ -2142,7 +2463,7 @@ library ReserveConfiguration { - * @param self The reserve configuration - * @return The state param representing borrow cap - * @return The state param representing supply cap. -- **/ -+ */ - function getCaps( - DataTypes.ReserveConfigurationMap memory self - ) internal pure returns (uint256, uint256) { -@@ -2155,7 +2476,7 @@ library ReserveConfiguration { - } - } - + -// downloads/ARBITRUM/WALLET_BALANCE_PROVIDER/WalletBalanceProvider/@aave/periphery-v3/contracts/misc/WalletBalanceProvider.sol +// downloads/LINEA/WALLET_BALANCE_PROVIDER/WalletBalanceProvider/src/contracts/helpers/WalletBalanceProvider.sol - + /** * @title WalletBalanceProvider contract @@ -2240,7 +2561,7 @@ contract WalletBalanceProvider { reservesWithEth[j] ); - + - (bool isActive, , , , ) = configuration.getFlags(); + (bool isActive, , , ) = configuration.getFlags(); - + if (!isActive) { balances[j] = 0; ``` diff --git a/diffs/ARBITRUM_LINEA/WETH_GATEWAY_DIFF.md b/diffs/ARBITRUM_LINEA/WETH_GATEWAY_DIFF.md index 5c0c8010..3eeed023 100644 --- a/diffs/ARBITRUM_LINEA/WETH_GATEWAY_DIFF.md +++ b/diffs/ARBITRUM_LINEA/WETH_GATEWAY_DIFF.md @@ -3,157 +3,5 @@ diff --git a/./downloads/ARBITRUM/WETH_GATEWAY.sol b/./downloads/LINEA/WETH_GATE index 5984e04..cba4608 100644 --- a/./downloads/ARBITRUM/WETH_GATEWAY.sol +++ b/./downloads/LINEA/WETH_GATEWAY.sol -@@ -1,7 +1,7 @@ - // SPDX-License-Identifier: BUSL-1.1 - pragma solidity ^0.8.0 ^0.8.10; - --// downloads/ARBITRUM/WETH_GATEWAY/WrappedTokenGatewayV3/lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/dependencies/openzeppelin/contracts/Context.sol -+// downloads/LINEA/WETH_GATEWAY/WrappedTokenGatewayV3/src/contracts/dependencies/openzeppelin/contracts/Context.sol - - /* - * @dev Provides information about the current execution context, including the -@@ -24,7 +24,7 @@ abstract contract Context { - } - } - --// downloads/ARBITRUM/WETH_GATEWAY/WrappedTokenGatewayV3/lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/dependencies/openzeppelin/contracts/IERC20.sol -+// downloads/LINEA/WETH_GATEWAY/WrappedTokenGatewayV3/src/contracts/dependencies/openzeppelin/contracts/IERC20.sol - - /** - * @dev Interface of the ERC20 standard as defined in the EIP. -@@ -100,7 +100,7 @@ interface IERC20 { - event Approval(address indexed owner, address indexed spender, uint256 value); - } - --// downloads/ARBITRUM/WETH_GATEWAY/WrappedTokenGatewayV3/lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/helpers/interfaces/IWETH.sol -+// downloads/LINEA/WETH_GATEWAY/WrappedTokenGatewayV3/src/contracts/helpers/interfaces/IWETH.sol - - interface IWETH { - function deposit() external payable; -@@ -112,7 +112,7 @@ interface IWETH { - function transferFrom(address src, address dst, uint256 wad) external returns (bool); - } - --// downloads/ARBITRUM/WETH_GATEWAY/WrappedTokenGatewayV3/lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/helpers/interfaces/IWrappedTokenGatewayV3.sol -+// downloads/LINEA/WETH_GATEWAY/WrappedTokenGatewayV3/src/contracts/helpers/interfaces/IWrappedTokenGatewayV3.sol - - interface IWrappedTokenGatewayV3 { - function depositETH(address pool, address onBehalfOf, uint16 referralCode) external payable; -@@ -134,7 +134,7 @@ interface IWrappedTokenGatewayV3 { - ) external; - } - --// downloads/ARBITRUM/WETH_GATEWAY/WrappedTokenGatewayV3/lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/interfaces/IAaveIncentivesController.sol -+// downloads/LINEA/WETH_GATEWAY/WrappedTokenGatewayV3/src/contracts/interfaces/IAaveIncentivesController.sol - - /** - * @title IAaveIncentivesController -@@ -153,7 +153,7 @@ interface IAaveIncentivesController { - function handleAction(address user, uint256 totalSupply, uint256 userBalance) external; - } - --// downloads/ARBITRUM/WETH_GATEWAY/WrappedTokenGatewayV3/lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/interfaces/IPoolAddressesProvider.sol -+// downloads/LINEA/WETH_GATEWAY/WrappedTokenGatewayV3/src/contracts/interfaces/IPoolAddressesProvider.sol - - /** - * @title IPoolAddressesProvider -@@ -380,7 +380,7 @@ interface IPoolAddressesProvider { - function setPoolDataProvider(address newDataProvider) external; - } - --// downloads/ARBITRUM/WETH_GATEWAY/WrappedTokenGatewayV3/lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/interfaces/IScaledBalanceToken.sol -+// downloads/LINEA/WETH_GATEWAY/WrappedTokenGatewayV3/src/contracts/interfaces/IScaledBalanceToken.sol - - /** - * @title IScaledBalanceToken -@@ -452,7 +452,7 @@ interface IScaledBalanceToken { - function getPreviousIndex(address user) external view returns (uint256); - } - --// downloads/ARBITRUM/WETH_GATEWAY/WrappedTokenGatewayV3/lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/protocol/libraries/helpers/Errors.sol -+// downloads/LINEA/WETH_GATEWAY/WrappedTokenGatewayV3/src/contracts/protocol/libraries/helpers/Errors.sol - - /** - * @title Errors library -@@ -555,7 +555,7 @@ library Errors { - string public constant NOT_BORROWABLE_IN_EMODE = '100'; // Asset not borrowable in eMode - } - --// downloads/ARBITRUM/WETH_GATEWAY/WrappedTokenGatewayV3/lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/protocol/libraries/types/DataTypes.sol -+// downloads/LINEA/WETH_GATEWAY/WrappedTokenGatewayV3/src/contracts/protocol/libraries/types/DataTypes.sol - - library DataTypes { - /** -@@ -879,7 +879,7 @@ library DataTypes { - } - } - --// downloads/ARBITRUM/WETH_GATEWAY/WrappedTokenGatewayV3/lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/dependencies/gnosis/contracts/GPv2SafeERC20.sol -+// downloads/LINEA/WETH_GATEWAY/WrappedTokenGatewayV3/src/contracts/dependencies/gnosis/contracts/GPv2SafeERC20.sol - - /// @title Gnosis Protocol v2 Safe ERC20 Transfer Library - /// @author Gnosis Developers -@@ -992,7 +992,7 @@ library GPv2SafeERC20 { - } - } - --// downloads/ARBITRUM/WETH_GATEWAY/WrappedTokenGatewayV3/lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/dependencies/openzeppelin/contracts/Ownable.sol -+// downloads/LINEA/WETH_GATEWAY/WrappedTokenGatewayV3/src/contracts/dependencies/openzeppelin/contracts/Ownable.sol - - /** - * @dev Contract module which provides a basic access control mechanism, where -@@ -1058,7 +1058,7 @@ contract Ownable is Context { - } - } - --// downloads/ARBITRUM/WETH_GATEWAY/WrappedTokenGatewayV3/lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/interfaces/IPool.sol -+// downloads/LINEA/WETH_GATEWAY/WrappedTokenGatewayV3/src/contracts/interfaces/IPool.sol - - /** - * @title IPool -@@ -1889,7 +1889,7 @@ interface IPool { - function getSupplyLogic() external view returns (address); - } - --// downloads/ARBITRUM/WETH_GATEWAY/WrappedTokenGatewayV3/lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/protocol/libraries/configuration/ReserveConfiguration.sol -+// downloads/LINEA/WETH_GATEWAY/WrappedTokenGatewayV3/src/contracts/protocol/libraries/configuration/ReserveConfiguration.sol - - /** - * @title ReserveConfiguration library -@@ -2470,7 +2470,7 @@ library ReserveConfiguration { - } - } - --// downloads/ARBITRUM/WETH_GATEWAY/WrappedTokenGatewayV3/lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/protocol/libraries/configuration/UserConfiguration.sol -+// downloads/LINEA/WETH_GATEWAY/WrappedTokenGatewayV3/src/contracts/protocol/libraries/configuration/UserConfiguration.sol - - /** - * @title UserConfiguration library -@@ -2702,7 +2702,7 @@ library UserConfiguration { - } - } - --// downloads/ARBITRUM/WETH_GATEWAY/WrappedTokenGatewayV3/lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/interfaces/IInitializableAToken.sol -+// downloads/LINEA/WETH_GATEWAY/WrappedTokenGatewayV3/src/contracts/interfaces/IInitializableAToken.sol - - /** - * @title IInitializableAToken -@@ -2755,7 +2755,7 @@ interface IInitializableAToken { - ) external; - } - --// downloads/ARBITRUM/WETH_GATEWAY/WrappedTokenGatewayV3/lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/interfaces/IAToken.sol -+// downloads/LINEA/WETH_GATEWAY/WrappedTokenGatewayV3/src/contracts/interfaces/IAToken.sol - - /** - * @title IAToken -@@ -2889,7 +2889,7 @@ interface IAToken is IERC20, IScaledBalanceToken, IInitializableAToken { - function rescueTokens(address token, address to, uint256 amount) external; - } - --// downloads/ARBITRUM/WETH_GATEWAY/WrappedTokenGatewayV3/lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/contracts/helpers/WrappedTokenGatewayV3.sol -+// downloads/LINEA/WETH_GATEWAY/WrappedTokenGatewayV3/src/contracts/helpers/WrappedTokenGatewayV3.sol - - /** - * @dev This contract is an upgrade of the WrappedTokenGatewayV3 contract, with immutable pool address. + ```