Compare commits

..

3 Commits

4 changed files with 38 additions and 16 deletions

View File

@ -301,7 +301,13 @@
- Create a deployment spec-file for L1 nitro contract: - Create a deployment spec-file for L1 nitro contract:
```bash ```bash
laconic-so --stack ~/cerc/nitro-stack/stack-orchestrator/stacks/nitro-contracts deploy init --output nitro-contracts-spec.yml --config "GETH_URL=http://host.docker.internal:8545,GETH_DEPLOYER_PK=888814df89c4358d7ddb3fa4b0213e7331239a80e1f013eaa7b2deca2a41a218,GETH_CHAIN_ID=1212,TOKEN_NAME=LaconicNetworkToken,TOKEN_SYMBOL=LNT,INITIAL_TOKEN_SUPPLY=129600" laconic-so --stack ~/cerc/nitro-stack/stack-orchestrator/stacks/nitro-contracts deploy init --output nitro-contracts-spec.yml --config "\
GETH_URL=http://host.docker.internal:8545,\
GETH_DEPLOYER_PK=888814df89c4358d7ddb3fa4b0213e7331239a80e1f013eaa7b2deca2a41a218,\
GETH_CHAIN_ID=1212,\
TOKEN_NAME=LaconicNetworkToken,\
TOKEN_SYMBOL=LNT,\
INITIAL_TOKEN_SUPPLY=129600"
``` ```
- Create a deployment `nitro-contracts` from the spec file - Create a deployment `nitro-contracts` from the spec file
@ -315,7 +321,7 @@
```bash ```bash
laconic-so deployment --dir nitro-contracts-deployment start laconic-so deployment --dir nitro-contracts-deployment start
# Check the l1 nitro contract deployments # Check the L1 nitro contract deployments
laconic-so deployment --dir nitro-contracts-deployment logs nitro-contracts -f laconic-so deployment --dir nitro-contracts-deployment logs nitro-contracts -f
``` ```
@ -335,7 +341,20 @@
- Create a spec-file for the deployment, map container ports to host ports and set env variables: - Create a spec-file for the deployment, map container ports to host ports and set env variables:
```bash ```bash
laconic-so --stack ~/cerc/nitro-stack/stack-orchestrator/stacks/bridge deploy init --map-ports-to-host any-same --output bridge-nitro-spec.yml --config "NITRO_L1_CHAIN_URL=ws://host.docker.internal:8546,NITRO_L2_CHAIN_URL=ws://host.docker.internal:9546,NITRO_CHAIN_PK=888814df89c4358d7ddb3fa4b0213e7331239a80e1f013eaa7b2deca2a41a218,NITRO_SC_PK=0279651921cd800ac560c21ceea27aab0107b67daf436cdd25ce84cad30159b4,OPTIMISM_URL=http://host.docker.internal:9545,OPTIMISM_DEPLOYER_PK=$ACCOUNT_PK,TOKEN_NAME=LaconicNetworkToken,TOKEN_SYMBOL=LNT,INITIAL_TOKEN_SUPPLY=129600,NA_ADDRESS=$NA_ADDRESS,VPA_ADDRESS=$VPA_ADDRESS,CA_ADDRESS=$CA_ADDRESS,L1_ASSET_ADDRESS=$L1_ASSET_ADDRESS" laconic-so --stack ~/cerc/nitro-stack/stack-orchestrator/stacks/bridge deploy init --map-ports-to-host any-same --output bridge-nitro-spec.yml --config "\
NITRO_L1_CHAIN_URL=ws://host.docker.internal:8546,\
NITRO_L2_CHAIN_URL=ws://host.docker.internal:9546,\
NITRO_CHAIN_PK=888814df89c4358d7ddb3fa4b0213e7331239a80e1f013eaa7b2deca2a41a218,\
NITRO_SC_PK=0279651921cd800ac560c21ceea27aab0107b67daf436cdd25ce84cad30159b4,\
OPTIMISM_URL=http://host.docker.internal:9545,\
OPTIMISM_DEPLOYER_PK=$ACCOUNT_PK,\
TOKEN_NAME=LaconicNetworkToken,\
TOKEN_SYMBOL=LNT,\
INITIAL_TOKEN_SUPPLY=129600,\
NA_ADDRESS=$NA_ADDRESS,\
VPA_ADDRESS=$VPA_ADDRESS,\
CA_ADDRESS=$CA_ADDRESS,\
L1_ASSET_ADDRESS=$L1_ASSET_ADDRESS"
``` ```
- Create a deployment from the spec file: - Create a deployment from the spec file:

View File

@ -1,15 +1,16 @@
FROM golang:1.21-bullseye AS builder FROM golang:1.21-bullseye AS builder
ARG TARGETPLATFORM
# Install mkcert
RUN curl -JL "https://dl.filippo.io/mkcert/latest?for=$TARGETPLATFORM" -o /usr/local/bin/mkcert && \
chmod +x /usr/local/bin/mkcert
# Copy files into image # Copy files into image
WORKDIR /app WORKDIR /app
COPY . . COPY . .
# Install mkcert RUN go mod download
RUN curl -JLO "https://dl.filippo.io/mkcert/latest?for=linux/amd64"
RUN chmod +x mkcert-v*-linux-amd64
RUN cp mkcert-v*-linux-amd64 /usr/local/bin/mkcert
RUN go mod tidy
# Build the binary # Build the binary
RUN go build -v -o nitro . RUN go build -v -o nitro .

View File

@ -4,7 +4,9 @@ RUN apk --update --no-cache add python3 alpine-sdk bash curl jq
WORKDIR /app WORKDIR /app
COPY . . COPY ./packages packages
COPY ./package.json package.json
COPY ./yarn.lock yarn.lock
RUN echo "Installing dependencies" && \ RUN echo "Installing dependencies" && \
yarn && yarn build yarn && yarn build