@@ -38,12 +38,13 @@ import (
3838
3939 "github.com/cosmos/ethermint/app"
4040 ethermintclient "github.com/cosmos/ethermint/client"
41+ "github.com/cosmos/ethermint/encoding"
4142)
4243
4344// NewRootCmd creates a new root command for simd. It is called once in the
4445// main function.
4546func NewRootCmd () (* cobra.Command , params.EncodingConfig ) {
46- encodingConfig := app . MakeEncodingConfig ( )
47+ encodingConfig := encoding . MakeConfig ( app . ModuleBasics )
4748 initClientCtx := client.Context {}.
4849 WithJSONMarshaler (encodingConfig .Marshaler ).
4950 WithInterfaceRegistry (encodingConfig .InterfaceRegistry ).
@@ -225,7 +226,7 @@ func newApp(logger log.Logger, db dbm.DB, traceStore io.Writer, appOpts serverty
225226 logger , db , traceStore , true , skipUpgradeHeights ,
226227 cast .ToString (appOpts .Get (flags .FlagHome )),
227228 cast .ToUint (appOpts .Get (sdkserver .FlagInvCheckPeriod )),
228- app . MakeEncodingConfig ( ), // Ideally, we would reuse the one created by NewRootCmd.
229+ encoding . MakeConfig ( app . ModuleBasics ), // Ideally, we would reuse the one created by NewRootCmd.
229230 appOpts ,
230231 baseapp .SetPruning (pruningOpts ),
231232 baseapp .SetMinGasPrices (cast .ToString (appOpts .Get (sdkserver .FlagMinGasPrices ))),
@@ -249,7 +250,7 @@ func createAppAndExport(
249250 logger log.Logger , db dbm.DB , traceStore io.Writer , height int64 , forZeroHeight bool , jailAllowedAddrs []string ,
250251 appOpts servertypes.AppOptions ,
251252) (servertypes.ExportedApp , error ) {
252- encCfg := app . MakeEncodingConfig ( ) // Ideally, we would reuse the one created by NewRootCmd.
253+ encCfg := encoding . MakeConfig ( app . ModuleBasics ) // Ideally, we would reuse the one created by NewRootCmd.
253254 encCfg .Marshaler = codec .NewProtoCodec (encCfg .InterfaceRegistry )
254255 var ethermintApp * app.EthermintApp
255256 if height != - 1 {
0 commit comments