Deploy a VM
After you have created your Multi-Chain Network, you can deploy a VM on it.
The pre-requisite for this tutorial is that you have already added a Juneo Supernet validator node, created a Multi-Chain Network and added a MCN validator.
We will be using the example files found in the repository juneogo-examples to deploy an EthereumVM on our existing MCN.
Deploying a VM
Assuming you have followed the steps for creating a supernet, you should have the juneojs-examples folder available. Open juneojs-examples directory in a code editor of your choice, create a .env file from the provided .env.example, and paste your mnemonic phrase in the MNEMONIC variable. Example:
Next, open the file ./src/supernet/createChain.ts
. Please find and update the following variables to contain the correct values. Example:
Never use the same chainId value more than once- this can cause unexpected errors for your MCN chains in the future.
Please make sure to specify the chainId
variable to a value that is not already taken by another chain.
For the Socotra Testnet, please use a random number from 200,000 - 299,999.
For Mainnet, please use a number starting from 45,015.
Avoid assigning thechainId
variable a number with repetative digits (such as 224455, 222444, 222222, 242424 or similar).
After this, execute this file in the command line using ts-node:
Your command line output should resemble the following, indicating that your VM was successfully deployed:
Indexation of your chain on the explorer
For your chain to be eligible for indexation on the explorer, you will need to disable pruning for your newly created chain, allowing archive node functionality. This is done by creating a config.json
file on your Juneo Supernet validator node in the location .juneogo/configs/chains/chainId.
For a chain which has the id of 2LxhUB7z7yxvBkHiiwp8MrALgy7rka3y6MriL2JAeX858wUK5D
, you would execute the following commands from the home directory:
Next, paste the following inside the config.json
file:
In addition to this, it is required that your node accepts API calls from remote machines. For this, we have to make updates to the config.json
file our node is using.
This file should include the http-host
config flag, and it's value should be set to your public IP address. Example:
If you are using juneogo-docker to run your node, the http-host
flag should remain unchanged.
Following the previous steps from the documentation, this config.json
file should include the following lines:
After updating this file, please re-start your node.
The next step is to submit your MCN and Blockchain data to us for indexation.
Before proceeding with the next step, please perform a few transactions on your chain using MetaMask, such as sending some tokens to any address.
Please submit your MCN and Blockchain information to us in the following format:
Please use unique descriptive names for your MCN and Blockchain. Avoid names such as "Test Supernet" or "Test Blockchain".
Example:
Last updated