Build

This tutorial explains the process of building and running an InfraEVM parachain.

Before you begin

Before getting started, make sure to do the following:

InfraEVM Chain

If you have completed the previous tutorial, you should have the InfraRelayChain repository on your local machine.

  1. Open your computer's terminal shell.

  2. Clone the InfraBlockchain EVM chain repository by running the following command:

    git clone https://github.com/InfraBlockchain/infra-evm-parachain

    This command clones the master branch.

  3. Navigate to the root of the node template directory by running the following command:

    cd infra-evm-substrate

    Create a new branch for your work with the following command:

    git switch -c my-learning-branch-yyyy-mm-dd

    Replace yyyy-mm-dd with your desired identification information. It is recommended to use a numeric year-month-day format. For example:

    git switch -c my-learning-branch-2023-03-01
  4. Compile the node template by running the following command:

    cargo build --release

    Always use the --release flag for optimized builds. If you are compiling it for the first time, it may take some time to complete.

    When you see a similar line as the following, it means it's finished:

    Finished release [optimized] target(s) in 11m 23s

Starting the Local Node

Once the node is compiled, you are ready to set up the relay chain and InfraDID chain in a local environment.

To start the local InfraDID chain, follow these steps:

  1. Check the ZombieNet configuration by running:

    Ensure that the default_command path under [relaychain] and [parachains] matches the actual local paths.

    If they do not match, modify them to fit your local environment.

  2. Execute ZombieNet to spawn the relay chain and chain:

  3. If everything runs successfully, you should see a terminal shell similar to the following:

    zombienet
  4. (Optional) If you check the nodes of InfraEVM chain, you should see logs similar to the following:

    This confirms that InfraEVM chain is operational.

Next steps

Last updated