Prathamesh Musale
ceae9fe8d4
Part of [Create bridge channel in go-nitro](https://www.notion.so/Create-bridge-channel-in-go-nitro-22ce80a0d8ae4edb80020a8f250ea270) - Remove `go-nitro` repo from `bridge` and `nitro-node` stacks - Add a separate image for Nitro contracts deployment - Update `go-nitro` Dockerfile to: - Fetch `nitro` and `bridge` binaries from <https://git.vdb.to/cerc-io/nitro> instead of building from source - Use `ubuntu:latest` as base image instead of `deban:bullsye-slim` - Update `nitro-client` Dockerfile to: - Install `nitro-rpc-client` package from `git.vdb.to/cerc-io` instead of building from source Co-authored-by: Adw8 <adwaitgharpure@gmail.com> Co-authored-by: Shreerang Kale <shreerangkale@gmail.com> Reviewed-on: #12 Co-authored-by: Prathamesh Musale <prathamesh@noreply.git.vdb.to> Co-committed-by: Prathamesh Musale <prathamesh@noreply.git.vdb.to>
61 lines
1.4 KiB
Markdown
61 lines
1.4 KiB
Markdown
# 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 --git-ssh --pull
|
|
```
|
|
Make sure you have access to the `go-nitro` repository
|
|
|
|
- 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=TestToken
|
|
|
|
TOKEN_SYMBOL=TST
|
|
|
|
INITIAL_TOKEN_SUPPLY=129600
|
|
```
|
|
|
|
## Start the deployment
|
|
|
|
```bash
|
|
laconic-so deployment --dir nitro-contracts-deployment start
|
|
```
|