2024-08-26 14:00:02 +00:00
|
|
|
# nitro-contracts
|
|
|
|
|
|
|
|
## Setup
|
|
|
|
|
|
|
|
- Clone the stack repo:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
laconic-so fetch-stack git.vdb.to/cerc-io/nitro-stack
|
|
|
|
```
|
|
|
|
|
|
|
|
- Clone required repositories:
|
|
|
|
|
|
|
|
```bash
|
2024-10-17 07:46:14 +00:00
|
|
|
laconic-so --stack ~/cerc/nitro-stack/stack-orchestrator/stacks/nitro-contracts setup-repositories --git-ssh --pull
|
2024-08-26 14:00:02 +00:00
|
|
|
```
|
2024-10-17 07:46:14 +00:00
|
|
|
Make sure you have access to the `go-nitro` repository
|
2024-08-26 14:00:02 +00:00
|
|
|
|
|
|
|
- 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=
|
|
|
|
|
2024-09-30 04:24:38 +00:00
|
|
|
TOKEN_NAME=TestToken
|
2024-08-26 14:00:02 +00:00
|
|
|
|
2024-09-30 04:24:38 +00:00
|
|
|
TOKEN_SYMBOL=TST
|
2024-08-26 14:00:02 +00:00
|
|
|
|
|
|
|
INITIAL_TOKEN_SUPPLY=129600
|
|
|
|
```
|
|
|
|
|
|
|
|
## Start the deployment
|
|
|
|
|
|
|
|
```bash
|
|
|
|
laconic-so deployment --dir nitro-contracts-deployment start
|
|
|
|
```
|