Compare commits
No commits in common. "3672d88d77a048d974c8e4e42013d4c166f776d1" and "b3e58e8d748fa3b4c656f80f547d7df25583f345" have entirely different histories.
3672d88d77
...
b3e58e8d74
@ -301,13 +301,7 @@
|
|||||||
- 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 "\
|
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"
|
||||||
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
|
||||||
@ -321,7 +315,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
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -341,20 +335,7 @@
|
|||||||
- 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 "\
|
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"
|
||||||
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:
|
||||||
@ -577,7 +558,7 @@
|
|||||||
- Once direct-fund objective is complete, bridge will create mirrored channel on L2
|
- Once direct-fund objective is complete, bridge will create mirrored channel on L2
|
||||||
|
|
||||||
- Check node A' logs to see bridged-fund objective completed
|
- Check node A' logs to see bridged-fund objective completed
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
laconic-so deployment --dir l2alice-nitro-deployment logs nitro-node -f --tail 30
|
laconic-so deployment --dir l2alice-nitro-deployment logs nitro-node -f --tail 30
|
||||||
|
|
||||||
@ -750,7 +731,7 @@
|
|||||||
```
|
```
|
||||||
|
|
||||||
- Check largest voucher received on the payment channel
|
- Check largest voucher received on the payment channel
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
laconic-so deployment --dir l2charlie-nitro-deployment exec nitro-rpc-client "nitro-rpc-client get-voucher $PAYMENT_CHANNEL_ID -p 4005 -h nitro-node"
|
laconic-so deployment --dir l2charlie-nitro-deployment exec nitro-rpc-client "nitro-rpc-client get-voucher $PAYMENT_CHANNEL_ID -p 4005 -h nitro-node"
|
||||||
|
|
||||||
@ -759,7 +740,7 @@
|
|||||||
# Amount: 200,
|
# Amount: 200,
|
||||||
# ChannelId: '0xb29aeb32c9495a793ebf7bd116232075d1e7bfe89fc82281c7d498e3ffd3e3bf',
|
# ChannelId: '0xb29aeb32c9495a793ebf7bd116232075d1e7bfe89fc82281c7d498e3ffd3e3bf',
|
||||||
# Signature: '0x8fbdb9bb91932b422c30cc07bf422e4f1c3ae1be1b60e01bbfcb193ae5c8f5b0571de84667d87b5ef9b737287faa0ddf41f1f9fc159673205679622c69fd69d81b'
|
# Signature: '0x8fbdb9bb91932b422c30cc07bf422e4f1c3ae1be1b60e01bbfcb193ae5c8f5b0571de84667d87b5ef9b737287faa0ddf41f1f9fc159673205679622c69fd69d81b'
|
||||||
# }
|
# }
|
||||||
```
|
```
|
||||||
|
|
||||||
- Check payment channel status again to view updated channel state
|
- Check payment channel status again to view updated channel state
|
||||||
@ -794,7 +775,7 @@
|
|||||||
```bash
|
```bash
|
||||||
laconic-so deployment --dir l2alice-nitro-deployment exec nitro-rpc-client "nitro-rpc-client get-all-ledger-channels -p 4005 -h nitro-node"
|
laconic-so deployment --dir l2alice-nitro-deployment exec nitro-rpc-client "nitro-rpc-client get-all-ledger-channels -p 4005 -h nitro-node"
|
||||||
|
|
||||||
# Expected output:
|
# Expected output:
|
||||||
# [
|
# [
|
||||||
# {
|
# {
|
||||||
# "ID": "0x6a9f5ccf1fa802525d794f4a899897f947615f6acc7141e61e056a8bfca29179",
|
# "ID": "0x6a9f5ccf1fa802525d794f4a899897f947615f6acc7141e61e056a8bfca29179",
|
||||||
|
@ -3,7 +3,7 @@ name: nitro-bridge
|
|||||||
services:
|
services:
|
||||||
l2-nitro-contracts:
|
l2-nitro-contracts:
|
||||||
image: cerc/nitro-client:local
|
image: cerc/nitro-client:local
|
||||||
restart: on-failure
|
restart: on-failure
|
||||||
environment:
|
environment:
|
||||||
CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG}
|
CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG}
|
||||||
OPTIMISM_DEPLOYER_PK: ${OPTIMISM_DEPLOYER_PK}
|
OPTIMISM_DEPLOYER_PK: ${OPTIMISM_DEPLOYER_PK}
|
||||||
@ -27,7 +27,7 @@ services:
|
|||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
depends_on:
|
depends_on:
|
||||||
l2-nitro-contracts:
|
l2-nitro-contracts:
|
||||||
condition: service_started
|
condition: service_started
|
||||||
environment:
|
environment:
|
||||||
CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG}
|
CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG}
|
||||||
OPTIMISM_CHAIN_ID: ${OPTIMISM_CHAIN_ID:-42069}
|
OPTIMISM_CHAIN_ID: ${OPTIMISM_CHAIN_ID:-42069}
|
||||||
|
@ -1,16 +1,15 @@
|
|||||||
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 . .
|
||||||
|
|
||||||
RUN go mod download
|
# Install mkcert
|
||||||
|
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 .
|
||||||
|
@ -4,9 +4,7 @@ RUN apk --update --no-cache add python3 alpine-sdk bash curl jq
|
|||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
COPY ./packages packages
|
COPY . .
|
||||||
COPY ./package.json package.json
|
|
||||||
COPY ./yarn.lock yarn.lock
|
|
||||||
|
|
||||||
RUN echo "Installing dependencies" && \
|
RUN echo "Installing dependencies" && \
|
||||||
yarn && yarn build
|
yarn && yarn build
|
||||||
|
Loading…
Reference in New Issue
Block a user