mirror of
https://github.com/Instadapp/aave-protocol-v2.git
synced 2024-07-29 21:47:30 +00:00
- Unexcluded types/ on contracts libraries
This commit is contained in:
parent
5532ebdc8a
commit
093e692573
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -7,7 +7,7 @@ dist/
|
|||
build/
|
||||
.vscode
|
||||
.idea
|
||||
types
|
||||
/types
|
||||
|
||||
deployed-contracts.json
|
||||
|
||||
|
|
49
contracts/protocol/libraries/types/DataTypes.sol
Normal file
49
contracts/protocol/libraries/types/DataTypes.sol
Normal file
|
@ -0,0 +1,49 @@
|
|||
// SPDX-License-Identifier: agpl-3.0
|
||||
pragma solidity 0.6.12;
|
||||
|
||||
library DataTypes {
|
||||
// refer to the whitepaper, section 1.1 basic concepts for a formal description of these properties.
|
||||
struct ReserveData {
|
||||
//stores the reserve configuration
|
||||
ReserveBitmap configuration;
|
||||
//the liquidity index. Expressed in ray
|
||||
uint128 liquidityIndex;
|
||||
//variable borrow index. Expressed in ray
|
||||
uint128 variableBorrowIndex;
|
||||
//the current supply rate. Expressed in ray
|
||||
uint128 currentLiquidityRate;
|
||||
//the current variable borrow rate. Expressed in ray
|
||||
uint128 currentVariableBorrowRate;
|
||||
//the current stable borrow rate. Expressed in ray
|
||||
uint128 currentStableBorrowRate;
|
||||
uint40 lastUpdateTimestamp;
|
||||
//tokens addresses
|
||||
address aTokenAddress;
|
||||
address stableDebtTokenAddress;
|
||||
address variableDebtTokenAddress;
|
||||
//address of the interest rate strategy
|
||||
address interestRateStrategyAddress;
|
||||
//the id of the reserve. Represents the position in the list of the active reserves
|
||||
uint8 id;
|
||||
}
|
||||
|
||||
struct ReserveBitmap {
|
||||
//bit 0-15: LTV
|
||||
//bit 16-31: Liq. threshold
|
||||
//bit 32-47: Liq. bonus
|
||||
//bit 48-55: Decimals
|
||||
//bit 56: Reserve is active
|
||||
//bit 57: reserve is frozen
|
||||
//bit 58: borrowing is enabled
|
||||
//bit 59: stable rate borrowing enabled
|
||||
//bit 60-63: reserved
|
||||
//bit 64-79: reserve factor
|
||||
uint256 data;
|
||||
}
|
||||
|
||||
struct UserBitmap {
|
||||
uint256 data;
|
||||
}
|
||||
|
||||
enum InterestRateMode {NONE, STABLE, VARIABLE}
|
||||
}
|
Loading…
Reference in New Issue
Block a user