diff --git a/app/app.go b/app/app.go index c20931ab..71a82b7c 100644 --- a/app/app.go +++ b/app/app.go @@ -28,7 +28,8 @@ import ( const ( appName = "kava" // DefaultKeyPass contains the default key password for genesis transactions - DefaultKeyPass = "12345678" + DefaultKeyPass = "12345678" + Bech32MainPrefix = "k" ) // default home directories for expected binaries diff --git a/cmd/kvcli/main.go b/cmd/kvcli/main.go index 37a877e9..975c9240 100644 --- a/cmd/kvcli/main.go +++ b/cmd/kvcli/main.go @@ -54,9 +54,9 @@ func main() { // Read in the configuration file for the sdk config := sdk.GetConfig() - config.SetBech32PrefixForAccount(sdk.Bech32PrefixAccAddr, sdk.Bech32PrefixAccPub) - config.SetBech32PrefixForValidator(sdk.Bech32PrefixValAddr, sdk.Bech32PrefixValPub) - config.SetBech32PrefixForConsensusNode(sdk.Bech32PrefixConsAddr, sdk.Bech32PrefixConsPub) + config.SetBech32PrefixForAccount(app.Bech32MainPrefix, app.Bech32MainPrefix+sdk.PrefixPublic) + config.SetBech32PrefixForValidator(app.Bech32MainPrefix+sdk.PrefixValidator+sdk.PrefixOperator, app.Bech32MainPrefix+sdk.PrefixValidator+sdk.PrefixOperator+sdk.PrefixPublic) + config.SetBech32PrefixForConsensusNode(app.Bech32MainPrefix+sdk.PrefixValidator+sdk.PrefixConsensus, app.Bech32MainPrefix+sdk.PrefixValidator+sdk.PrefixConsensus+sdk.PrefixPublic) config.Seal() // TODO: setup keybase, viper object, etc. to be passed into diff --git a/cmd/kvd/main.go b/cmd/kvd/main.go index 004ca350..520badc4 100644 --- a/cmd/kvd/main.go +++ b/cmd/kvd/main.go @@ -31,9 +31,9 @@ func main() { cdc := app.MakeCodec() config := sdk.GetConfig() - config.SetBech32PrefixForAccount(sdk.Bech32PrefixAccAddr, sdk.Bech32PrefixAccPub) - config.SetBech32PrefixForValidator(sdk.Bech32PrefixValAddr, sdk.Bech32PrefixValPub) - config.SetBech32PrefixForConsensusNode(sdk.Bech32PrefixConsAddr, sdk.Bech32PrefixConsPub) + config.SetBech32PrefixForAccount(app.Bech32MainPrefix, app.Bech32MainPrefix+sdk.PrefixPublic) + config.SetBech32PrefixForValidator(app.Bech32MainPrefix+sdk.PrefixValidator+sdk.PrefixOperator, app.Bech32MainPrefix+sdk.PrefixValidator+sdk.PrefixOperator+sdk.PrefixPublic) + config.SetBech32PrefixForConsensusNode(app.Bech32MainPrefix+sdk.PrefixValidator+sdk.PrefixConsensus, app.Bech32MainPrefix+sdk.PrefixValidator+sdk.PrefixConsensus+sdk.PrefixPublic) config.Seal() ctx := server.NewDefaultContext()