BitSong
Search…
Join the Testnet
Make sure to have the `go-bitsong testnet version`.

Install `go-bitsong-testnet`

Pre-requisites

  • Ubuntu 20.04
  • Golang v1.17
  • Git

From Source

Open a new terminal and clone the go-bitsong repository
1
git clone https://github.com/bitsongofficial/go-bitsong.git
Copied!
Change to the repository directory
1
cd go-bitsong
Copied!
Checkout the testnet release
1
git checkout testnet
Copied!
Install go-bitsong
1
make install
Copied!

Initialize the chain

1
bitsongd init <moniker> --chain-id=bigbang-test-3
Copied!

Genesis & Seeds

Copy the Genesis File

Fetch the testnet's genesis.json file into bitsongd's config directory.
1
wget -O ~/.bitsongd/config/genesis.json https://raw.githubusercontent.com/bitsongofficial/networks/master/testnet/bigbang-test-3/genesis.json
Copied!

Set persistent peers

Your node needs to know how to find peers. You'll need to add healthy seed nodes to $HOME/.bitsongd/config/config.toml
1
export PEERS="[email protected]:26656"
2
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" ~/.bitsongd/config/config.toml
Copied!

Background Process

To run the node in a background process with automatic restarts, you can use a service manager like systemd. To set this up run the following:
1
sudo tee /etc/systemd/system/bitsongd.service > /dev/null <<EOF
2
[Unit]
3
Description=BitSong Network Daemon
4
After=network-online.target
5
6
[Service]
7
User=$USER
8
ExecStart=$(which bitsongd) start
9
Restart=always
10
RestartSec=3
11
LimitNOFILE=4096
12
13
[Install]
14
WantedBy=multi-user.target
15
EOF
Copied!
Then setup the daemon
1
sudo -S systemctl daemon-reload
2
sudo -S systemctl enable bitsongd
Copied!
We can then start the process and confirm that it is running
1
sudo -S systemctl start bitsongd
2
3
sudo service bitsongd status
Copied!

Create wallet

1
bitsongd keys add <key-name> --keyring-backend test
Copied!
Make a keyring password if prompted. Save your mnemonic somewhere secure! Note your wallet address, you'll use it for future commands.

Get tokens from faucet

1
curl https://faucet.testnet.bitsong.network?address=<wallet-address>
Copied!

Query fantoken params

1
bitsongd query fantoken params --node https://rpc.testnet.bitsong.network:443
Copied!

Issue a new fantoken

1
bitsongd tx fantoken issue \
2
--name "Angelo's Fantoken" \
3
--symbol "angelo" \
4
--max-supply "1000000000" \
5
--issue-fee 1000000ubtsg \
6
--description "The most popular fantoken" \
7
--chain-id bigbang-test-3 \
8
--from <key-name> \
9
-b block \
10
--keyring-backend test \
11
--node https://rpc.testnet.bitsong.network:443
Copied!

Query fantoken by owner

1
bitsongd query fantoken owner bitsong1dw9fdvrc46ed98rndpulem466t0zf0m2gt6zyk --node https://rpc.testnet.bitsong.network:443
Copied!

Query fantoken by denom

1
bitsongd query fantoken denom ft0011B9AE260F69D60438095F95F50AF9976015A9 --node https://rpc.testnet.bitsong.network:443
Copied!

Mint a fantoken

1
bitsongd tx fantoken mint ft0011B9AE260F69D60438095F95F50AF9976015A9 \
2
--recipient <rcpt-address> \
3
--amount 1000 \
4
--chain-id bigbang-test-3 \
5
--from <key-name> \
6
-b block \
7
--keyring-backend test \
8
--node https://rpc.testnet.bitsong.network:443
Copied!

Burn a fantoken

1
bitsongd tx fantoken burn ft0011B9AE260F69D60438095F95F50AF9976015A9 \
2
--amount 1 \
3
--chain-id bigbang-test-3 \
4
--from <key-name> \
5
-b block \
6
--keyring-backend test \
7
--node https://rpc.testnet.bitsong.network:443
Copied!

Edit a fantoken

ATTENTION: If you edit your fantoken to --mintable false it will no longer be possible to make it mintable
1
bitsongd tx fantoken edit ft0011B9AE260F69D60438095F95F50AF9976015A9 \
2
--mintable true \
3
--chain-id bigbang-test-3 \
4
--from <key-name> \
5
-b block \
6
--keyring-backend test \
7
--node https://rpc.testnet.bitsong.network:443
Copied!

Transfer the fantoken creator ownership

1
bitsongd tx fantoken transfer ft0011B9AE260F69D60438095F95F50AF9976015A9 \
2
--recipient <rcpt-address> \
3
--chain-id bigbang-test-3 \
4
--from <key-name> \
5
-b block \
6
--keyring-backend test \
7
--node https://rpc.testnet.bitsong.network:443
Copied!
\