Provides views into accounts and positions.
error ZeroAddress()Reverts if zero addrss provided
struct AccountSummary {
uint256 netValue;
uint256 suppliedValue;
uint256 borrowedValue;
uint256 lockedValue;
}Contains info about a position.
struct Position {
address account;
address pool;
address asset;
uint8 decimals;
uint256 supplied;
uint256 borrowed;
uint256 suppliedValue;
uint256 borrowedValue;
uint256 collateralValue;
uint256 healthFactor;
uint256 staked;
uint256 locked;
uint256 stakeRewardsClaimable;
uint256 lockRewardsClaimable;
uint256 exposure;
}contract IAddressRegistry registryChedda address registry
constructor(address _registry) publicConstructor
| Name | Type | Description |
|---|---|---|
| _registry | address | The address registry address. |
function accountSummary(address account) external view returns (struct AccountActor.AccountSummary)Returns the account status summed up.
| Name | Type | Description |
|---|---|---|
| account | address | The account to return stats for. |
| Name | Type | Description |
|---|---|---|
| [0] | struct AccountActor.AccountSummary | the AccountSummary object containing account stats. |
struct AccountPoolSummary {
uint256 supplied;
uint256 borrowed;
uint256 locked;
}function allPositions(address account, bool showActiveOnly) external view returns (struct AccountActor.Position[])Returns an array containing tha accounts positions.
| Name | Type | Description |
|---|---|---|
| account | address | The account to check |
| showActiveOnly | bool | If true only return positions in active pools, else return positions in all registered pools. |
| Name | Type | Description |
|---|---|---|
| [0] | struct AccountActor.Position[] | Array of accounts positions |
function getPosition(address account, address poolAddress) public view returns (struct AccountActor.Position)Gets an account position in a lending pool.
| Name | Type | Description |
|---|---|---|
| account | address | The account to retrive the position for |
| poolAddress | address | The pool address |
| Name | Type | Description |
|---|---|---|
| [0] | struct AccountActor.Position | The Position holding the values for the account position. If account does not have a position in this pool the numerical values are all zero. |