LogoLogo
General DocsTechnical DocsSource CodeMarketing SiteGet Early Access
  • Protocol
    • Overview
    • Treasury & Departments
      • Signers & Access Control
      • Spending Funds & Allowance
      • Departments
    • Capital Stack
      • Share Classes
      • Debt
    • Shareholder Governance
    • Modules
      • Equity Financing Module
        • Priced Rounds
        • SAFEs
      • Billing
      • Payroll
      • Documents
      • Vesting & Unlocks
    • Lifecycle Events
      • Recapitalization
      • Liquidation
      • Acquisition
    • KYC Procceses
  • Smart Contracts
    • Overview
    • Smart Contract Security
    • Deployment of Core Contracts
    • Contract Upgrades
    • Mezz Guards
    • Documents
    • Glossary
    • Source Code
      • Core
        • Base
          • Team
          • TeamControlled
          • AdminControlled
          • Credentialed
          • MezzUUPSUpgradeable
        • MezzShares
          • CommonShares
          • PreferredShares
        • Treasury
        • Department
          • GeneralDepartment
        • Module
          • EquityFinancingModule
        • CapitalStack
        • DelegateRegistry
        • TokenTimelock
        • PayrollManager
        • PricedRound
        • MezzGovernor
          • ProposalGovernor
          • StartupGovernor
          • ShareClassGovernor
          • LateStageGovernor
        • MezzGuard
          • BlacklistGuard
          • WhitelistGuard
          • ShareholderGuard
      • MezzHub
      • MezzDeployer
      • MezzMigrator
      • BillingRouter
      • DocumentRegistry
      • FeeController
      • Events
      • Errors
  • Technical Documentation
    • Creating a Custom Module
Powered by GitBook
On this page
  • Functions
  • constructor
  • init
  • __GeneralDepartment_init
  • coreId
  • version
  1. Smart Contracts
  2. Source Code
  3. Core
  4. Department

GeneralDepartment

PreviousDepartmentNextModule

Last updated 1 year ago

Inherits: Department

Author: Daniel Yamagata & Naveen Ailawadi

A simple department which solely inherits the base functionality

Functions

constructor

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

init

Standardized init function that all departments must inherit

function init(
    address initTreasury,
    address[] memory _owners,
    uint256 _threshhold,
    address initGuard,
    address initParent,
    bytes memory params
) external virtual override initializer;

Parameters

Name
Type
Description

initTreasury

address

The address of the treasury

_owners

address[]

The initial signers of the department's multisig

_threshhold

uint256

The initial threshold of the department's multisig

initGuard

address

The address of the guard contract, which should be deployed atomically with the department

initParent

address

The address of the department's parent

params

bytes

Any additional parameters that the department needs to initialize

__GeneralDepartment_init

Sets the 'departmentName' and calls the department's internal init function. The 'name' of the contract will be the concatenation of the company name, the department name, and " Department". For example, if the company name is "Foo" and 'departmentName' is "Bar", the contract name will be "Foo Bar Department".

function __GeneralDepartment_init(
    address initTreasury,
    address[] memory _owners,
    uint256 _threshhold,
    address initGuard,
    address initParent,
    bytes memory params
) internal virtual onlyInitializing;

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"))

function coreId() public pure virtual override(Credentialed, ICredentialed) returns (bytes32);

version

Returns the version of the implementation as a uint256

function version() public pure virtual override(Credentialed, ICredentialed) returns (uint256);
Git Source