Configure a local IoTeX Testnet

Build the node server

Before you start your journey as an IoTeX developer, you need an IoTeX Gateway node to serve as an endpoint, that you can use to interact with the blockchain. While IoTeX provides official gateway nodes both to interact with Mainnet and Testnet, in this guide we will configure our own local Testnet, which will also include pre-generated accounts with some balance to start with.
To configure an IoTeX blockchain node locally on your computer, you will need git and Golang installed: you can get more instructions on GitHub.
Clone and build the IoTeX Full-Node code (iotex-core)
1
git clone https://github.com/iotexproject/iotex-core.git
2
cd iotex-core
3
make
Copied!

Add a test account with an initial balance

Now that the node executable is built in the .bin/ directory, the last step is to add an initial test account preloaded with IOTX tokens. We will use our dev-acc account:
1
$ ioctl account list
2
3
io1a8r9fvu6e3vthfaqvnxlhc6eavsm6t8a2cwtud - dev-acc
Copied!
edit the genesis file ./config/standalone-genesis.yaml and add this account to the initBalances section:
1
account:
2
initBalances:
3
# overwrite with your test address
4
io1a8r9fvu6e3vthfaqvnxlhc6eavsm6t8a2cwtud: "100000000000000000000000000000000000"
Copied!
we can now start our Testnet using the STANDALONE mode to simulate a full blockchain in a single node:
1
make run
Copied!
Last modified 4mo ago