Incorporate a cyberCORP
Deploy a cyberCORP and its contract suite, create a LET contract for its common stock, and issue the founder's first Ledger Entry Token
This guide deploys a new cyberCORP through a v5 factory, creates the Ledger Entry Token (LET) contract for its Common Stock, and issues the first LET to a founder. You finish with a CyberCorp and its suite (IssuanceManager, DealManager, RoundManager and a BorgAuth ACL), one LET contract for Common Stock, and one LET held by the founder.
1. Deploy the company and its suite
CyberCorpFactory.deployCyberCorp deploys the BorgAuth ACL and every contract in the suite in one call.
import {CompanyOfficer} from "src/CyberCorpConstants.sol";
CyberCorpFactory factory = CyberCorpFactory(FACTORY_ADDR);
CompanyOfficer memory officer = CompanyOfficer({
eoa: founder,
name: "Jane Founder",
contact: "jane@acme.example",
title: "Chief Executive Officer"
});
(
address cyberCorp,
address auth,
address issuanceManager,
address dealManager,
address roundManager
) = factory.deployCyberCorp(
keccak256("acme-cyberco-v1"), // salt (must be non-zero)
"Acme CyberCo, Inc.", // companyName
"corporation", // companyType (free-form text)
"Delaware", // companyJurisdiction
"legal@acme.example", // companyContactDetails
"Delaware Court of Chancery", // defaultDisputeResolution
founder, // companyPayable
officer
);The factory grants BorgAuth level 200 (officer) to the founder and to the CyberCorp, and level 99 (owner) to the IssuanceManager, DealManager and RoundManager. The factory also keeps the level 99 that BorgAuth gives the address that deploys it; see Access control. The call emits CyberCorpDeployed.
Before deploying, the factory hashes the salt with the company name, type, jurisdiction, contact details, dispute forum, payout address and officer (computeDeploymentSalt), and each component factory then namespaces the result by its caller. Change any of those arguments and the addresses change, so a deployment with other terms cannot take the addresses your configuration predicts. Anyone may submit your exact configuration, and the result is the same company with your officer in control. On a v5 factory, every component of the new company reports DEPLOY_VERSION "5".
2. Create a LET contract for Common Stock
The IssuanceManager creates one LET contract (a LedgerEntryToken deployment) per security series.
3. Issue the founder's first LET
createCertAndAssign mints the founder's LET. Its metadata is a CertificateDetails struct, defined in ILedgerEntryToken.sol.
createCertAndAssign mints the ERC-721 and records the founder as its registered owner. On a v5 LET contract, createCert also records the recipient as registered owner, with no name. The other createCert* variants attach a name, an endorsement or a signature; Issue a LET compares them.
4. Read the LET back
A LET tracks two owners. ownerOf returns the wallet that holds the token, and legalOwnerOf returns the registered owner of record. They can differ: an administered lot sits in an admin multisig while the buyer is its registered owner. LETs and scrip explains the model.
Next, run a cyberRAISE round on the new company. Function-level detail is in IssuanceManager and LedgerEntryToken.
Last updated
Was this helpful?
