IVirtualCollateralSupplyBase_v1.sol
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
_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
<none>
uint256
The current virtual collateral supply as a uint.
Events
VirtualCollateralSupplySet
Event emitted when virtual collateral supply has been set.
event VirtualCollateralSupplySet(uint newSupply, uint oldSupply);
VirtualCollateralAmountAdded
Event emitted when virtual collateral amount has been added.
event VirtualCollateralAmountAdded(uint amountAdded, uint newSupply);
VirtualCollateralAmountSubtracted
Event emitted when virtual collateral amount has been subtracted.
event VirtualCollateralAmountSubtracted(uint amountSubtracted, uint newSupply);
Errors
Module__VirtualCollateralSupplyBase__VirtualSupplyCannotBeZero
The virtual supply cannot be zero.
error Module__VirtualCollateralSupplyBase__VirtualSupplyCannotBeZero();
Module__VirtualCollateralSupplyBase__SubtractResultsInUnderflow
error Module__VirtualCollateralSupplyBase__SubtractResultsInUnderflow();
Module__VirtualCollateralSupplyBase__AddResultsInOverflow
Adding would result in and overflow.
error Module__VirtualCollateralSupplyBase__AddResultsInOverflow();
Last updated