For the complete documentation index, see llms.txt. This page is also available as Markdown.

Incorporate a cyberCORP

Deploy a cyberCORP suite, create a security class, and issue the first cyberCERT

In this tutorial you deploy a new cyberCORP, create a certificate printer for its Common Stock, and issue the first cyberCERT to a founder.

At the end you will have a CyberCorp and its suite (IssuanceManager, DealManager, RoundManager, plus a BorgAuth ACL), one certificate printer for Common Stock, and one cyberCERT held by the founder.

Naming note: the certificate printer contract is now called LedgerEntryToken in the source (formerly CyberCertPrinter). The rename is source-level only — the ABI and storage layout are unchanged, and the docs still say "cert printer" for the deployed instances.

Code here is illustrative of the flow and uses the real contract signatures from cybercorps-contracts (develop). Confirm structs and parameters against the source before deploying.

1. Deploy the cyberCORP

New cyberCORPs are deployed by the CyberCorpFactory. A single deployCyberCorp call deploys the BorgAuth ACL and the whole suite.

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 the founder BorgAuth role 200 (officer) and grants the IssuanceManager / DealManager / RoundManager role 99. See Access control. It emits CyberCorpDeployed.

2. Create a Common Stock certificate printer

The IssuanceManager creates one cert printer (LedgerEntryToken) per security series.

3. Issue the genesis cyberCERT

Mint a cyberCERT to the founder with createCertAndAssign. The metadata is a CertificateDetails struct (defined in ILedgerEntryToken.sol).

createCertAndAssign mints the ERC-721 and records the founder as the registered owner. (createCert mints without assigning a registered owner; other createCert* variants also attach a name, an endorsement, or a signature — see IssuanceManager.)

4. Inspect the register

Note the two owners: ownerOf is the NFT holder; legalOwnerOf is the registered owner of record. They are kept distinct on purpose — see The dual-token model.

What you just did

  • Deployed a cyberCORP and its full contract suite in one call.

  • Created a Common Stock certificate printer.

  • Issued the first register entry as a cyberCERT.

Next

Last updated

Was this helpful?