Factories
Factories deploy cyberCORPs and their contracts.
CyberCorpFactory
The top-level entry point.
Source:
src/CyberCorpFactory.solInherits:
UUPSUpgradeable,BorgAuthACL
function deployCyberCorp(bytes32 salt, string companyName, string companyType,
string companyJurisdiction, string companyContactDetails,
string defaultDisputeResolution, address _companyPayable,
CompanyOfficer _officer)
external returns (address cyberCorp, address auth, address issuanceManager,
address dealManager, address roundManager);
function deployCyberCorpAndCreateOffer(/* ... */) external returns (/* corp suite + deal */);
function deployCyberCorpAndCreateRound(/* ... */) external returns (/* corp suite + roundId */);
function deployAndInitializeRoundManager(bytes32 salt, address cyberCorp) public returns (address);deployCyberCorp:
Deploys a
BorgAuthACL viaCREATE2and grants the officer level200.Deploys the
IssuanceManager,CyberCorp,DealManager, andRoundManagerthrough their respective sub-factories and initialises them.Grants the
IssuanceManager,DealManager, andRoundManagerBorgAuth level99, and theCyberCorplevel200.Emits
CyberCorpDeployed.
The deployCyberCorpAndCreate* variants additionally create cert printers and open a deal or a round in the same transaction. Their CyberCertData struct carries, per printer, the security class/series, the certificate extension contract, and an extension-encoded seriesData payload (series-scope terms; see ICertificateExtensionV3).
deployAndInitializeRoundManager(salt, cyberCorp) is public so a RoundManager can be retrofitted onto an existing cyberCORP that predates rounds (the corp must authorise it itself; see also src/helpers/RoundManagerUpgradeHelper.sol).
Setters (onlyOwner): setStable, setIssuanceManagerFactory, setCyberCorpSingleFactory, setCyberAgreementFactory, setDealManagerFactory, setRoundManagerFactory, setLexchexAuth.
Sub-factories
CyberCorpFactory composes:
CyberCorpSingleFactory
the CyberCorp proxy; holds the reference implementation that gates CyberCorp upgrades.
IssuanceManagerFactory
the IssuanceManager; holds the LedgerEntryToken (cert printer) and CyberScrip reference implementations that the IssuanceManager's own beacons point at.
DealManagerFactory
the DealManager.
RoundManagerFactory
the RoundManager.
The CyberAgreementRegistry is shared (passed in as registryAddress).
Specialised factories
These build on the same primitives for specific structures:
PumpCorpFactory
src/PumpCorpFactory.sol
Deploys cyberCORPs configured for ACE (token-to-equity) offerings.
MetaDAOFactory
src/MetaDAOFactory.sol
Deploys MetaDAO futarchy-governed SPC structures.
ParentCoFactory
src/ParentCoFactory.sol
Deploys parent/subsidiary cyberCORP structures.
The specialised factories are documented here at a high level. Consult their source for exact constructors and deployment parameters.
Last updated
Was this helpful?
