Deployment
Basic Deployment​
dpm canton-deploy deploy --network localnet
By default, deploy builds the project, uploads the DAR set, optionally vets it, onboards configured parties and users, and can run a Daml Script.
Deploy Flags​
| Flag | Meaning |
|---|---|
--upload-via admin|ledger | Override the upload path for this run |
--dar <path> | Extra DAR (repeatable) |
--skip-build | Use existing .daml/dist or .dpm/dist artifacts |
--vet / --no-vet | Override vetOnUpload |
--dry-run | Print the DAR set; do not upload |
--script <Module:fn> | Run a Daml Script after upload |
--input-file <path> | JSON input passed to the --script function |
Upload Path​
The default upload path is the Ledger API, which works on managed validators that expose only the Ledger and JSON APIs. Use the Admin API instead with:
dpm canton-deploy deploy --network localnet --upload-via admin
See Upload Paths for the precedence of flag, environment variable, and config.
Deploy an Additional DAR​
dpm canton-deploy deploy --network localnet --dar ./vendor/token-standard.dar
The --dar flag can be repeated for multiple additional DAR files.
Run a Script After Upload​
dpm canton-deploy deploy --network localnet --script My.Module:setup
Pass input to the script function with --input-file, for example party IDs on shared networks:
dpm canton-deploy deploy --network testnet --skip-build --vet --script Setup:seed --input-file seed.json
A party name should be allocated either by the config parties list or by your script, not both.
deploy allocates configured parties before running --script. If the script also calls allocatePartyByHint for the same name, Canton can reject the second allocation.
If a name is in parties, have the script look the party up instead of allocating it (filter listKnownParties by the Alice:: prefix, or pass party IDs in with --input-file). If the script allocates it, leave it out of parties.
Skip the Build​
Use existing .daml/dist or .dpm/dist artifacts:
dpm canton-deploy deploy --network localnet --skip-build
Dry Run​
Print the DAR set without uploading:
dpm canton-deploy deploy --network devnet --skip-build --dry-run
Vetting​
Disable vetting for a deployment:
dpm canton-deploy deploy --network localnet --no-vet
You can override the configured vetOnUpload value with --vet or --no-vet.
Uploading a DAR does not create contracts. Use --script or the run command to seed the ledger.
Vet​
Vet the DAR set that deploy would upload:
dpm canton-deploy vet --network localnet
dpm canton-deploy vet --network localnet --skip-build
Vet one already-uploaded DAR by main package ID:
dpm canton-deploy vet-dar <mainPackageId> --network localnet
By default, vetting waits until it is observed on the synchronizer. Use --no-sync to return as soon as the request is accepted.