Skip to content

Deploy a new app instance ​

This example creates Pay-to-Play contracts and their CAM publication. It does not install a public viewer or upload the bundle for you.

Run on
The operator's Linux workstation or server with a local Docker engine.
Requires
A clean reviewed source revision, locked dependencies, target-chain RPC, funded deployer, selected final authorities and a public bundle-hosting location.
Changes
Private operation records and approved on-chain transactions. Public chains consume gas.
Success
Verified retained records, hosted exact bundle bytes, completed intended handoffs, and a working read through a compatible viewer.

1. Choose the deployment, not just a command

Use source setup and qualify private-file access for the chosen engine. Read the Pay-to-Play settings before selecting the admin, reserve wait and CAM owner. The Escrow and Bike NFT guides specify their different authorities and handoffs.

For practice without public funds, use the isolated release rehearsal. It tests the release process, unlike the simpler app demo.

2. Create the private instance

CTX=your-local-context
INSTANCE=/absolute/private/pay-to-play-fuji
make pay-to-play/release/setup \
  DOCKER_CONTEXT="$CTX" INSTANCE="$INSTANCE"

Choose an instance path outside the checkout with an existing parent. Setup creates the private folder and asks for the configuration purpose, chain, actors and app settings. It prepares the approval tool; it sends no transaction. Keep the directory and credentials private. Use separate instances for different apps or chains.

3. Arrange the hosting pause

For new files whose final URL is not ready, omit settings.CAM_URI from the referenced CAM configuration before starting deployment. Setup normally asks for this field; remove it deliberately to select the pause. Keep the manifest hash setting at auto for an exact-byte commitment.

make pay-to-play/release/deploy \
  DOCKER_CONTEXT="$CTX" INSTANCE="$INSTANCE"

The operation deploys and verifies business and read-only projection contracts, prepares the bundle, and prints its directory. Approve only the reviewed transactions. At the hosting pause, the next input is the bundle's final hosted manifest URI—not another contract deployment.

4. Host the prepared public files

Upload only the contents of the printed cam-bundle/bundle/ directory to a dedicated versioned location. Preserve main.json, ui.json, protocol.html and ABI relative paths. Do not upload the instance, input copies, signing material, compiler output or source archives.

Use HTTPS or supported IPFS publication. Browser access must satisfy CORS. Download the hosted main.json and compare its SHA-256 with the prepared file; check every resource resolves to its exact prepared bytes. A successful upload is not an on-chain publication. The bundle artifact reference describes the retained bundle artifact.

5. Resume and approve publication

Repeat the same deploy command, choose Resume and enter the hosted manifest URI. Do not start a separate deployment to continue the pause. Existing completed components are checked, not redeployed. Inspect the CAM root, bindings, manifest URI/hash and nominated owner before approving.

Retain the entire instance. A transaction hash alone is not a mined success; inspect uncertain outcomes before approving a second attempt.

6. Verify and open

make pay-to-play/release/verify \
  DOCKER_CONTEXT="$CTX" INSTANCE="$INSTANCE"
make viewer/release/up \
  DOCKER_CONTEXT="$CTX" INSTANCE="$INSTANCE"

Historical verification checks retained deployment evidence. It does not establish that nominees accepted ownership or that the app currently has a particular balance or role. Have nominees accept their authorities separately as specified by the app guide; Bike NFT acceptance can include a delay.

Select the completed publication and a browser-public RPC, then open the printed URL. Check a known read before connecting a signing wallet. A permanent viewer website is a separate server task.

When execution stops

Keep the saved records and repeat the same command to resume or reconcile. Do not discard a failed attempt, guess that a transaction was not sent, or switch to new contracts merely because a final artifact is missing. See record recovery and cleanup boundaries.

Source baseline: 04a18763. This procedure is not an authorization to replace an existing public deployment.