Setting up and running a HyperChain using the Avalanche network. This project provides a simple and straightforward process to initialize, configure, and interact with your own HyperChain.
Run the following command inside your project folder to normalize all dependencies:
go mod tidy
Edit the consts/consts.go
file and fill in the missing parts:
const (
HRP = "Thirdtoken"
Name = "ThirdWeb"
Symbol = "TWB"
)
Go to registry/registry.go
and register the CreateAsset
and MintAsset
actions:
consts.ActionRegistry.Register(&actions.CreateAsset{}, actions.UnmarshalCreateAsset, false)
consts.ActionRegistry.Register(&actions.MintAsset{}, actions.UnmarshalMintAsset, false)
Make sure Go is on your path. If not, run:
export PATH=$PATH:$(go env GOPATH)/bin
# OR
export PATH=$PATH:/usr/local/go/bin
Run the following commands:
MODE="run-single" ./scripts/run.sh
./scripts/build.sh
Load the demo private key included in the project:
./build/token-cli key import demo.pk
./build/token-cli chain import-anr
./build/token-cli action create-asset
./build/token-cli action mint-asset
./build/token-cli key balance
To stop the Local Avalanche Network, run:
killall avalanche-network-runner
If you encounter any issues, refer to the README file or run the appropriate command for helper information.
- Rudra Pratap Singh
This project is licensed under the MIT License - see the LICENSE file for details.