From af96556564e9cc92a9e8173cbd3d15f25dc29fd7 Mon Sep 17 00:00:00 2001 From: Julien Robert Date: Wed, 11 Sep 2024 11:47:15 +0200 Subject: [PATCH] chore: rename in place testnet command --- ignite/templates/app/files-consumer/app/app.go.plush | 10 ++++++++++ ignite/templates/app/files-minimal/app/app.go.plush | 10 ++++++++++ ignite/templates/app/files/app/app.go.plush | 10 ++++++++++ .../cmd/{{binaryNamePrefix}}d/cmd/commands.go.plush | 2 +- .../cmd/{{binaryNamePrefix}}d/cmd/testnet.go.plush | 2 +- 5 files changed, 32 insertions(+), 2 deletions(-) diff --git a/ignite/templates/app/files-consumer/app/app.go.plush b/ignite/templates/app/files-consumer/app/app.go.plush index 4b2888d19c..73fedd804d 100644 --- a/ignite/templates/app/files-consumer/app/app.go.plush +++ b/ignite/templates/app/files-consumer/app/app.go.plush @@ -304,6 +304,16 @@ func (app *App) AppCodec() codec.Codec { return app.appCodec } +// InterfaceRegistry returns App's interfaceRegistry. +func (app *App) InterfaceRegistry() codectypes.InterfaceRegistry { + return app.interfaceRegistry +} + +// TxConfig returns App's tx config. +func (app *App) TxConfig() client.TxConfig { + return app.txConfig +} + // GetKey returns the KVStoreKey for the provided store key. func (app *App) GetKey(storeKey string) *storetypes.KVStoreKey { kvStoreKey, ok := app.UnsafeFindStoreKey(storeKey).(*storetypes.KVStoreKey) diff --git a/ignite/templates/app/files-minimal/app/app.go.plush b/ignite/templates/app/files-minimal/app/app.go.plush index 3613d77932..06af805ec3 100644 --- a/ignite/templates/app/files-minimal/app/app.go.plush +++ b/ignite/templates/app/files-minimal/app/app.go.plush @@ -199,6 +199,16 @@ func (app *App) AppCodec() codec.Codec { return app.appCodec } +// InterfaceRegistry returns App's interfaceRegistry. +func (app *App) InterfaceRegistry() codectypes.InterfaceRegistry { + return app.interfaceRegistry +} + +// TxConfig returns App's tx config. +func (app *App) TxConfig() client.TxConfig { + return app.txConfig +} + // GetKey returns the KVStoreKey for the provided store key. func (app *App) GetKey(storeKey string) *storetypes.KVStoreKey { kvStoreKey, ok := app.UnsafeFindStoreKey(storeKey).(*storetypes.KVStoreKey) diff --git a/ignite/templates/app/files/app/app.go.plush b/ignite/templates/app/files/app/app.go.plush index d93a7de726..78d0276c4e 100644 --- a/ignite/templates/app/files/app/app.go.plush +++ b/ignite/templates/app/files/app/app.go.plush @@ -310,6 +310,16 @@ func (app *App) AppCodec() codec.Codec { return app.appCodec } +// InterfaceRegistry returns App's interfaceRegistry. +func (app *App) InterfaceRegistry() codectypes.InterfaceRegistry { + return app.interfaceRegistry +} + +// TxConfig returns App's tx config. +func (app *App) TxConfig() client.TxConfig { + return app.txConfig +} + // GetKey returns the KVStoreKey for the provided store key. func (app *App) GetKey(storeKey string) *storetypes.KVStoreKey { kvStoreKey, ok := app.UnsafeFindStoreKey(storeKey).(*storetypes.KVStoreKey) diff --git a/ignite/templates/app/files/cmd/{{binaryNamePrefix}}d/cmd/commands.go.plush b/ignite/templates/app/files/cmd/{{binaryNamePrefix}}d/cmd/commands.go.plush index 5388a9d8d7..46df14a4b9 100644 --- a/ignite/templates/app/files/cmd/{{binaryNamePrefix}}d/cmd/commands.go.plush +++ b/ignite/templates/app/files/cmd/{{binaryNamePrefix}}d/cmd/commands.go.plush @@ -35,7 +35,7 @@ func initRootCmd( ) { rootCmd.AddCommand( genutilcli.InitCmd(basicManager, app.DefaultNodeHome), - NewTestnetCmd(addModuleInitFlags), + NewInPlaceTestnetCmd(addModuleInitFlags), debug.Cmd(), confixcmd.ConfigCommand(), pruning.Cmd(newApp, app.DefaultNodeHome), diff --git a/ignite/templates/app/files/cmd/{{binaryNamePrefix}}d/cmd/testnet.go.plush b/ignite/templates/app/files/cmd/{{binaryNamePrefix}}d/cmd/testnet.go.plush index 73b723892e..0d48dc870f 100644 --- a/ignite/templates/app/files/cmd/{{binaryNamePrefix}}d/cmd/testnet.go.plush +++ b/ignite/templates/app/files/cmd/{{binaryNamePrefix}}d/cmd/testnet.go.plush @@ -46,7 +46,7 @@ type valArgs struct { homeDir string } -func NewTestnetCmd(addStartFlags servertypes.ModuleInitFlags) *cobra.Command { +func NewInPlaceTestnetCmd(addStartFlags servertypes.ModuleInitFlags) *cobra.Command { cmd := server.InPlaceTestnetCreator(newTestnetApp) addStartFlags(cmd) cmd.Short = "Updates chain's application and consensus state with provided validator info and starts the node"