mirror of
				https://github.com/Instadapp/aave-protocol-v2.git
				synced 2024-07-29 21:47:30 +00:00 
			
		
		
		
	Changed freezed to frozen
This commit is contained in:
		
							parent
							
								
									f188fd5c8f
								
							
						
					
					
						commit
						05d426645d
					
				|  | @ -100,16 +100,16 @@ contract LendingPoolConfigurator is VersionedInitializable { | |||
|   event ReserveDeactivated(address indexed asset); | ||||
| 
 | ||||
|   /** | ||||
|    * @dev emitted when a reserve is freezed | ||||
|    * @dev emitted when a reserve is frozen | ||||
|    * @param asset the address of the reserve | ||||
|    **/ | ||||
|   event ReserveFreezed(address indexed asset); | ||||
|   event ReserveFrozen(address indexed asset); | ||||
| 
 | ||||
|   /** | ||||
|    * @dev emitted when a reserve is unfreezed | ||||
|    * @dev emitted when a reserve is unfrozen | ||||
|    * @param asset the address of the reserve | ||||
|    **/ | ||||
|   event ReserveUnfreezed(address indexed asset); | ||||
|   event ReserveUnfrozen(address indexed asset); | ||||
| 
 | ||||
|   /** | ||||
|    * @dev emitted when a reserve loan to value is updated | ||||
|  | @ -462,7 +462,7 @@ contract LendingPoolConfigurator is VersionedInitializable { | |||
|   } | ||||
| 
 | ||||
|   /** | ||||
|    * @dev freezes a reserve. A freezed reserve doesn't accept any new deposit, borrow or rate swap, but can accept repayments, liquidations, rate rebalances and redeems | ||||
|    * @dev freezes a reserve. A frozen reserve doesn't accept any new deposit, borrow or rate swap, but can accept repayments, liquidations, rate rebalances and redeems | ||||
|    * @param asset the address of the reserve | ||||
|    **/ | ||||
|   function freezeReserve(address asset) external onlyAaveAdmin { | ||||
|  | @ -472,7 +472,7 @@ contract LendingPoolConfigurator is VersionedInitializable { | |||
| 
 | ||||
|     pool.setConfiguration(asset, currentConfig.data); | ||||
| 
 | ||||
|     emit ReserveFreezed(asset); | ||||
|     emit ReserveFrozen(asset); | ||||
|   } | ||||
| 
 | ||||
|   /** | ||||
|  | @ -486,7 +486,7 @@ contract LendingPoolConfigurator is VersionedInitializable { | |||
| 
 | ||||
|     pool.setConfiguration(asset, currentConfig.data); | ||||
| 
 | ||||
|     emit ReserveUnfreezed(asset); | ||||
|     emit ReserveUnfrozen(asset); | ||||
|   } | ||||
| 
 | ||||
|   /** | ||||
|  |  | |||
|  | @ -259,7 +259,7 @@ library ReserveConfiguration { | |||
|   /** | ||||
|    * @dev gets the configuration flags of the reserve | ||||
|    * @param self the reserve configuration | ||||
|    * @return the state flags representing active, freezed, borrowing enabled, stableRateBorrowing enabled | ||||
|    * @return the state flags representing active, frozen, borrowing enabled, stableRateBorrowing enabled | ||||
|    **/ | ||||
|   function getFlags(ReserveConfiguration.Map storage self) | ||||
|     internal | ||||
|  | @ -336,7 +336,7 @@ library ReserveConfiguration { | |||
|   /** | ||||
|    * @dev gets the configuration flags of the reserve from a memory object | ||||
|    * @param self the reserve configuration | ||||
|    * @return the state flags representing active, freezed, borrowing enabled, stableRateBorrowing enabled | ||||
|    * @return the state flags representing active, frozen, borrowing enabled, stableRateBorrowing enabled | ||||
|    **/ | ||||
|   function getFlagsMemory(ReserveConfiguration.Map memory self) | ||||
|     internal | ||||
|  |  | |||
|  | @ -19,7 +19,7 @@ pragma solidity ^0.6.8; | |||
| library Errors { | ||||
|   string public constant VL_AMOUNT_NOT_GREATER_THAN_0 = '1'; // 'Amount must be greater than 0' | ||||
|   string public constant VL_NO_ACTIVE_RESERVE = '2'; // 'Action requires an active reserve' | ||||
|   string public constant VL_NO_UNFREEZED_RESERVE = '3'; // 'Action requires an unfreezed reserve' | ||||
|   string public constant VL_RESERVE_FROZEN = '3'; // 'Action cannot be performed because the reserve is frozen' | ||||
|   string public constant VL_CURRENT_AVAILABLE_LIQUIDITY_NOT_ENOUGH = '4'; // 'The current liquidity is not enough' | ||||
|   string public constant VL_NOT_ENOUGH_AVAILABLE_USER_BALANCE = '5'; // 'User cannot withdraw more than the available balance' | ||||
|   string public constant VL_TRANSFER_NOT_ALLOWED = '6'; // 'Transfer cannot be allowed.' | ||||
|  | @ -102,6 +102,6 @@ library Errors { | |||
|     NO_ACTIVE_RESERVE, | ||||
|     HEALTH_FACTOR_LOWER_THAN_LIQUIDATION_THRESHOLD, | ||||
|     INVALID_EQUAL_ASSETS_TO_SWAP, | ||||
|     NO_UNFREEZED_RESERVE | ||||
|     FROZEN_RESERVE | ||||
|   } | ||||
| } | ||||
|  |  | |||
|  | @ -34,11 +34,11 @@ library ValidationLogic { | |||
|    * @param amount the amount to be deposited | ||||
|    */ | ||||
|   function validateDeposit(ReserveLogic.ReserveData storage reserve, uint256 amount) external view { | ||||
|     (bool isActive, bool isFreezed, , ) = reserve.configuration.getFlags(); | ||||
|     (bool isActive, bool isFrozen, , ) = reserve.configuration.getFlags(); | ||||
| 
 | ||||
|     require(amount > 0, Errors.VL_AMOUNT_NOT_GREATER_THAN_0); | ||||
|     require(isActive, Errors.VL_NO_ACTIVE_RESERVE); | ||||
|     require(!isFreezed, Errors.VL_NO_UNFREEZED_RESERVE); | ||||
|     require(!isFrozen, Errors.VL_RESERVE_FROZEN); | ||||
|   } | ||||
| 
 | ||||
|   /** | ||||
|  | @ -97,7 +97,7 @@ library ValidationLogic { | |||
|     ReserveLogic.InterestRateMode rateMode; | ||||
|     bool healthFactorBelowThreshold; | ||||
|     bool isActive; | ||||
|     bool isFreezed; | ||||
|     bool isFrozen; | ||||
|     bool borrowingEnabled; | ||||
|     bool stableRateBorrowingEnabled; | ||||
|   } | ||||
|  | @ -133,15 +133,12 @@ library ValidationLogic { | |||
|   ) external view { | ||||
|     ValidateBorrowLocalVars memory vars; | ||||
| 
 | ||||
|     ( | ||||
|       vars.isActive, | ||||
|       vars.isFreezed, | ||||
|       vars.borrowingEnabled, | ||||
|       vars.stableRateBorrowingEnabled | ||||
|     ) = reserve.configuration.getFlags(); | ||||
|     (vars.isActive, vars.isFrozen, vars.borrowingEnabled, vars.stableRateBorrowingEnabled) = reserve | ||||
|       .configuration | ||||
|       .getFlags(); | ||||
| 
 | ||||
|     require(vars.isActive, Errors.VL_NO_ACTIVE_RESERVE); | ||||
|     require(!vars.isFreezed, Errors.VL_NO_UNFREEZED_RESERVE); | ||||
|     require(!vars.isFrozen, Errors.VL_RESERVE_FROZEN); | ||||
| 
 | ||||
|     require(vars.borrowingEnabled, Errors.VL_BORROWING_NOT_ENABLED); | ||||
| 
 | ||||
|  | @ -266,10 +263,10 @@ library ValidationLogic { | |||
|     uint256 variableDebt, | ||||
|     ReserveLogic.InterestRateMode currentRateMode | ||||
|   ) external view { | ||||
|     (bool isActive, bool isFreezed, , bool stableRateEnabled) = reserve.configuration.getFlags(); | ||||
|     (bool isActive, bool isFrozen, , bool stableRateEnabled) = reserve.configuration.getFlags(); | ||||
| 
 | ||||
|     require(isActive, Errors.VL_NO_ACTIVE_RESERVE); | ||||
|     require(!isFreezed, Errors.VL_NO_UNFREEZED_RESERVE); | ||||
|     require(!isFrozen, Errors.VL_RESERVE_FROZEN); | ||||
| 
 | ||||
|     if (currentRateMode == ReserveLogic.InterestRateMode.STABLE) { | ||||
|       require(stableDebt > 0, Errors.VL_NO_STABLE_RATE_LOAN_IN_RESERVE); | ||||
|  |  | |||
|  | @ -74,7 +74,7 @@ export enum eContractid { | |||
| export enum ProtocolErrors { | ||||
|   VL_AMOUNT_NOT_GREATER_THAN_0 = '1', // 'Amount must be greater than 0'
 | ||||
|   VL_NO_ACTIVE_RESERVE = '2', // 'Action requires an active reserve'
 | ||||
|   VL_NO_UNFREEZED_RESERVE = '3', // 'Action requires an unfreezed reserve'
 | ||||
|   VL_RESERVE_FROZEN = '3', // 'Action requires an unfrozen reserve'
 | ||||
|   VL_CURRENT_AVAILABLE_LIQUIDITY_NOT_ENOUGH = '4', // 'The current liquidity is not enough'
 | ||||
|   VL_NOT_ENOUGH_AVAILABLE_USER_BALANCE = '5', // 'User cannot withdraw more than the available balance'
 | ||||
|   VL_TRANSFER_NOT_ALLOWED = '6', // 'Transfer cannot be allowed.'
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 emilio
						emilio