Examples of bootstraping Cosmos networks:
$ CHAIN_ID=888 DENOM=inj ./test/cosmos/multinode.sh injectived
$ CHAIN_ID=somm DENOM=samoleans STAKE_DENOM=stake SCALE_FACTOR=000000 ./test/cosmos/multinode.sh sommelier
Full list of the supported ENV variables:
CHAIN_ID
- specifies Cosmos Chain ID, likecosmos-1
CHAIN_DIR
- is a prefix for all data dirs and logs, will be removed ifCLEANUP=1
DENOM
- Cosmos coin denom, the default coin of the network. Examples:uatom
,aphoton
,samoleans
etcSTAKE_DENOM
- Cosmos coin denom that is used for staking and governance. On the Cosmos Hub it'sstake
. Defaults to value ofDENOM
in the script.SCALE_FACTOR
- Scale factor for the Cosmos coin. Defaults to 1e18 to reflect Ethereum token balances. Use000000
to follow Cosmos uatom (1e6) style.CLEANUP
- if this option set to1
, then theCHAIN_DIR
will be removed in the most unsafe manner.LOG_LEVEL
- sets the log level of the Cosmos node configuration. Defaults to Cosmos' default (main:info,state:info,statesync:info,*:error
).
Important: it is safe to run the script multiple times, it will stop nodes upon running, and optionally cleanup the state. If the state is not empty, the script will start nodes without running initialization again. So it could be used for manually retriable tests.
The script imports 3 validator accounts and 1 user account, specified by mnemonics in the script itself. Each validator account accessible as val
on the corresponding nodes, and user account is shared across all three nodes as user
.