From 0e02a5731aee8f0cfe3f8242f8e6dc229cf4f4f0 Mon Sep 17 00:00:00 2001 From: IshaVenikar Date: Fri, 23 Aug 2024 11:42:06 +0530 Subject: [PATCH] Add stack instructions for nitro-contracts --- .../stacks/nitro-contracts/README.md | 60 ++++++++++++++++++- 1 file changed, 59 insertions(+), 1 deletion(-) diff --git a/stack-orchestrator/stacks/nitro-contracts/README.md b/stack-orchestrator/stacks/nitro-contracts/README.md index 88f85d0..9672d92 100644 --- a/stack-orchestrator/stacks/nitro-contracts/README.md +++ b/stack-orchestrator/stacks/nitro-contracts/README.md @@ -1 +1,59 @@ -# TODO: Update README \ No newline at end of file +# nitro-contracts + +## Setup + +- Clone the stack repo: + + ```bash + laconic-so fetch-stack git.vdb.to/cerc-io/nitro-stack + ``` + +- Clone required repositories: + + ```bash + laconic-so --stack ~/cerc/nitro-stack/stack-orchestrator/stacks/nitro-contracts setup-repositories + ``` + +- Build container images: + + ```bash + laconic-so --stack ~/cerc/nitro-stack/stack-orchestrator/stacks/nitro-contracts build-containers + ``` + +## Create a deployment + +- Create a spec file + + ```bash + laconic-so --stack ~/cerc/nitro-stack/stack-orchestrator/stacks/nitro-contracts deploy init --output nitro-contracts-spec.yml + ``` + +- Create deployment + + ```bash + laconic-so --stack ~/cerc/nitro-stack/stack-orchestrator/stacks/nitro-contracts deploy create --spec-file nitro-contracts-spec.yml --deployment-dir nitro-contracts-deployment + ``` + +## Configuration + +- Inside the `nitro-contracts-deployment` deployment directory, open `config.env` file and set following env variables: + + ```bash + # URL endpoint of the L1 chain (Example: http://host.docker.internal:8545) + GETH_URL= + + # Private key of the account on chain that is used for deploying L1 contracts + GETH_DEPLOYER_PK= + + TOKEN_NAME=LaconicNetworkToken + + TOKEN_SYMBOL=LNT + + INITIAL_TOKEN_SUPPLY=129600 + ``` + +## Start the deployment + +```bash +laconic-so deployment --dir nitro-contracts-deployment start +```