-
Notifications
You must be signed in to change notification settings - Fork 240
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
8 changed files
with
79 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package config | ||
|
||
import sdk "github.com/cosmos/cosmos-sdk/types" | ||
|
||
// SetBech32Prefixes sets the global prefixes to be used when serializing addresses and public keys to Bech32 strings. | ||
func SetBech32Prefixes(config *sdk.Config) { | ||
config.SetBech32PrefixForAccount(Bech32PrefixAccAddr, Bech32PrefixAccPub) | ||
config.SetBech32PrefixForValidator(Bech32PrefixValAddr, Bech32PrefixValPub) | ||
config.SetBech32PrefixForConsensusNode(Bech32PrefixConsAddr, Bech32PrefixConsPub) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// +build !testnet | ||
|
||
package config | ||
|
||
import sdk "github.com/cosmos/cosmos-sdk/types" | ||
|
||
const ( | ||
// Bech32Prefix defines the Bech32 prefix used for Cronos Accounts | ||
Bech32Prefix = "crc" | ||
|
||
// Bech32PrefixAccAddr defines the Bech32 prefix of an account's address | ||
Bech32PrefixAccAddr = Bech32Prefix | ||
// Bech32PrefixAccPub defines the Bech32 prefix of an account's public key | ||
Bech32PrefixAccPub = Bech32Prefix + sdk.PrefixPublic | ||
// Bech32PrefixValAddr defines the Bech32 prefix of a validator's operator address | ||
Bech32PrefixValAddr = Bech32Prefix + sdk.PrefixValidator + sdk.PrefixOperator | ||
// Bech32PrefixValPub defines the Bech32 prefix of a validator's operator public key | ||
Bech32PrefixValPub = Bech32Prefix + sdk.PrefixValidator + sdk.PrefixOperator + sdk.PrefixPublic | ||
// Bech32PrefixConsAddr defines the Bech32 prefix of a consensus node address | ||
Bech32PrefixConsAddr = Bech32Prefix + sdk.PrefixValidator + sdk.PrefixConsensus | ||
// Bech32PrefixConsPub defines the Bech32 prefix of a consensus node public key | ||
Bech32PrefixConsPub = Bech32Prefix + sdk.PrefixValidator + sdk.PrefixConsensus + sdk.PrefixPublic | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// +build testnet | ||
|
||
package config | ||
|
||
import sdk "github.com/cosmos/cosmos-sdk/types" | ||
|
||
const ( | ||
// Bech32Prefix defines the Bech32 prefix used for Cronos Accounts | ||
Bech32Prefix = "tcrc" | ||
|
||
// Bech32PrefixAccAddr defines the Bech32 prefix of an account's address | ||
Bech32PrefixAccAddr = Bech32Prefix | ||
// Bech32PrefixAccPub defines the Bech32 prefix of an account's public key | ||
Bech32PrefixAccPub = Bech32Prefix + sdk.PrefixPublic | ||
// Bech32PrefixValAddr defines the Bech32 prefix of a validator's operator address | ||
Bech32PrefixValAddr = Bech32Prefix + sdk.PrefixValidator + sdk.PrefixOperator | ||
// Bech32PrefixValPub defines the Bech32 prefix of a validator's operator public key | ||
Bech32PrefixValPub = Bech32Prefix + sdk.PrefixValidator + sdk.PrefixOperator + sdk.PrefixPublic | ||
// Bech32PrefixConsAddr defines the Bech32 prefix of a consensus node address | ||
Bech32PrefixConsAddr = Bech32Prefix + sdk.PrefixValidator + sdk.PrefixConsensus | ||
// Bech32PrefixConsPub defines the Bech32 prefix of a consensus node public key | ||
Bech32PrefixConsPub = Bech32Prefix + sdk.PrefixValidator + sdk.PrefixConsensus + sdk.PrefixPublic | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters