How to Deploy a Local Development Node

1. Download the binary release

Download the latest binary release and drop the binaries into your path:

$ tar xf microtick-v1.0.0-linux-x86_64.tar.gz
$ sudo cp mtd mtcli /usr/bin


2. Choose an empty directory for your testnet

The directory can be anywhere:

$ export MTROOT=$HOME/mylocaltestnet
$ mkdir -p $MTROOT
$ mtd init localnode --chain-id mylocalchain

3. Add a Bitcoin market and a couple trading durations

Edit the newly created file $MTROOT/mtd/config/genesis.json and add some markets and durations:

Set app_state.microtick.markets => [{name:"XBTUSD",description:"Crypto - Bitcoin"}]
Set app_state.microtick.durations => [{name:"5minute",seconds:300},{name:"15minute",seconds:900},{name:"1hour",seconds:3600}]

If you have the tool 'jq' and 'sponge' installed (sudo apt-get install jq moreutils), you can issue the following commmands:

$ TRANSFORMS='.app_state.microtick.markets=[{name:"XBTUSD",description:"Crypto - Bitcoin"}]'
$ TRANSFORMS+='|.app_state.microtick.durations=[{name:"5minute",seconds:300},{name:"15minute",seconds:900},{name:"1hour",seconds:3600}]'
$ jq "$TRANSFORMS" $MTROOT/mtd/config/genesis.json | sponge $MTROOT/mtd/config/genesis.json

4. Create your local accounts, fund them and run the node

Now, generate a default validator and a default bank account, and run the node:

$ mtcli config chain-id mylocalchain
$ mtcli config keyring-backend file
$ mtcli keys add validator
$ mtcli keys add bank
$ mtd add-genesis-account validator 1000000000000stake --keyring-backend file
$ mtd add-genesis-account bank 1000000000000udai --keyring-backend file
$ mtd gentx --name validator --amount 1000000000000stake --keyring-backend file
$ mtd collect-gentxs
$ mtd start

Questions? The Microtick Telegram chat link is: https://t.me/microtick_general