VirtualIssuanceSupplyBase_v1.sol
Last updated
Last updated
Inherits: IVirtualIssuanceSupplyBase_v1, ERC165Upgradeable
Author: Inverter Network
Manages a virtual issuance supply to facilitate interactions with Inverter's Funding Manager
Implements {IVirtualIssuancelSupplyBase_v1} for handling virtual issuance. Includes functions to set, get, add, and subtract virtual issuance amounts.
The internal state variable to keep track of the virtual issuance supply.
Maximum unsigned integer value for overflow checks.
Storage gap for future upgrades.
See {IERC165-supportsInterface}.
Returns the current virtual issuance supply.
This function returns the virtual supply by calling the internal _getVirtualIssuanceSupply
function.
Returns
<none>
uint256
The current virtual issuance supply as a uint.
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.
Parameters
_virtualSupply
uint256
The new value to set for the virtual issuance supply.
Adds a specified amount to the virtual issuance supply. Checks for overflow and reverts if an overflow occurs.
Parameters
_amount
uint256
The amount to add to the virtual issuance supply.
Subtracts a specified amount from the virtual issuance supply. Checks for underflow and reverts if an underflow occurs.
Parameters
_amount
uint256
The amount to subtract from the virtual issuance supply.
Internal function to directly set the virtual issuance supply to a new value.
Parameters
_virtualSupply
uint256
The new value to set for the virtual issuance supply.