Skip to content

Instantly share code, notes, and snippets.

View sorawit's full-sized avatar

Sorawit Suriyakarn sorawit

View GitHub Profile
@sorawit
sorawit / keybase.md
Created May 21, 2020 07:23
keybase.md

Keybase proof

I hereby claim:

  • I am sorawit on github.
  • I am sorawit_s (https://keybase.io/sorawit_s) on keybase.
  • I have a public key whose fingerprint is F8EA 5EF9 05C0 AEC2 D4D0 A445 49C2 42AD C7BA D311

To claim this, I am signing this object:

@sorawit
sorawit / create_account_and_init_chain.sh
Created April 20, 2020 10:25
create_account_and_init_chain.sh
# Create a new Band wallet. Do not lose your mnemonic!
bandcli keys add [[YOUR_WALLET]]
# Initialize a blockchain environment for generating genesis transaction.
bandd init --chain-id band-wenchang-testnet2 [[YOUR_MONIKER]]
# Install bandd, change its permission, and move to /usr/local/bin
wget -O bandd https://github.com/bandprotocol/bandchain/releases/download/v0.2.0-rc2/bandd_linux_amd64
chmod +x bandd
sudo mv bandd /usr/local/bin
# Install bandcli, change its permission, and move to /usr/local/bin
wget -O bandcli https://github.com/bandprotocol/bandchain/releases/download/v0.2.0-rc2/bandcli_linux_amd64
chmod +x bandcli
sudo mv bandcli /usr/local/bin
sudo systemctl enable bandd
sudo systemctl start bandd
[Unit]
Description=BandChain Node Daemon
After=network-online.target
[Service]
User=ubuntu
ExecStart=/usr/local/bin/bandd start
Restart=always
RestartSec=3
LimitNOFILE=4096
# Download genesis file from the repository.
wget https://raw.githubusercontent.com/bandprotocol/launch/master/band-wenchang-testnet2/genesis.json
# Move the genesis file to the proper location
mv genesis.json $HOME/.bandd/config
# OPTIONAL: Set minimum gas price to 0.005uband
# sed -E -i \
# 's/minimum-gas-prices = \".*\"/minimum-gas-prices = \"0.005uband\"/' \
# $HOME/.bandd/config/app.toml
# Create a new Band wallet. Do not lose your mnemonic!
bandcli keys add [[YOUR_WALLET]]
# Initialize a blockchain environment for generating genesis transaction.
bandd init --chain-id band-wenchang-testnet2 [[YOUR_MONIKER]]
# Add your account as a genesis account so gentx won't complain.
bandd add-genesis-account $(bandcli keys show [[YOUR_WALLET]] -a) 1000000uband
# Create your genesis transaction with 1000000uband initial staking.
# Install bandd, change its permission, and move to /usr/local/bin
wget -O bandd https://github.com/bandprotocol/bandchain/releases/download/v0.2.0-rc/bandd_linux_amd64
chmod +x bandd
sudo mv bandd /usr/local/bin
# Install bandcli, change its permission, and move to /usr/local/bin
wget -O bandcli https://github.com/bandprotocol/bandchain/releases/download/v0.2.0-rc/bandcli_linux_amd64
chmod +x bandcli
sudo mv bandcli /usr/local/bin
sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get install -y wget
apt-get update -y
apt-get upgrade -y
apt-get install -y build-essential git wget curl jq
wget https://dl.google.com/go/go1.13.7.linux-amd64.tar.gz
tar -xvf go1.13.7.linux-amd64.tar.gz
mv go /usr/local/
echo "export GOROOT=/usr/local/go" >> ~/.bashrc
echo "export GOPATH=$HOME/go" >> ~/.bashrc
echo "export PATH=$GOPATH/bin:$GOROOT/bin:$PATH" >> ~/.bashrc
source ~/.bashrc