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 tidyEdit 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/binRun the following commands:
MODE="run-single" ./scripts/run.sh
./scripts/build.shLoad 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 balanceTo stop the Local Avalanche Network, run:
killall avalanche-network-runnerIf 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.