diff --git a/app/app.go b/app/app.go index 9e76ca36c2..3e94f42eaf 100644 --- a/app/app.go +++ b/app/app.go @@ -118,11 +118,6 @@ import ( "go.opentelemetry.io/otel" ) -const ( - AccountAddressPrefix = "cosmos" - Name = "sei" -) - // this line is used by starport scaffolding # stargate/wasm/app/enabledProposals func getGovProposalHandlers() []govclient.ProposalHandler { @@ -203,7 +198,7 @@ func init() { panic(err) } - DefaultNodeHome = filepath.Join(userHomeDir, "."+Name) + DefaultNodeHome = filepath.Join(userHomeDir, "."+AppName) } // App extends an ABCI application, but with most of its parameters exported. @@ -281,7 +276,7 @@ func New( cdc := encodingConfig.Amino interfaceRegistry := encodingConfig.InterfaceRegistry - bApp := baseapp.NewBaseApp(Name, logger, db, encodingConfig.TxConfig.TxDecoder(), baseAppOptions...) + bApp := baseapp.NewBaseApp(AppName, logger, db, encodingConfig.TxConfig.TxDecoder(), baseAppOptions...) bApp.SetCommitMultiStoreTracer(traceStore) bApp.SetVersion(version.Version) bApp.SetInterfaceRegistry(interfaceRegistry) @@ -684,7 +679,7 @@ func New( return app } -// Name returns the name of the App +// AppName returns the name of the App func (app *App) Name() string { return app.BaseApp.Name() } // GetBaseApp returns the base app of the application @@ -797,7 +792,7 @@ func (app *App) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig // register app's OpenAPI routes. apiSvr.Router.Handle("/static/openapi.yml", http.FileServer(http.FS(docs.Docs))) - apiSvr.Router.HandleFunc("/", openapiconsole.Handler(Name, "/static/openapi.yml")) + apiSvr.Router.HandleFunc("/", openapiconsole.Handler(AppName, "/static/openapi.yml")) } // RegisterTxService implements the Application.RegisterTxService method. diff --git a/app/const.go b/app/const.go new file mode 100644 index 0000000000..4e3cb4999a --- /dev/null +++ b/app/const.go @@ -0,0 +1,8 @@ +package app + +const ( + // Prefix of bech32 encoded address + AccountAddressPrefix = "sei" + // Application name + AppName = "sei" +) diff --git a/cmd/seid/main.go b/cmd/seid/main.go index f1f94ff16c..1b52ffbafd 100644 --- a/cmd/seid/main.go +++ b/cmd/seid/main.go @@ -9,10 +9,10 @@ import ( func main() { rootCmd, _ := NewRootCmd( - app.Name, + app.AppName, app.AccountAddressPrefix, app.DefaultNodeHome, - app.Name, + app.AppName, app.ModuleBasics, app.New, // this line is used by starport scaffolding # root/arguments diff --git a/cmd/seid/root.go b/cmd/seid/root.go index 59c88cbf4c..980d9e460a 100644 --- a/cmd/seid/root.go +++ b/cmd/seid/root.go @@ -132,7 +132,7 @@ func NewRootCmd( rootCmd := &cobra.Command{ Use: appName + "d", - Short: "Stargate CosmosHub App", + Short: "Stargate Sei App", PersistentPreRunE: func(cmd *cobra.Command, _ []string) error { // set the default command outputs cmd.SetOut(cmd.OutOrStdout())