mirror of
https://github.com/planetmint/planetmint-go.git
synced 2025-06-05 21:56:45 +00:00
26 lines
900 B
Go
26 lines
900 B
Go
package cmd
|
|
|
|
import (
|
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
|
|
|
"planetmint-go/app"
|
|
)
|
|
|
|
func initSDKConfig() {
|
|
// Set prefixes
|
|
accountPubKeyPrefix := app.AccountAddressPrefix + "pub"
|
|
validatorAddressPrefix := app.AccountAddressPrefix + "valoper"
|
|
validatorPubKeyPrefix := app.AccountAddressPrefix + "valoperpub"
|
|
consNodeAddressPrefix := app.AccountAddressPrefix + "valcons"
|
|
consNodePubKeyPrefix := app.AccountAddressPrefix + "valconspub"
|
|
|
|
// Set and seal config
|
|
config := sdk.GetConfig()
|
|
config.SetBech32PrefixForAccount(app.AccountAddressPrefix, accountPubKeyPrefix)
|
|
config.SetBech32PrefixForValidator(validatorAddressPrefix, validatorPubKeyPrefix)
|
|
config.SetBech32PrefixForConsensusNode(consNodeAddressPrefix, consNodePubKeyPrefix)
|
|
// Set to PLMNT coin type as defined in SLIP44 (https://github.com/satoshilabs/slips/blob/master/slip-0044.md)
|
|
config.SetCoinType(8680)
|
|
config.Seal()
|
|
}
|