IVirtualCollateralSupplyBase_v1.sol

Git Source

Functions

setVirtualCollateralSupply

Sets the virtual collateral supply to a new value.

This function should call the internal function _setVirtualCollateralSupply. The function must be implemented by the downstream contract. The downstream contract should manage access control for setting the supply.

function setVirtualCollateralSupply(uint _virtualSupply) external;

Parameters

Name
Type
Description

_virtualSupply

uint256

The new value to set for the virtual collateral supply.

getVirtualCollateralSupply

Returns the current virtual collateral supply.

This function returns the virtual supply by calling the internal _getVirtualCollateralSupply function.

function getVirtualCollateralSupply() external view returns (uint);

Returns

Name
Type
Description

<none>

uint256

The current virtual collateral supply as a uint.

Events

VirtualCollateralSupplySet

Event emitted when virtual collateral supply has been set.

VirtualCollateralAmountAdded

Event emitted when virtual collateral amount has been added.

VirtualCollateralAmountSubtracted

Event emitted when virtual collateral amount has been subtracted.

Errors

Module__VirtualCollateralSupplyBase__VirtualSupplyCannotBeZero

The virtual supply cannot be zero.

Module__VirtualCollateralSupplyBase__SubtractResultsInUnderflow

Module__VirtualCollateralSupplyBase__AddResultsInOverflow

Adding would result in and overflow.

Last updated