forked from cerc-io/laconicd-deprecated
Merge branch 'main' into sai/upgrade_cosmos_v0.46
This commit is contained in:
@@ -11,11 +11,11 @@ import (
|
||||
"github.com/cosmos/cosmos-sdk/x/genutil/client/cli"
|
||||
|
||||
"github.com/tharsis/ethermint/app"
|
||||
ethermintd "github.com/tharsis/ethermint/cmd/ethermintd"
|
||||
chibaclonkd "github.com/tharsis/ethermint/cmd/chibaclonkd"
|
||||
)
|
||||
|
||||
func TestInitCmd(t *testing.T) {
|
||||
rootCmd, _ := ethermintd.NewRootCmd()
|
||||
rootCmd, _ := chibaclonkd.NewRootCmd()
|
||||
rootCmd.SetArgs([]string{
|
||||
"init", // Test the init cmd
|
||||
"etherminttest", // Moniker
|
||||
@@ -5,16 +5,11 @@ import (
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/server"
|
||||
svrcmd "github.com/cosmos/cosmos-sdk/server/cmd"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
|
||||
"github.com/tharsis/ethermint/app"
|
||||
cmdcfg "github.com/tharsis/ethermint/cmd/config"
|
||||
)
|
||||
|
||||
func main() {
|
||||
setupConfig()
|
||||
cmdcfg.RegisterDenoms()
|
||||
|
||||
rootCmd, _ := NewRootCmd()
|
||||
|
||||
if err := svrcmd.Execute(rootCmd, "", app.DefaultNodeHome); err != nil {
|
||||
@@ -27,11 +22,3 @@ func main() {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func setupConfig() {
|
||||
// set the address prefixes
|
||||
config := sdk.GetConfig()
|
||||
cmdcfg.SetBech32Prefixes(config)
|
||||
cmdcfg.SetBip44CoinType(config)
|
||||
config.Seal()
|
||||
}
|
||||
@@ -41,7 +41,7 @@ import (
|
||||
ethermint "github.com/tharsis/ethermint/types"
|
||||
)
|
||||
|
||||
const EnvPrefix = "ETHERMINT"
|
||||
const EnvPrefix = "CHIBACLONK"
|
||||
|
||||
// NewRootCmd creates a new root command for simd. It is called once in the
|
||||
// main function.
|
||||
@@ -60,8 +60,8 @@ func NewRootCmd() (*cobra.Command, params.EncodingConfig) {
|
||||
WithViper(EnvPrefix)
|
||||
|
||||
rootCmd := &cobra.Command{
|
||||
Use: "ethermintd",
|
||||
Short: "Ethermint Daemon",
|
||||
Use: "chibaclonkd",
|
||||
Short: "Chiba-Clonk Daemon",
|
||||
PersistentPreRunE: func(cmd *cobra.Command, _ []string) error {
|
||||
// set the default command outputs
|
||||
cmd.SetOut(cmd.OutOrStdout())
|
||||
@@ -128,6 +128,10 @@ func NewRootCmd() (*cobra.Command, params.EncodingConfig) {
|
||||
|
||||
// add rosetta
|
||||
rootCmd.AddCommand(sdkserver.RosettaCommand(encodingConfig.InterfaceRegistry, encodingConfig.Codec))
|
||||
|
||||
// Add flags for GQL server.
|
||||
rootCmd = srvflags.AddGQLFlags(rootCmd)
|
||||
|
||||
return rootCmd, encodingConfig
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user