Skip to content

Commit 0baf3f1

Browse files
Add Dev Container and Avalanche Academy course to Readme (#33)
* Add Dev Container Instructions to Readme * Add link to Avalanche Academy course * Update README.md Co-authored-by: rodrigo <[email protected]> Signed-off-by: Martin Eckardt <[email protected]> * Update README.md Co-authored-by: rodrigo <[email protected]> Signed-off-by: Martin Eckardt <[email protected]> * Update README.md Co-authored-by: rodrigo <[email protected]> Signed-off-by: Martin Eckardt <[email protected]> * Update README.md Co-authored-by: rodrigo <[email protected]> Signed-off-by: Martin Eckardt <[email protected]> * Update README.md Co-authored-by: rodrigo <[email protected]> Signed-off-by: Martin Eckardt <[email protected]> --------- Signed-off-by: Martin Eckardt <[email protected]> Co-authored-by: rodrigo <[email protected]>
1 parent 26a5f17 commit 0baf3f1

File tree

1 file changed

+28
-8
lines changed

1 file changed

+28
-8
lines changed

README.md

Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,34 @@
22

33
Precompile-EVM is a repository for registering precompiles to Subnet-EVM without forking the Subnet-EVM codebase. Subnet-EVM supports registering external precompiles through `precompile/modules` package. By importing Subnet-EVM as a library, you can register your own precompiles to Subnet-EVM and build it together with Subnet-EVM.
44

5+
## Environment Setup
6+
7+
To effectively build, run, and test Precompile-EVM, the following is a (non-exhaustive) list of dependencies that you will need:
8+
- Golang
9+
- Node.js
10+
- [AvalancheGo](https://github.com/ava-labs/avalanchego)
11+
- [Avalanche Network Runner](https://github.com/ava-labs/avalanche-network-runner)
12+
13+
To get started easily, we provide a Dev Container specification, that can be used using GitHub Codespace or locally using Docker and VS Code. DevContainers are a concept that utilizes containerization (via Docker containers) to create consistent and isolated development environment. We can access this environment through VS code, which allows for the development experience to feel as if you were developing locally..
14+
15+
### Dev Container in Codespace
16+
17+
Codespaces is a development environment service offered by GitHub that allows developers to write, run, test, and debug their code directly on a cloud machine provided by GitHub. The developer can edit the code through a VS Code running in the browser or locally.
18+
19+
To run a Codespace click on the **Code** and switch to the **Codespaces** tab. There, click **Create Codespace on branch [...]**.
20+
21+
### Local Dev Container
22+
23+
In order to run the Dev Container locally:
24+
25+
- Install VS Code, Docker and the [Dev Container Extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers)
26+
- Clone the Repository
27+
- Open the Container by issuing the Command "Dev Containers: Reopen in Container" in the VS Code command palette (on Mac-OS, run [Cmd + Shift + P]).
28+
29+
## Learn about Precompile-EVM
30+
31+
To get a comprehensive introduction to Precompile-EVM, take the Avalanche Academy course on [Customizing the EVM](https://academy.avax.com/course/customize-evm).
32+
533
## How to use
634

735
There is an example branch [hello-world-example](https://github.com/ava-labs/precompile-evm/tree/hello-world-example) in this repository. You can check the example branch to see how to register precompiles and test them.
@@ -26,14 +54,6 @@ You can create contract tests in `contracts/test` with the Hardhat test framewor
2654

2755
In order to upgrade the Subnet-EVM version, you need to change the version in `go.mod` and `scripts/versions.sh`. You can also change the AvalancheGo version through `scripts/versions.sh` as well. Then you can run `./scripts/build.sh` to build the plugin with the new version.
2856

29-
Furthermore, for developers using the provided DevContainer, you will also need to change the version of AvalancheGo built by the container. This can be done by modifying the following line in `.devcontainer/Dockerfile`:
30-
31-
```
32-
RUN git clone -b v1.10.5 https://github.com/ava-labs/avalanchego.git $GOPATH/src/github.com/ava-labs/avalanchego
33-
```
34-
35-
In particular, you will want to change `v.1.10.5` to whichever version of AvalancheGo you want to change to.
36-
3757
## AvalancheGo Compatibility
3858

3959
```text

0 commit comments

Comments
 (0)