You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+28-8Lines changed: 28 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,34 @@
2
2
3
3
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.
4
4
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:
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
+
5
33
## How to use
6
34
7
35
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
26
54
27
55
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.
28
56
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.
0 commit comments