EquityFinancingModule
Inherits: MezzUpgradeableModule, IEquityFinancingModule
Author: Daniel Yamagata
A module that manages the equity financing of a company. Priced rounds are indexed at one
The initial version of Mezzanine only enables a Treasury to have the equity financing module as a child. Future versions may support departments having their own equity financing modules. Additionally, other forms of equity financing will be added via upgrades
State Variables
EquityFinancingModuleStorageLocation
Functions
_getEquityFinancingModuleStorage
constructor
init
Initializes the state of the module. This initialization is bespoke to each module
Parameters
__EquityFinancingModule_init
currentRoundIndex
If there are no priced rounds, returns 0. Otherwise, returns the current round's index
'initTeam' must be a department or treasury
openPricedRound
Opens a Priced Round for the treasury of 'team' and returns the address of the new priced round
Only callable by the 'team' or its ancestor(s)
Parameters
getPricedRounds
Cache
getPricedRoundByIndex
If the priced round with 'roundIndex' does not exist, returns address(0). Otherwise, returns the address of the priced round with 'roundIndex'
coreId
Returns the coreId of the implementation as a bytes32
The core ID is the keccak256 hash of the contract name followed by a version under the following syntax: "mezzanine.coreId.ContractName.vX" For example, the core ID of the 2nd version of the Treasury would be the following: keccak256(abi.encodePacked("mezzanine.coreId.Treasury.v2"))
version
Returns the version of the implementation as a uint256
_updateStateForCanceledRound
Deletes a canceled priced round from the '_pricedRoundByIndex' mapping and decrements the '_nextPricedRoundIndex'
_incrementCurrentRoundIndex
Increments the '_currentRoundIndex' and returns the new value
_decrementCurrentRoundIndex
Decrements the '_currentRoundIndex' and returns the new value
_isTeamDepartment
Returns true if 'teamCache' supports the Department Interface, false otherwise
_isTeamTreasury
Returns true if 'teamCache' supports the Treasury Interface, false otherwise
supportsInterface
ERC165 support
Structs
EquityFinancingModuleStorage
Last updated