> For the complete documentation index, see [llms.txt](https://docs.inverter.network/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.inverter.network/contracts/technical-reference/modules/funding-manager/bonding-curve/interfaces/ivirtualissuancesupplybase_v1.sol.md).

# IVirtualIssuanceSupplyBase\_v1.sol

[Git Source](https://github.com/InverterNetwork/inverter-contracts/blob/649b450f02fc8b735c128ff0821467e71966c666/src/modules/fundingManager/bondingCurve/interfaces/IVirtualIssuanceSupplyBase_v1.sol)

### 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.*

```solidity
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.*

```solidity
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.

```solidity
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.

```solidity
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.

```solidity
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.

```solidity
error Module__VirtualIssuanceSupplyBase__VirtualSupplyCannotBeZero();
```

#### Module\_\_VirtualIssuanceSupplyBase\_\_SubtractResultsInUnderflow

Subtracting would result in an underflow.

```solidity
error Module__VirtualIssuanceSupplyBase__SubtractResultsInUnderflow();
```

#### Module\_\_VirtualIssuanceSupplyBase\_\_AddResultsInOverflow

Adding would result in and overflow.

```solidity
error Module__VirtualIssuanceSupplyBase__AddResultsInOverflow();
```
