-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(zetaclient)!: cli improvements (#3122)
* Consolidate files and logic within zetaclientd cli * Update `init` command * Consolidate TSS commands * Drop HSM cli (#3118) * Move p2p diagnostic to tss package * Refactor relayer commands * Rename init config * Restructure inbound cmd * Update changelog * Drop p2p diagnostics * lint & pr comments [1] * Address pr comments [2]
- Loading branch information
Showing
21 changed files
with
540 additions
and
558 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 was deleted.
Oops, something went wrong.
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,36 @@ | ||
// Package cmd provides cosmos constants for ZetaClient. | ||
package cmd | ||
|
||
import ( | ||
"sync" | ||
|
||
cosmos "github.com/cosmos/cosmos-sdk/types" | ||
) | ||
|
||
const ( | ||
Bech32PrefixAccAddr = "zeta" | ||
Bech32PrefixAccPub = "zetapub" | ||
Bech32PrefixValAddr = "zetav" | ||
Bech32PrefixValPub = "zetavpub" | ||
Bech32PrefixConsAddr = "zetac" | ||
Bech32PrefixConsPub = "zetacpub" | ||
DenomRegex = `[a-zA-Z][a-zA-Z0-9:\\/\\\-\\_\\.]{2,127}` | ||
ZetaChainHDPath string = `m/44'/60'/0'/0/0` | ||
) | ||
|
||
var setupConfig sync.Once | ||
|
||
// SetupCosmosConfig configures basic Cosmos parameters. | ||
// This function is required because some parts of ZetaClient rely on these constants. | ||
func SetupCosmosConfig() { | ||
setupConfig.Do(setupCosmosConfig) | ||
} | ||
|
||
func setupCosmosConfig() { | ||
config := cosmos.GetConfig() | ||
config.SetBech32PrefixForAccount(Bech32PrefixAccAddr, Bech32PrefixAccPub) | ||
config.SetBech32PrefixForValidator(Bech32PrefixValAddr, Bech32PrefixValPub) | ||
config.SetBech32PrefixForConsensusNode(Bech32PrefixConsAddr, Bech32PrefixConsPub) | ||
config.SetFullFundraiserPath(ZetaChainHDPath) | ||
cosmos.SetCoinDenomRegex(func() string { return DenomRegex }) | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.