If you want to build the band application in this repo to see the functionalities, Go 1.24.0+ is required .
Add some parameters to environment is necessary if you have never used the go mod before.
mkdir -p $HOME/go/bin
echo "export GOPATH=$HOME/go" >> ~/.bash_profile
echo "export GOBIN=\$GOPATH/bin" >> ~/.bash_profile
echo "export PATH=\$PATH:\$GOBIN" >> ~/.bash_profile
echo "export GO111MODULE=on" >> ~/.bash_profile
source ~/.bash_profileNow, you can install and run the application.
# Clone the source of the tutorial repository
git clone https://github.com/bandprotocol/chain
cd chain
# Install the app into your $GOBIN
make install
# Now you should be able to run the following commands:
bandd helpYou can use the following script to generate a test environment to run BandChain locally. This will create the default genesis file with one validator, as well as some test accounts.
./scripts/generate_genesis.shOnce done, you can optionally add data sources or oracle scripts to the genesis file using bandd.
bandd genesis add-data-source ...
bandd genesis add-oracle-script ...You can now start the chain with bandd.
bandd startOn a separate tab, you should run the oracle daemon script to ensure your validator responds to oracle requests.
./scripts/start_yoda.shTo send an oracle request to the chain, use bandd.
bandd tx oracle request [ORACLE_SCRIPT_ID] [ASK_COUNT] [MIN_COUNT] -c [CALLDATA] --from requester --gas auto --keyring-backend test --from requester