IVirtualIssuanceSupplyBase_v1.sol

Git Source

Functions

setVirtualIssuanceSupply

Sets the virtual issuance supply to a new value.

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

function setVirtualIssuanceSupply(uint _virtualSupply) external;

Parameters

Name
Type
Description

_virtualSupply

uint256

The new value to set for the virtual issuance supply.

getVirtualIssuanceSupply

Returns the current virtual issuance supply.

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

function getVirtualIssuanceSupply() external view returns (uint);

Returns

Name
Type
Description

<none>

uint256

The current virtual issuance supply as a uint.

Events

VirtualIssuanceSupplySet

Event emitted when virtual issuance supply has been set.

event VirtualIssuanceSupplySet(uint newSupply, uint oldSupply);

Parameters

Name
Type
Description

newSupply

uint256

The new virtual issuance supply.

oldSupply

uint256

The old virtual issuance supply.

VirtualIssuanceAmountAdded

Event emitted when virtual issuance amount has been added.

event VirtualIssuanceAmountAdded(uint amountAdded, uint newSupply);

Parameters

Name
Type
Description

amountAdded

uint256

The amount added to the virtual issuance supply.

newSupply

uint256

The new virtual issuance supply.

VirtualIssuanceAmountSubtracted

Event emitted when virtual issuance amount has ben subtracted.

event VirtualIssuanceAmountSubtracted(uint amountSubtracted, uint newSupply);

Parameters

Name
Type
Description

amountSubtracted

uint256

The amount subtracted from the virtual issuance supply.

newSupply

uint256

The new virtual issuance supply.

Errors

Module__VirtualIssuanceSupplyBase__VirtualSupplyCannotBeZero

The virtual supply cannot be zero.

error Module__VirtualIssuanceSupplyBase__VirtualSupplyCannotBeZero();

Module__VirtualIssuanceSupplyBase__SubtractResultsInUnderflow

Subtracting would result in an underflow.

error Module__VirtualIssuanceSupplyBase__SubtractResultsInUnderflow();

Module__VirtualIssuanceSupplyBase__AddResultsInOverflow

Adding would result in and overflow.

error Module__VirtualIssuanceSupplyBase__AddResultsInOverflow();

Last updated