Config
INIT Configuration contract.
View Functions
whitelistedWLps
Get whether the wrapped LP contract address is supported.
getModeConfig
Get mode's configuration.
If the mode does not exist, then the return values will be Solidity's default values (0 values).
Parameters:
Name | Type | Description |
---|---|---|
|
| mode to get config |
Returns:
Name | Type | Description |
---|---|---|
|
| supported collateral tokens in the mode |
|
| supported borrow tokens in the mode |
|
| max health after liquidation allowed in the mode |
|
| max wLp collateral count allowed in the mode |
getPoolConfig
Get lending pool's configuration.
If the lending pool does not exist, then the return values will be Solidity's default values (0 values).
Parameters:
Name | Type | Description |
---|---|---|
|
| lending pool address to get configuration |
Returns:
Name | Type | Description |
---|---|---|
|
| pool configuration, containing: - supply cap - borrow cap - can mint flag - can burn flag - can borrow flag - can repay flag - can flash flag |
isAllowedForBorrow
Get whether the lending pool is allowed to borrow in the specified mode.
Parameters:
Name | Type | Description |
---|---|---|
|
| mode to check |
|
| lending pool address to check |
Returns:
Name | Type | Description |
---|---|---|
|
| boolean flag whether the lending pool is allowed for borrow in the mode |
isAllowedForCollateral
Get whether the lending pool is allowed for collateral in the specified mode.
Parameters:
Name | Type | Description |
---|---|---|
|
| mode to check |
|
| lending pool address to check |
Returns:
Name | Type | Description |
---|---|---|
|
| boolean flag whether the lending pool is allowed for collateral in the mode |
getTokenFactors
Get token factors for the specified mode and lending pool.
If the mode does not exist, then the return values will be Solidity's default values (0 values).
Parameters:
Name | Type | Description |
---|---|---|
|
| mode to get token factors |
|
| lending pool address to get token factors |
Returns:
Name | Type | Description |
---|---|---|
|
| token factors including: - collFactor_e18 - borrFactor_e18 |
getMaxHealthAfterLiq_e18
Get mode's max health allowed after liquidation with 10^18
precision.
If the mode does not exist, then the return values will be Solidity's default values (0 values).
Parameters:
Name | Type | Description |
---|---|---|
|
| mode to get max health after liquidation |
Returns:
Name | Type | Description |
---|---|---|
|
| mode's max health allowed after liquidation with |
getModeStatus
Get the mode's status.
If the mode does not exist, then the return values will be Solidity's default values (0 values).
Parameters:
Name | Type | Description |
---|---|---|
|
| mode to get status |
Returns:
Name | Type | Description |
---|---|---|
|
| mode status including: - can collateralize flag - can decollateralize flag - can borrow flag - can repay flag |
getModeMaxCollWLpCount
Get a mode's max collateral wrapped LP count
Parameters:
Name | Type | Description |
---|---|---|
|
| mode to get max collateral wrapped LP count |
Returns:
Name | Type | Description |
---|---|---|
|
| max collateral wrapped LP count |
Last updated