EquityFinancingModule

Git Sourcearrow-up-right

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

bytes32 private constant EquityFinancingModuleStorageLocation =
    0xd961ff105dce6f539fbf0ae0958698eac72f58f46f1375706a8de3e60e2e2f00;

Functions

_getEquityFinancingModuleStorage

function _getEquityFinancingModuleStorage() internal pure returns (EquityFinancingModuleStorage storage $);

constructor

constructor(address _mezzHub, address _mezzMigrator) MezzUpgradeableModule(_mezzHub, _mezzMigrator);

init

Initializes the state of the module. This initialization is bespoke to each module

Parameters

Name
Type
Description

initTeam

address

The team that controls the module

<none>

bytes

__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

Name
Type
Description

initArgs

DataTypes.PricedRoundInitArgs

The arguments to initialize the priced round with. Validated within the priced round, itself

shares

address

The shares to be distributed in the priced round

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