diff --git a/app/app.go b/app/app.go index 2c984f5b..afcb4a82 100644 --- a/app/app.go +++ b/app/app.go @@ -6,7 +6,6 @@ import ( "os" "path/filepath" - bcnaappparams "github.com/BitCannaGlobal/bcna/app/params" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/grpc/tmservice" @@ -182,6 +181,7 @@ var ( ) var ( + _ cosmoscmd.App = (*App)(nil) _ servertypes.Application = (*App)(nil) _ simapp.App = (*App)(nil) ) @@ -259,11 +259,11 @@ func New( skipUpgradeHeights map[int64]bool, homePath string, invCheckPeriod uint, - encodingConfig bcnaappparams.EncodingConfig, + encodingConfig cosmoscmd.EncodingConfig, appOpts servertypes.AppOptions, baseAppOptions ...func(*baseapp.BaseApp), ) cosmoscmd.App { - appCodec := encodingConfig.Codec + appCodec := encodingConfig.Marshaler cdc := encodingConfig.Amino interfaceRegistry := encodingConfig.InterfaceRegistry @@ -445,7 +445,7 @@ func New( // this line is used by starport scaffolding # stargate/app/keeperDefinition // Create static IBC router, add transfer route, then set and seal it - ibcRouter := ibcporttypes.NewRouter() // rbg gaiad is different + ibcRouter := ibcporttypes.NewRouter() //rbg gaiad is different ibcRouter. AddRoute(icahosttypes.SubModuleName, icaHostIBCModule). AddRoute(ibctransfertypes.ModuleName, transferIBCModule) @@ -592,7 +592,7 @@ func New( params.NewAppModule(app.ParamsKeeper), evidence.NewAppModule(app.EvidenceKeeper), ibc.NewAppModule(app.IBCKeeper), - // ica.NewAppModule(&app.ICAControllerKeeper, &app.ICAHostKeeper), + //ica.NewAppModule(&app.ICAControllerKeeper, &app.ICAHostKeeper), transferModule, bcnaModule, // this line is used by starport scaffolding # stargate/app/appModule diff --git a/app/simulation_test.go b/app/simulation_test.go index 09f3d88b..c121f918 100644 --- a/app/simulation_test.go +++ b/app/simulation_test.go @@ -6,7 +6,6 @@ import ( "time" "github.com/BitCannaGlobal/bcna/app" - bcnaappparams "github.com/BitCannaGlobal/bcna/app/params" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/simapp" @@ -74,7 +73,7 @@ func BenchmarkSimulation(b *testing.B) { require.NoError(b, err) }) - encoding := bcnaappparams.MakeTestEncodingConfig() + encoding := cosmoscmd.MakeEncodingConfig(app.ModuleBasics) app := app.New( logger, diff --git a/cmd/bcnad/cmd/root.go b/cmd/bcnad/cmd/root.go index 4936ccbe..d4e0f871 100644 --- a/cmd/bcnad/cmd/root.go +++ b/cmd/bcnad/cmd/root.go @@ -247,7 +247,7 @@ func (ac appCreator) appExport( loadLatest = true } - bcnaApp := bcna.New( + bcnaApp := bcna.NewbcnaApp( logger, db, traceStore, diff --git a/cmd/bcnad/main.go b/cmd/bcnad/main.go index a43228dd..cb205ffb 100644 --- a/cmd/bcnad/main.go +++ b/cmd/bcnad/main.go @@ -3,23 +3,22 @@ package main import ( "os" - "github.com/cosmos/cosmos-sdk/server" + "github.com/BitCannaGlobal/bcna/app" svrcmd "github.com/cosmos/cosmos-sdk/server/cmd" - - app "github.com/BitCannaGlobal/bcna/app" - "github.com/BitCannaGlobal/bcna/cmd/bcnad/cmd" + "github.com/ignite/cli/ignite/pkg/cosmoscmd" ) func main() { - rootCmd, _ := cmd.NewRootCmd() - + rootCmd, _ := cosmoscmd.NewRootCmd( + app.Name, + app.AccountAddressPrefix, + app.DefaultNodeHome, + app.Name, + app.ModuleBasics, + app.New, + // this line is used by starport scaffolding # root/arguments + ) if err := svrcmd.Execute(rootCmd, app.DefaultNodeHome); err != nil { - switch e := err.(type) { - case server.ErrorCode: - os.Exit(e.Code) - - default: - os.Exit(1) - } + os.Exit(1) } } diff --git a/testutil/network/network.go b/testutil/network/network.go index 223c5072..9b3702f3 100644 --- a/testutil/network/network.go +++ b/testutil/network/network.go @@ -5,7 +5,6 @@ import ( "testing" "time" - bcnaappparams "github.com/BitCannaGlobal/bcna/app/params" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/crypto/hd" "github.com/cosmos/cosmos-sdk/crypto/keyring" @@ -15,6 +14,7 @@ import ( "github.com/cosmos/cosmos-sdk/testutil/network" sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + "github.com/ignite/cli/ignite/pkg/cosmoscmd" tmrand "github.com/tendermint/tendermint/libs/rand" tmdb "github.com/tendermint/tm-db" @@ -46,9 +46,9 @@ func New(t *testing.T, configs ...network.Config) *network.Network { // DefaultConfig will initialize config for the network with custom application, // genesis and single validator. All other parameters are inherited from cosmos-sdk/testutil/network.DefaultConfig func DefaultConfig() network.Config { - encoding := bcnaappparams.MakeTestEncodingConfig() + encoding := cosmoscmd.MakeEncodingConfig(app.ModuleBasics) return network.Config{ - Codec: encoding.Codec, + Codec: encoding.Marshaler, TxConfig: encoding.TxConfig, LegacyAmino: encoding.Amino, InterfaceRegistry: encoding.InterfaceRegistry, @@ -62,7 +62,7 @@ func DefaultConfig() network.Config { baseapp.SetMinGasPrices(val.AppConfig.MinGasPrices), ) }, - GenesisState: app.ModuleBasics.DefaultGenesis(encoding.Codec), + GenesisState: app.ModuleBasics.DefaultGenesis(encoding.Marshaler), TimeoutCommit: 2 * time.Second, ChainID: "chain-" + tmrand.NewRand().Str(6), NumValidators: 1,