From 1b77abed4da16b40943174f3098a2a21f845c6d4 Mon Sep 17 00:00:00 2001 From: Adam Avramov Date: Fri, 20 Oct 2023 02:18:15 +0300 Subject: [PATCH] docs: clarify deploy in readme --- README.md | 41 ++++++++++++++++++++++++++++++----------- 1 file changed, 30 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 8099ab65836..5736e450b25 100644 --- a/README.md +++ b/README.md @@ -40,34 +40,53 @@ $ npx @hackbg/fadroma@1.5.6 create This will create a new project repository with the required dependencies. -``` +```shell # Add a contract to the project: $ npm exec fadroma add ``` ## Deploy your project +Use the `deploy` command to deploy your project: + ```shell -# Deploy the project, or update the current deployment: -$ npm exec fadroma deploy [...ARGS] +# Deploy your project to a local container: +$ npm exec devnet deploy [...ARGS] -# Deploy everything anew: -$ npm exec fadroma redeploy [...ARGS] +# Deploy your project to testnet: +$ npm exec testnet deploy [...ARGS] + +# Deploy your project to mainnet: +$ npm exec mainnet deploy [...ARGS] ``` If deploying fails, you should be able to re-run `deploy` and continue where you left off. -Correspondingly, running `deploy` on a completed deployment will do nothing unless you've -changed the description of the deployment. + +Running `deploy` on a completed deployment will do nothing (unless you've updated the +description of the deployment, in which case it will try to apply the updates). +To deploy everything anew, use `redeploy`: + +```shell +# Deploy everything anew: +$ npm exec mainnet redeploy [...ARGS] +``` Deploying a project results in a [deploy receipt](#deploy-receipts) being created - -a simple file containing the state of the deployment. +a simple file containing the state of the deployment. You can have more than one of +these, corresponding to multiple independent deployments of the same code. To see +a list of them, use the `list` command: + +```shell +# Select another deployment +$ npm exec mainnet list +``` -Since you can have more than one deployment of a project per chain, the newly created deployment -will also be marked as active. +After a deploy, the newly created deployment will be marked as *active*. To switch +to another deployment, use the `select` command: ```shell # Select another deployment -$ npm exec fadroma select my-deployment +$ npm exec mainnet select my-deployment ``` Deployments in YAML multi-document format are human-readable and version control-friendly.