Implements the bitmap logic to handle the user configuration
Sets if the user is borrowing the reserve identified by reserveIndex
Name | Type | Description |
---|---|---|
Sets if the user is using as collateral the reserve identified by reserveIndex
Returns if a user has been using the reserve for borrowing or as collateral
Validate a user has been using the reserve for borrowing
Validate a user has been using the reserve as collateral
Checks if a user has been supplying only one reserve as collateral
this uses a simple trick - if a number is a power of two (only one bit set) then n & (n - 1) == 0
Checks if a user has been supplying any reserve as collateral
Checks if a user has been borrowing only one asset
this uses a simple trick - if a number is a power of two (only one bit set) then n & (n - 1) == 0
Checks if a user has been borrowing from any reserve
Checks if a user has not been using any reserve for borrowing or supply
Returns the siloed borrowing state for the user
Returns the address of the first asset flagged in the bitmap given the corresponding bitmask
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
self
struct DataTypes.UserConfigurationMap
The configuration object
reserveIndex
uint256
The index of the reserve in the bitmap
borrowing
bool
True if the user is borrowing the reserve, false otherwise
self
struct DataTypes.UserConfigurationMap
The configuration object
reserveIndex
uint256
The index of the reserve in the bitmap
usingAsCollateral
bool
True if the user is using the reserve as collateral, false otherwise
self
struct DataTypes.UserConfigurationMap
The configuration object
reserveIndex
uint256
The index of the reserve in the bitmap
[0]
bool
True if the user has been using a reserve for borrowing or as collateral, false otherwise
self
struct DataTypes.UserConfigurationMap
The configuration object
reserveIndex
uint256
The index of the reserve in the bitmap
[0]
bool
True if the user has been using a reserve for borrowing, false otherwise
self
struct DataTypes.UserConfigurationMap
The configuration object
reserveIndex
uint256
The index of the reserve in the bitmap
[0]
bool
True if the user has been using a reserve as collateral, false otherwise
self
struct DataTypes.UserConfigurationMap
The configuration object
[0]
bool
True if the user has been supplying as collateral one reserve, false otherwise
self
struct DataTypes.UserConfigurationMap
The configuration object
[0]
bool
True if the user has been supplying as collateral any reserve, false otherwise
self
struct DataTypes.UserConfigurationMap
The configuration object
[0]
bool
True if the user has been supplying as collateral one reserve, false otherwise
self
struct DataTypes.UserConfigurationMap
The configuration object
[0]
bool
True if the user has been borrowing any reserve, false otherwise
self
struct DataTypes.UserConfigurationMap
The configuration object
[0]
bool
True if the user has not been borrowing or supplying any reserve, false otherwise
self
struct DataTypes.UserConfigurationMap
The configuration object
reservesData
mapping(address => struct DataTypes.ReserveData)
The data of all the reserves
reservesList
mapping(uint256 => address)
The reserve list
[0]
bool
True if the user has borrowed a siloed asset, false otherwise
[1]
address
The address of the only borrowed asset
self
struct DataTypes.UserConfigurationMap
The configuration object
mask
uint256
[0]
uint256
The index of the first asset flagged in the bitmap once the corresponding mask is applied