logoAcademy

Build and Run Custom Genesis Blockchain

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 you Precompile-EVM by using the Avalanche CLI.

First, create the configuration for your subnet.

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 subnet deploy myblockchain

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

Updated:

On this page

Edit on Github