LOGOSNODOS
  • LOGOSNODOS
  • 🖥️Mainnet Node
    • Avail Network
      • ▶️Installation
      • ▶️Staking / Bonding
    • BlockX
      • ▶️Installation
      • ▶️Cheat Sheet
    • Muon Network
      • ▶️Installation
      • ▶️Troubleshooting
    • RaiblocksOne
      • ▶️Installation
      • ▶️Cheat Sheet
    • SGE Network
      • ▶️Installation
      • ▶️Cheat Sheet
    • Quicksilver Protocol
      • ▶️Installation
      • ▶️Cheat Sheet
  • 🛠️TESTNET NODE
    • 0gchain
      • ▶️Installation
      • ▶️Cheat Sheet
    • Airchains
      • ▶️Installation
      • ▶️Cheat Sheet
    • Avail Network
      • ▶️Installation
      • ▶️Challenge Set Identity
      • ▶️Challenge Add Pool
    • Cortensor
      • ▶️Staking and Funding
      • ▶️Installation
      • ▶️Node Management
      • ▶️Monitoring
    • CrossFi
      • ▶️Installation
      • ▶️Cheat Sheet
    • Juneo Network
      • ▶️Installation
      • ▶️Create Supernet
      • ▶️Deploy a VM
    • Namada
      • ▶️Installation
      • ▶️Cheat Sheet
    • Pryzm
      • ▶️Installation
      • ▶️Cheat Sheet
    • Quicksilver Protocol
      • ▶️Installation
      • ▶️Cheat Sheet
    • Swisstronik
      • ▶️Installation
      • ▶️Cheat Sheet
    • Symphony
      • ▶️Installation
      • ▶️Cheat Sheet
  • ⛑️Solidity Compiler
    • Hardhat
      • ▶️Installation
      • ▶️Setup Hardhat on Swisstronik Network
      • ▶️Write and compile the smart contract
      • ▶️Deploy the smart contract
      • ▶️Interact with the contract-Transaction
      • ▶️Interact with the contract-Call
      • ▶️Crafts and Mint Token ERC20
      • ▶️PERC20 (Private ERC20) Deploy, Mint and Transfer.
      • ▶️JSON RPC Call using ETH getStorage
Powered by GitBook
On this page
  • Deploying a VM
  • Indexation of your chain on the explorer

Was this helpful?

  1. TESTNET NODE
  2. Juneo Network

Deploy a VM

Last updated 1 year ago

Was this helpful?

After you have , you can deploy a VM on it.

The pre-requisite for this tutorial is that you have already added a JUNEO validator node, created a Supernet and added a Supernet validator.

We will be using the example files found in the repository to deploy an supernetevm on our existing Supernet.

Please make sure that you have installed on your system, along with the npm package (which will be used to execute the sample code provided in JuneoJS).

Deploying a VM

Assuming you have followed the steps for creating a supernet, you should have the folder available. Open 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:

MNEMONIC="raven whip pave toy benefit moment twin acid wasp satisfy crash april"

Next, open the file ./src/supernet/createChain.ts. Please find and update the following variables to contain the correct values. Example:

const supernetId: string = 'ZxTjijy4iNthRzuFFzMH5RS2BgJemYxwgZbzqzEhZJWqSnwhP' // your supernet id

const chainName: string = 'Chain A'

const chainId: number = 330333

const genesisMintAddress: string = '0x44542FD7C3F096aE54Cc07833b1C0Dcf68B7790C' // your wallet address here

Never use the same chainId value more than once- this can cause unexpected errors for your Supernet chains in the future.

Please make sure to specify the chainId variable to a value that is not already taken by another chain.

For Socotra v1, please use a random number from 300,000 - 399,999. For Socotra v2, please use a random number from 200,000 - 299,999.

For Mainnet, please use a number starting from 450,000.

Avoid assigning thechainId variable a number with repetative digits (such as 334455, 333444, 333333, 343434 or similar).

After this, execute this file in the command line using ts-node:

npx ts-node ./src/supernet/createChain.ts

Your command line output should resemble the following, indicating that your VM was successfully deployed:

Created chain with id: 2LxhUB7z7yxvBkHiiwp8MrALgy7rka3y6MriL2JAeX858wUK5D

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 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:

cd .juneogo

mkdir configs
cd configs

mkdir chains
cd chains

mkdir 2LxhUB7z7yxvBkHiiwp8MrALgy7rka3y6MriL2JAeX858wUK5D
cd 2LxhUB7z7yxvBkHiiwp8MrALgy7rka3y6MriL2JAeX858wUK5D

nano config.json

Next, paste the following inside the config.json file:

{
"pruning-enabled": false,
  "eth-apis": ["public-eth", "public-eth-filter","net","web3","internal-public-eth","internal-public-blockchain","internal-public-transaction-pool","internal-public-debug","debug-tracer"]
}

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:

"http-host":"XXX:XXX:XXX:XXX"

Following the previous steps from the documentation, this config.json file should include the following lines:

{
 "track-supernets":"ZxTjijy4iNthRzuFFzMH5RS2BgJemYxwgZbzqzEhZJWqSnwhP",
 "http-host":"XXX.XXX.XXX.XXX"
}

After updating this file, please re-start your node.

The next step is to submit your Supernet 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 Supernet and Blockchain information to us in the following format:

Supernet
- Name
- Description
- id

Blockchain
- Name 
- Description 
- Currency (in ALL-CAPS format)
- Decimals 
- Host (http://xxx.xxx.xxx.xxx:9650 or with domain name) 
- rpc (http://xxx.xxx.xxx.xxx:9650/ext/bc/id/rpc)
- Logo (min 273x273 or greater.
        In .png format. 
        The width:height ratio should be 1:1)
- id

Please use unique descriptive names for your Supernet and Blockchain. Avoid names such as "Test Supernet" or "Test Blockchain".

If you are using to run your node, the http-host flag should remain unchanged.

🛠️
▶️
created your Supernet
juneogo-examples
Node.JS
ts-node
juneojs-examples
juneojs-examples
juneogo-docker