Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve issue #69 #71

Merged
merged 3 commits into from
Jun 14, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
ARG AVALANCHEGO_VERSION
FROM avaplatform/avalanche-cli:latest as avalanche-cli
FROM ghcr.io/foundry-rs/foundry:latest as foundry
FROM avaplatform/avalanchego:$AVALANCHEGO_VERSION as avalanchego
FROM mcr.microsoft.com/devcontainers/base

COPY --from=avalanchego /avalanchego/build /go/src/github.com/ava-labs/avalanchego/build
COPY --from=avalanche-cli /avalanche /usr/local/bin/avalanche

COPY --from=foundry /usr/local/bin/forge /usr/local/bin/forge
COPY --from=foundry /usr/local/bin/cast /usr/local/bin/cast
COPY --from=foundry /usr/local/bin/anvil /usr/local/bin/anvil
COPY --from=foundry /usr/local/bin/chisel /usr/local/bin/chisel

RUN curl -sSfL https://raw.githubusercontent.com/ava-labs/avalanche-network-runner/main/scripts/install.sh | sh -s
36 changes: 25 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,23 +49,37 @@ You can build your precompile and Subnet-EVM with `./scripts/build.sh`. This scr

### Run

You can run you Precompile-EVM by using Avalanche Network Runner
You can run you Precompile-EVM by using the Avalanche CLI.

First, create the configuration for your subnet.

```bash
avalanche-network-runner server \
--log-level debug \
--port=":8080" \
--grpc-gateway-port=":8081"
avalanche subnet create mysubnet
ashucoder9 marked this conversation as resolved.
Show resolved Hide resolved
✔ Custom
creating custom VM subnet mysubnet
Enter path to custom genesis: ./.devcontainer/genesis-example.json
✔ I already have a VM binary (local network deployments only)
Enter path to VM binary: /go/src/github.com/ava-labs/avalanchego/build/plugins/srEXiWaHuhNyGwPUi444Tu47ZEDwxTWrbQiuD7FmgSAQ6X7Dy
ceyonur marked this conversation as resolved.
Show resolved Hide resolved
✓ Successfully created subnet configuration
```

Then launch a Subnet with your custom VM:
Next, launch the Subnet with your custom VM:

```bash
avalanche-network-runner control start \
--log-level debug \
--endpoint="0.0.0.0:8080" \
--number-of-nodes=5 \
--blockchain-specs '[{"vm_name": "subnetevm", "genesis": "./.devcontainer/genesis-example.json"}]'
avalanche subnet deploy mysubnet
✔ Local Network
Deploying [mysubnet] to Local Network
Backend controller started, pid: 10401, output at: /root/.avalanche-cli/runs/server_20240614_111700/avalanche-cli-backend.log
Installing avalanchego-v1.11.8...
avalanchego-v1.11.8 installation successful

Booting Network. Wait until healthy...
Node logs directory: /root/.avalanche-cli/runs/network_20240614_111713/node<i>/logs
Network ready to use.

Deploying Blockchain. Wait until network acknowledges...

Blockchain ready to use
```

### Test
Expand Down
Loading