Skip to main content

VaultToken

Git Source ↗

Inherits: Initializable ↗, ERC20Upgradeable, VaultState, IVaultToken

Defines the token functionality for the Vault

State Variables​

__gap​

This empty reserved space is put in place to allow future versions to add new variables without shifting down storage in the inheritance chain. See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps

uint256[50] private __gap

Functions​

totalSupply​

Returns the amount of tokens in existence.

function totalSupply() external view override returns (uint256);

balanceOf​

Returns the amount of tokens owned by account.

function balanceOf(address account) external view returns (uint256);

_mintShares​

Internal function for minting shares

function _mintShares(address owner, uint256 shares) internal virtual override;

Parameters

NameTypeDescription
owneraddressThe address of the owner to mint shares to
sharesuint256The number of shares to mint

_burnShares​

Internal function for burning shares

function _burnShares(address owner, uint256 shares) internal virtual override;

Parameters

NameTypeDescription
owneraddressThe address of the owner to burn shares for
sharesuint256The number of shares to burn

_updateExitQueue​

Internal function that must be used to process exit queue

function _updateExitQueue() internal virtual override returns (uint256 burnedShares);

Returns

NameTypeDescription
burnedSharesuint256The total amount of burned shares

_transfer​

Moves amount of tokens from from to to. Emits a Transfer event.

function _transfer(address from, address to, uint256 amount) internal virtual override;

__VaultToken_init​

Initializes the VaultToken contract

function __VaultToken_init(string memory _name, string memory _symbol) internal onlyInitializing;

Parameters

NameTypeDescription
_namestringThe name of the ERC20 token
_symbolstringThe symbol of the ERC20 token