Function: createVault(string _tokenName, string _tokenSymbol, uint256 _vaultStart)
Creates a new instance of an FCNVault and stores associated metadata for it inside the vaults[]
mapping. The mapping is keyed by the new FCNVault contract's address.
Inputs
_tokenName
Control: Fully controlled.
Constraints: N/A.
Impact: Passed to the constructor of the new FCNVault contract.
_tokenSymbol
Control: Fully controlled.
Constraints: N/A.
Impact: Passed to the constructor of the new FCNVault contract.
_vaultStart
Control: Fully controlled.
Constraints: Must not be equal to 0.
Impact: Creates a new FCNVault and sets the vault's start time to this value.
Branches and code coverage (including function calls)
Intended branches
Should add the newly created vault's address to the
vaults[]
mapping.Should create a new FCNVault and track its address in storage.
Should emit the
VaultCreated
event.
Negative behaviour
Should revert if
_vaultStart
is set to 0.Should revert if called by a non--trader-admin role.