InceptionVaultsDataProvider
This contract handles individual vaults state, base debt and vault related read functions.
Each user inception vault state is store in a
InceptionVault
struct : Param Name | Type | Description |
---|---|---|
owner | address | Vault owner |
collateralBalance | uint256 | Vault collateral balance |
baseDebt | uint256 | Vault base debt (not including interests) |
createdAt | uint256 | Vault creation timestamp |
Initializer function to set state variables upon cloning.
Requirements :
- Can only be called once
Param Name | Type | Description |
---|---|---|
inceptionVaultsCore | IInceptionVaultsCore | InceptionVaultsCore address |
addressProvider | IAddressProvider | AddressProvider address |
Opens a new vault.
Requirements :
- Can only be called by
InceptionVaultsCore
Param Name | Type | Description |
---|---|---|
_owner | address | Owner of the new vault. |
Sets the collateral balance of a vault.
Requirements :
- Can only be called by
InceptionVaultsCore
Param Name | Type | Description |
---|---|---|
_vaultId | uint256 | Vault id of which the collateral balance will be updated |
_balance | uint256 | New vault balance |
Sets the base debt of a vault.
Requirements :
- Can only be called by
InceptionVaultsCore
Param Name | Type | Description |
---|---|---|
_vaultId | uint256 | Vault ID of which the base debt will be updated |
_newBaseDebt | uint256 | New vault base debt |
Returns the
AddressProvider
address.Returns the
InceptionVaultsCore
address.Returns the number of opened inception vaults.
Returns the total base debt.
Returns the owner of a specific vault.
Call Params
Name | Type | Description |
---|---|---|
_id | uint256 | The ID of the vault |
Return Value
Name | Type | Description |
---|---|---|
NA | address | Vault owner |
Returns the collateral balance of a specific vault.
Call Params
Name | Type | Description |
---|---|---|
_id | uint256 | The ID of the vault |
Return Value
Name | Type | Description |
---|---|---|
NA | uint256 | Vault collateral balance |
Returns the base debt of a specific vault.
Call Params
Name | Type | Description |
---|---|---|
_id | uint256 | The ID of the vault |
Return Value
Name | Type | Description |
---|---|---|
NA | uint256 | Vault base debt |
Retrieves the vault id for a specified owner.
Call Params
Name | Type | Description |
---|---|---|
_owner | address | Address of the owner of the vault |
Return Value
Name | Type | Description |
---|---|---|
NA | uint256 | Vault id |
Returns the debt of a specific vault.
Call Params
Name | Type | Description |
---|---|---|
_id | uint256 | The ID of the vault |
Return Value
Name | Type | Description |
---|---|---|
NA | uint256 | Vault debt |
Checks if a specified vault exists.
Call Params
Name | Type | Description |
---|---|---|
_id | uint256 | The ID of the vault |
Return Value
Name | Type | Description |
---|---|---|
NA | bool | true if vault exists false if not |
Returns a specific vault state.
Call Params
Name | Type | Description |
---|---|---|
_id | uint256 | The ID of the vault |
Return Value
Name | Type | Description |
---|---|---|
NA | struct | InceptionVault struct |
Last modified 7mo ago