Skip to Content
DevelopmentDeploy Factory

Deploy your transfer-agent factory

A CapTableFactory is the onchain house for a transfer-agent business: it deploys many issuer cap tables (beacon proxies) and its owner controls upgrades for those tables.

RoleMeaning
Factory ownerWallet that deployed the factory (beacon upgrades). For the shared Plume demo this is 0x366a…, not TAP Admin 0x3601….
Issuer ADMINWallet that called createCapTable on a factory.
Mongo registerLocal DB row so this API knows which factory address to use — not ownership.

Factory owner is not the same as the server PRIVATE_KEY used for API-signed txs. See Three wallets / keys on Setup. Do not leave the factory-owner key in the always-on API env.

Product direction: wallet-first “deploy your factory” in the app. Today the supported path is pnpm deploy-factory (CLI) with auto Mongo registration.

Default: deploy your own factory

Configure env

Root .env (or a dedicated deploy env file) needs a funded deployer key for this command — that wallet becomes factory owner — plus RPC_URL and CHAIN_ID (Plume: 98866 / https://rpc.plume.org). Do not leave the owner key in the always-on Docker/API env after deploy.

Run the deployment script

pnpm deploy-factory

The script deploys libraries + CapTable implementation + CapTableFactory, then auto-registers factory + live implementation in Mongo (unless --no-register).

Point the frontend at your factory

Set NEXT_PUBLIC_FACTORY_ADDRESS in app/.env.local (and root .env if using Docker app) to the printed CapTableFactory address.

Factory addresses are unique to the deployer wallet and nonce. Do not hardcode someone else’s factory as “yours,” and do not paste a stale implementation address — read it from the factory onchain.

Register an existing factory you control

pnpm factory:register --factory 0xYourFactory # implementation is read onchain when omitted

MongoDB Compass is optional for inspection (mongodb://tap:tap@localhost:27027, database mongo, collection factories). Prefer the CLI so the implementation stays live.

Demo / issuer-dev: shared Plume factory

For local product work without deploying a factory:

REUSE_TAP_FACTORY=1 pnpm bootstrap # or: pnpm factory:register --factory 0xcd6Df14406b0569ceEABa884A18717774EdeaCA1
Actor / deploymentAddressCapability
TAP Admin0x3601a913fD3466f30f5ABb978E484d1B37Ce995DProduct / issuer wallet (mints cap tables through the demo factory)
Shared demo CapTableFactory0xcd6Df14406b0569ceEABa884A18717774EdeaCA1Permissionless issuer cap-table creation (32 tables; live impl 0xB63C…)
Factory owner0x366aA809015061C101983900d0c2ebf7d71B96AFBeacon upgrades for this factory (deploy key, not TAP Admin)

You can mint issuer cap tables through this factory (createCapTable is permissionless). You do not own upgrades. Production transfer agents should deploy their own factory.

Next: Create an issuer.

Last updated on