logoAcademy

Build and Run Custom Genesis EVM

Learn how to build and run your blockchain with custom genesis file.

Build the Precompile-EVM

In the root of your Precompile-EVM, run the following script:

./scripts/build.sh

Start an Avalanche Network with a New Blockchain

You can run your Precompile-EVM by using the Avalanche CLI.

First, create the configuration for your blockchain:

avalanche blockchain create myblockchain --custom --vm $AVALANCHEGO_PLUGIN_PATH/srEXiWaHuhNyGwPUi444Tu47ZEDwxTWrbQiuD7FmgSAQ6X7Dy --genesis ./.devcontainer/genesis-example.json
Make sure you replace the binary name with the actual binary name of your Precompile-EVM, and genesis file with the actual path to your genesis file.

Next, launch the Avalanche L1 with your custom VM:

avalanche blockchain deploy myblockchain

After around 1 minute, the blockchain should have been created, and additional output will appear in the terminal. You'll also see the RPC URL of your blockchain in the terminal.

On this page