Docs
chromia.com

deployment

On this page
Help output
Usage: chr deployment [OPTIONS] COMMAND [ARGS]...

  Create and maintain deployments

╭─ Options ───────────────────────────────────────────────────────────────────╮
│  -h, --help  Show this message and exit                                     │
╰─────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ──────────────────────────────────────────────────────────────────╮
│  create     Deploy new blockchain instance                                  │
│  info       Information about a deployed blockchain                         │
│  inspect    Inspect the API of a deployed blockchain                        │
│  update     Update configuration of a deployed blockchain                   │
│  resume     Starts a paused blockchain                                      │
│  pause      Pauses a deployed blockchain                                    │
│  remove     Removes a deployed blockchain (This action is permanent)        │
│  proposal   Act on proposals                                                │
│  voterset   Interact with votersets                                         │
│  container  Manage container operations                                     │
╰─────────────────────────────────────────────────────────────────────────────╯

deployment create

To deploy your dapp in a container, you use (chr deployment create):

Help output
Usage: chr deployment create [<options>]

  Deploy new blockchain instance

Configuration Properties:
  -cfg, --config=<config>    Alternate path for client configuration file
  -s, --settings=<settings>  Alternate path for project settings file

Key pair source:
  --secret=<path>    Path to secret file (pubkey/privkey)
  --key-id=<key_id>  Key ID of the keypair to use

Network target options:

  Use a configured deployment network target in project settings file

  -d, --network=<text>  Specify which deployment target to use

Options:
  -bc, --blockchain=<text>  Name of blockchain to deploy
  --no-compression          If compression on rell sources should not be done
  --hide-lib-warnings       Hide library warnings in build output
  -y                        Confirm that this will create a new deployment
  -h, --help                Show this message and exit

The chr deployment create command reads the deployments key in the project settings file. When deploying to a target for the first time, the command will show a prompt after a successful deployment with the chain configuration that you need to add to your project settings file.

An example of such a prompt looks like this:

YAML
Add the following to your project settings file
deployments:
  testnet:
    chains:
      my_rell_dapp: x"<BlockchainRID>" #Dapp Blockchain RID

If you already have a deployment and haven't added the chain identifier in your Project Settings file, the command chr deployment overrides any previous deployment to the network. That's why saving the genesis Blockchain RID prompted after the first deployment is important.

When you deploy, you create a snapshot build in the build/ folder with a timestamp by default. You can change default output folder in the project settings file at compile:target.

  • To deploy a dapp, you can run the following command when being in the working directory where the project settings file chromia.yml file presides:
Terminal
chr deployment create --network testnet --secret .secret
  • Otherwise, you can set a path for the chromia.yml file or specify a different Project Settings file:
Terminal
chr deployment create --settings chromia.yml --network testnet --secret .secret
  • If you have multiple chains and only want to deploy a specific one, you can write the command like this:
Terminal
chr deployment create --settings chromia.yml --network testnet --blockchain my_rell_dapp --secret .secret

deployment info

To get information about your dapp, you use (chr deployment info):

Help output
Usage: chr deployment info [<options>]

  Information about a deployed blockchain

Configuration Properties:
  -cfg, --config=<config>    Alternate path for client configuration file
  -s, --settings=<settings>  Alternate path for project settings file

dApp target options:
  -brid, --blockchain-rid=<text>  Target Blockchain RID
  --cid=<int>                     Target Blockchain IID
  --api-url=<text>                Target api url
  --mainnet, --testnet            Select network, use instead of --api-url

Deployment:

  Use a configured deployment network target in chromia.yml

  -d, --network=<text>      Specify which deployment target to use
  -bc, --blockchain=<text>  Name of blockchain in deployment configuration

Options:
  --verbose                         Show verbose information about nodes
  -f, --output-format=(table|JSON)  Output format
  -h, --help                        Show this message and exit

deployment inspect

To inspect the API of your dapp, you use (chr deployment inspect):

Help output
Usage: chr deployment inspect [<options>]

  Inspect the API of a deployed blockchain

Configuration Properties:
  -cfg, --config=<config>    Alternate path for client configuration file
  -s, --settings=<settings>  Alternate path for project settings file

dApp target options:
  -brid, --blockchain-rid=<text>  Target Blockchain RID
  --cid=<int>                     Target Blockchain IID
  --api-url=<text>                Target api url
  --mainnet, --testnet            Select network, use instead of --api-url

Deployment:

  Use a configured deployment network target in chromia.yml

  -d, --network=<text>      Specify which deployment target to use
  -bc, --blockchain=<text>  Name of blockchain in deployment configuration

Options:
  -f, --output-format=(table|JSON)
                           Output format
  -m, --modules=<modules>  Explicitly state which module to inspect (comma
                           separated)
  -l, --list-modules       List all module names
  --module-args            Show module_args
  --definitions=(queries|operations|entities|objects)
                           List definitions of this kind (comma separated),
                           default: all
  --signature=<value>      Show the signature of the specified definition and
                           exit
  -h, --help               Show this message and exit

deployment update

To update your dapp, you use (chr deployment update):

Help output
Usage: chr deployment update [<options>]

  Update configuration of a deployed blockchain

Configuration Properties:
  -cfg, --config=<config>    Alternate path for client configuration file
  -s, --settings=<settings>  Alternate path for project settings file

Key pair source:
  --secret=<path>    Path to secret file (pubkey/privkey)
  --key-id=<key_id>  Key ID of the keypair to use

Network target options:

  Use a configured deployment network target in project settings file

  -d, --network=<text>  Specify which deployment target to use

Options:
  -bc, --blockchain=<text>  Name of blockchain to deploy
  --no-compression          If compression on rell sources should not be done
  --hide-lib-warnings       Hide library warnings in build output
  --height=<int>            Deploy configuration at a specific height
  --verify-only             Verifies blockchain config without sending update
                            transaction
  --skip-verification       Skip verification of blockchain config before
                            sending update transaction
  -h, --help                Show this message and exit

deployment pause

To pause your dapp, you use (chr deployment pause):

Help output
Usage: chr deployment pause [<options>]

  Pauses a deployed blockchain

Configuration Properties:
  -cfg, --config=<config>    Alternate path for client configuration file
  -s, --settings=<settings>  Alternate path for project settings file

Key pair source:
  --secret=<path>    Path to secret file (pubkey/privkey)
  --key-id=<key_id>  Key ID of the keypair to use

Options:
  --description=<text>      Description on why the blockchain is being acted on
  -d, --network=<text>      Specify which deployment target to use
  -bc, --blockchain=<text>  Name of blockchain to deploy
  -y                        Confirm that this will remove the blockchain
                            permanently
  -h, --help                Show this message and exit

deployment resume

To start your paused dapp, you use (chr deployment resume):

Help output
Usage: chr deployment resume [<options>]

  Starts a paused blockchain

Configuration Properties:
  -cfg, --config=<config>    Alternate path for client configuration file
  -s, --settings=<settings>  Alternate path for project settings file

Key pair source:
  --secret=<path>    Path to secret file (pubkey/privkey)
  --key-id=<key_id>  Key ID of the keypair to use

Options:
  --description=<text>      Description on why the blockchain is being acted on
  -d, --network=<text>      Specify which deployment target to use
  -bc, --blockchain=<text>  Name of blockchain to deploy
  -y                        Confirm that this will remove the blockchain
                            permanently
  -h, --help                Show this message and exit

deployment remove

To remove your dapp, you use (chr deployment remove):

Help output
Usage: chr deployment remove [<options>]

  Removes a deployed blockchain (This action is permanent)

Configuration Properties:
  -cfg, --config=<config>    Alternate path for client configuration file
  -s, --settings=<settings>  Alternate path for project settings file

Key pair source:
  --secret=<path>    Path to secret file (pubkey/privkey)
  --key-id=<key_id>  Key ID of the keypair to use

Options:
  --description=<text>      Description on why the blockchain is being acted on
  -d, --network=<text>      Specify which deployment target to use
  -bc, --blockchain=<text>  Name of blockchain to deploy
  -y                        Confirm that this will remove the blockchain
                            permanently
  -h, --help                Show this message and exit

deployment proposal

The deployment proposal command (chr deployment proposal) comprises sub-commands that manage proposals.

Help output
Usage: chr deployment proposal [OPTIONS] COMMAND [ARGS]...

  Act on proposals

╭─ Options ───────────────────────────────────────────────────────────────────╮
│  -h, --help  Show this message and exit                                     │
╰─────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ──────────────────────────────────────────────────────────────────╮
│  vote          Vote on proposals linked to your public key                  │
│  retract-vote  Retract a previously cast vote on a proposal                 │
│  list          List all proposals that you can vote on                      │
│  info          Get information of a given proposal                          │
│  revoke        Revoke/remove a proposal submitted by you                    │
│  rename        Create a proposal to rename a deployed blockchain            │
╰─────────────────────────────────────────────────────────────────────────────╯

proposal vote

Help output
Usage: chr deployment proposal vote [<options>]

  Vote on proposals linked to your public key

Configuration Properties:
  -cfg, --config=<config>    Alternate path for client configuration file
  -s, --settings=<settings>  Alternate path for project settings file

Network target options:

  Use a configured deployment network target in project settings file

  -d, --network=<text>  Specify which deployment target to use

Key pair source:
  --secret=<path>    Path to secret file (pubkey/privkey)
  --key-id=<key_id>  Key ID of the keypair to use

Options:
  --id=<int>          Id of the proposal
  --accept, --reject  Vote action to cast
  -h, --help          Show this message and exit

The vote command (chr deployment proposal vote) allows you to vote on proposals that are linked to your public key.

proposal retract-vote

Help output
Usage: chr deployment proposal retract-vote [<options>]

  Retract a previously cast vote on a proposal

Configuration Properties:
  -cfg, --config=<config>    Alternate path for client configuration file
  -s, --settings=<settings>  Alternate path for project settings file

Network target options:

  Use a configured deployment network target in project settings file

  -d, --network=<text>  Specify which deployment target to use

Key pair source:
  --secret=<path>    Path to secret file (pubkey/privkey)
  --key-id=<key_id>  Key ID of the keypair to use

Options:
  --id=<int>  Id of the proposal
  -h, --help  Show this message and exit

The command (chr deployment proposal retract-vote) allows you to retract previous vote on proposals.

proposal list

Help output
Usage: chr deployment proposal list [<options>]

  List all proposals that you can vote on

Configuration Properties:
  -cfg, --config=<config>    Alternate path for client configuration file
  -s, --settings=<settings>  Alternate path for project settings file

Network target options:

  Use a configured deployment network target in project settings file

  -d, --network=<text>  Specify which deployment target to use

Options:
  --from=<value>  List proposals from date (YYYY-MM-DD)
  --to=<value>    List proposals to date (YYYY-MM-DD)
  --all           Include all proposals, including ones you can not vote on
  --pending       Only include proposals that are still pending
  -f, --output-format=(table|JSON)
                  Output format
  -h, --help      Show this message and exit

The list command (chr deployment proposal list) lists all proposals that you can vote on.

proposal info

Help output
Usage: chr deployment proposal info [<options>]

  Get information of a given proposal

Configuration Properties:
  -cfg, --config=<config>    Alternate path for client configuration file
  -s, --settings=<settings>  Alternate path for project settings file

Network target options:

  Use a configured deployment network target in project settings file

  -d, --network=<text>  Specify which deployment target to use

Options:
  --id=<int>                        Id of the proposal
  -f, --output-format=(table|JSON)  Output format
  -h, --help                        Show this message and exit

The info command (chr deployment proposal info) shows the information of a given proposal.

proposal revoke

Help output
Usage: chr deployment proposal revoke [<options>]

  Revoke/remove a proposal submitted by you

Configuration Properties:
  -cfg, --config=<config>    Alternate path for client configuration file
  -s, --settings=<settings>  Alternate path for project settings file

Network target options:

  Use a configured deployment network target in project settings file

  -d, --network=<text>  Specify which deployment target to use

Key pair source:
  --secret=<path>    Path to secret file (pubkey/privkey)
  --key-id=<key_id>  Key ID of the keypair to use

Options:
  --id=<int>  Id of the proposal
  -h, --help  Show this message and exit

The revoke command (chr deployment proposal revoke) revokes a proposal submitted by you.

proposal rename

Help output
Usage: chr deployment proposal rename [<options>]

  Create a proposal to rename a deployed blockchain

Configuration Properties:
  -cfg, --config=<config>    Alternate path for client configuration file
  -s, --settings=<settings>  Alternate path for project settings file

Network target options:

  Use a configured deployment network target in project settings file

  -d, --network=<text>  Specify which deployment target to use

Key pair source:
  --secret=<path>    Path to secret file (pubkey/privkey)
  --key-id=<key_id>  Key ID of the keypair to use

Options:
  --description=<text>            Proposal description
  -n, --new-name, --name=<text>   New name of the blockchain
  -brid, --blockchain-rid=<text>  Brid for blockchain to rename
  -h, --help                      Show this message and exit

The rename command (chr deployment proposal rename) creates a proposal to rename a deployed blockchain.

deployment voterset

The deployment voterset command (chr deployment voterset) comprises sub-commands that manage voter sets.

Help output
Usage: chr deployment voterset [OPTIONS] COMMAND [ARGS]...

  Interact with votersets

╭─ Options ───────────────────────────────────────────────────────────────────╮
│  -h, --help  Show this message and exit                                     │
╰─────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ──────────────────────────────────────────────────────────────────╮
│  info               Show information of voter set                           │
│  update             Propose an update of a voter set's members list         │
│  list               List all voter sets                                     │
│  add-dapp-provider  Add a dapp provider to container                        │
╰─────────────────────────────────────────────────────────────────────────────╯

voterset info

Help output
Usage: chr deployment voterset info [<options>]

  Show information of voter set

Configuration Properties:
  -cfg, --config=<config>    Alternate path for client configuration file
  -s, --settings=<settings>  Alternate path for project settings file

Network target options:

  Use a configured deployment network target in project settings file

  -d, --network=<text>  Specify which deployment target to use

Options:
  -n, --name=<value>       Name of voter set
  -c, --container=<value>  Name of the container that is governed by the
                           voterset
  -f, --output-format=(table|JSON)
                           Output format
  -h, --help               Show this message and exit

The info command (chr deployment voterset info) shows the information about a voter set.

voterset update

Help output
Usage: chr deployment voterset update [<options>]

  Propose an update of a voter set's members list

Configuration Properties:
  -cfg, --config=<config>    Alternate path for client configuration file
  -s, --settings=<settings>  Alternate path for project settings file

Network target options:

  Use a configured deployment network target in project settings file

  -d, --network=<text>  Specify which deployment target to use

Key pair source:
  --secret=<path>    Path to secret file (pubkey/privkey)
  --key-id=<key_id>  Key ID of the keypair to use

Options:
  -vs, --voter-set=<text>  Name of existing voter set to update
  -t, --threshold=<int>    0: supermajority of voters, specifically n - (n - 1)
                           / 3 (which is usually around 67%) -1: simple
                           majority positive number: that many voters
  --add-member=<value>     Provider pubkey(s) to add to voter set. Separate
                           keys with ','
  --remove-member=<value>  Provider pubkey(s) to remove from voter set.
                           Separate keys with ','
  --description=<text>     Proposal description
  -h, --help               Show this message and exit

With the update command (chr deployment voterset update), you can propose an update of a voter sets governor. New governor must be an existing voter set.

voterset list

Help output
Usage: chr deployment voterset list [<options>]

  List all voter sets

Configuration Properties:
  -cfg, --config=<config>    Alternate path for client configuration file
  -s, --settings=<settings>  Alternate path for project settings file

Network target options:

  Use a configured deployment network target in project settings file

  -d, --network=<text>  Specify which deployment target to use

Options:
  -f, --output-format=(table|JSON)
                          Output format
  -c, --container=<text>  Specify the container to receive the voterset for, If
                          not set it will default to all votersets.
  -h, --help              Show this message and exit

The list command (chr deployment voterset list) lists all the voter sets.

voterset add-dapp-provider

Help output
Usage: chr deployment voterset add-dapp-provider [<options>]

  Add a dapp provider to container

Configuration Properties:
  -cfg, --config=<config>    Alternate path for client configuration file
  -s, --settings=<settings>  Alternate path for project settings file

Network target options:

  Use a configured deployment network target in project settings file

  -d, --network=<text>  Specify which deployment target to use

Key pair source:
  --secret=<path>    Path to secret file (pubkey/privkey)
  --key-id=<key_id>  Key ID of the keypair to use

Options:
  -a, --await / --no-await     Wait for transaction to be included in a block
  -pk, --pubkey=<text>         The public key of the dApp provider to be added
  -cid, --container-id=<text>  Container Identifier to add dapp provider too
  --evm-auth=<address>         Adds ft4.evm_auth operation for FT-compatible
                               dapps
  -h, --help                   Show this message and exit

The add-dapp-provider command (chr deployment voterset add-dapp-provider) adds a dapp provider to a container.

deployment pause-container

Help output
Usage: chr deployment pause-container [<options>]

  Pause a container

Configuration Properties:
  -cfg, --config=<config>    Alternate path for client configuration file
  -s, --settings=<settings>  Alternate path for project settings file

Key pair source:
  --secret=<path>    Path to secret file (pubkey/privkey)
  --key-id=<key_id>  Key ID of the keypair to use

Options:
  --description=<text>  Description on why the container is being acted on
  -d, --network=<text>  Specify which deployment target to use
  -h, --help            Show this message and exit

The pause-container command (chr deployment pause-container) pauses a container.

deployment resume-container

Help output
Usage: chr deployment resume-container [<options>]

  Resume a paused container

Configuration Properties:
  -cfg, --config=<config>    Alternate path for client configuration file
  -s, --settings=<settings>  Alternate path for project settings file

Key pair source:
  --secret=<path>    Path to secret file (pubkey/privkey)
  --key-id=<key_id>  Key ID of the keypair to use

Options:
  --description=<text>  Description on why the container is being acted on
  -d, --network=<text>  Specify which deployment target to use
  -h, --help            Show this message and exit

The resume-container command (chr deployment resume-container) resumes a paused container.

deployment container

Help output
Usage: chr deployment container [OPTIONS] COMMAND [ARGS]...

  Manage container operations

╭─ Options ───────────────────────────────────────────────────────────────────╮
│  -h, --help  Show this message and exit                                     │
╰─────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ──────────────────────────────────────────────────────────────────╮
│  configuration  Propose configurations for given container                  │
│  pause          Pause a container                                           │
│  resume         Resume a paused container                                   │
╰─────────────────────────────────────────────────────────────────────────────╯

The container command (chr deployment container) manages deployment containers.

container configuration

Help output
Usage: chr deployment container configuration [<options>]

  Propose configurations for given container

  This command allows you to configure various container settings such as slow
  database statement logging thresholds.

Configuration Properties:
  -cfg, --config=<config>    Alternate path for client configuration file
  -s, --settings=<settings>  Alternate path for project settings file

Key pair source:
  --secret=<path>    Path to secret file (pubkey/privkey)
  --key-id=<key_id>  Key ID of the keypair to use

Options:
  -sdbl, --slow-db-statement-log-ms=<int>
                        Threshold for slow DB statement log in milliseconds
  --description=<text>  Proposal description
  -d, --network=<text>  Specify which deployment target to use
  -h, --help            Show this message and exit

The configuration command (chr deployment container configuration) manages container configuration.

container pause

Help output
Usage: chr deployment container pause [<options>]

  Pause a container

Configuration Properties:
  -cfg, --config=<config>    Alternate path for client configuration file
  -s, --settings=<settings>  Alternate path for project settings file

Key pair source:
  --secret=<path>    Path to secret file (pubkey/privkey)
  --key-id=<key_id>  Key ID of the keypair to use

Options:
  --description=<text>  Description on why the container is being acted on
  -d, --network=<text>  Specify which deployment target to use
  -h, --help            Show this message and exit

The pause command (chr deployment container pause) pauses a container.

container resume

Help output
Usage: chr deployment container resume [<options>]

  Resume a paused container

Configuration Properties:
  -cfg, --config=<config>    Alternate path for client configuration file
  -s, --settings=<settings>  Alternate path for project settings file

Key pair source:
  --secret=<path>    Path to secret file (pubkey/privkey)
  --key-id=<key_id>  Key ID of the keypair to use

Options:
  --description=<text>  Description on why the container is being acted on
  -d, --network=<text>  Specify which deployment target to use
  -h, --help            Show this message and exit

The resume command (chr deployment container resume) resumes a paused container.