Skip to content
Simple scripts to create a Komodo Smart Chain using a single node for testing
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Simple scripts to create a Komodo Smart Chain using a single node for testing

This repository automates the steps described in the doc:

Assumes Ubuntu desktop environment, may need tweaks for others

Clone the repository and navigate into it.

Step 1

Create a file named data and add the following contents:

launch="komodod -ac_name=$name -ac_supply=10"
  • name is the Smart Chain's desired name
  • srcdir is the absolute location of the directory which contains komodod and komodo-cli
  • launch is the custom launch parameters of the Smart Chain, don't include -pubkey or -addnode
  • datadir is the absolute location of the directory to which the data directories of the second daemons are saved, no need to create it, the script will do it for you

Step 2

Create a file named keys and add the following contents:

  • pubkey1 and privkey1 are a pair of keys used to launch the first daemon
  • pubkey2 and privkey2 are a pair of keys used to launch the second daemon

Step 3

Execute the script, it will launch two terminals each with a daemon running. It also imports the privkey corresponding to the pubkey for the respective daemons. Use the scripts c1 and c2 to interact with the 1st and 2nd daemons respectively.


./c1 getinfo # Get info of the first daemon
./c2 setgenerate true 1 # Start mining with the second daemon
./c2 getbalance # Get balance of the second daemon

Use the stop method to gracefully stop the daemons.

The script can be used to both create new Smart Chains or to launch an existing one.

Note: Executing explorer installs the explorer too


Once the initial launch is done and the daemons have been shut down, the script can be used to launch the daemons and start mining on the first daemon


To stop both the daemons, use the script


For the first time any of the indexes: address,transaction,spent are added to the conf file, a reindex is needed. Use the script to do that. It also opens the debug.log corresponding to the daemon being reindexed in a new terminal.


./ # reindexes both daemons
./ 1 # reindexes the first daemon
./ 2 # reindexes the second daemon


Use to install the explorer for your assetchain. You can use the command ./ explorer to start the explorer along with the coin daemons after it has been installed.


To remove the Smart Chain completely, execute the script. It removes the data directories of both the daemons, the explorer script and explorer installation. This is typically done to start another Smart Chain with the same name. To target the removal of a Smart Chain other than the one described in the data file, use ./ SMARTCHAIN-NAME

You can’t perform that action at this time.