@ -146,6 +146,8 @@ func initSetup() {
config.Network = config.Testnet
case "devnet":
config.Network = config.Devnet
default:
panic(fmt.Sprintf("invalid network type: %s", *networkType))
}
// Set port and ip to global config.
@ -10,5 +10,18 @@ const (
Devnet NetworkType = 2
)
func (network NetworkType) String() string {
switch network {
case 0:
return "Mainnet"
case 1:
return "Testnet"
case 2:
return "Devnet"
return "Unknown"
// Network is the type of Harmony network
var Network = Testnet