Skip to content

Commit

Permalink
refactor: remove unnecessary components
Browse files Browse the repository at this point in the history
  • Loading branch information
hacheigriega committed Oct 23, 2023
1 parent 771d3a5 commit 5e50913
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 30 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ dist/

scripts/testnet/config.sh
scripts/testnet/nodes
scripts/testnet/artifacts
21 changes: 0 additions & 21 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,19 +127,15 @@ const (
Name = "seda-chain"
)

// this line is used by starport scaffolding # stargate/wasm/app/enabledProposals

func getGovProposalHandlers() []govclient.ProposalHandler {
var govProposalHandlers []govclient.ProposalHandler
// this line is used by starport scaffolding # stargate/app/govProposalHandlers

govProposalHandlers = append(govProposalHandlers,
paramsclient.ProposalHandler,
upgradeclient.LegacyProposalHandler,
upgradeclient.LegacyCancelProposalHandler,
ibcclientclient.UpdateClientProposalHandler,
ibcclientclient.UpgradeProposalHandler,
// this line is used by starport scaffolding # stargate/app/govProposalHandler
)

return govProposalHandlers
Expand Down Expand Up @@ -178,7 +174,6 @@ var (
consensus.AppModuleBasic{},
wasmstorage.AppModuleBasic{},
wasm.AppModuleBasic{},
// this line is used by starport scaffolding # stargate/app/moduleBasic
)

// module account permissions
Expand All @@ -192,7 +187,6 @@ var (
govtypes.ModuleName: {authtypes.Burner},
ibctransfertypes.ModuleName: {authtypes.Minter, authtypes.Burner},
wasmtypes.ModuleName: {authtypes.Burner},
// this line is used by starport scaffolding # stargate/app/maccPerms
}
)

Expand Down Expand Up @@ -259,7 +253,6 @@ type App struct {
ScopedWasmKeeper capabilitykeeper.ScopedKeeper

WasmStorageKeeper wasmstoragekeeper.Keeper
// this line is used by starport scaffolding # stargate/app/keeperDeclaration

// mm is the module manager
mm *module.Manager
Expand Down Expand Up @@ -306,7 +299,6 @@ func NewApp(
feegrant.StoreKey, evidencetypes.StoreKey, ibctransfertypes.StoreKey, icahosttypes.StoreKey,
capabilitytypes.StoreKey, group.StoreKey, icacontrollertypes.StoreKey, consensusparamtypes.StoreKey,
wasmstoragetypes.StoreKey, wasmtypes.StoreKey,
// this line is used by starport scaffolding # stargate/app/storeKey
)
tkeys := sdk.NewTransientStoreKeys(paramstypes.TStoreKey)
memKeys := sdk.NewMemoryStoreKeys(capabilitytypes.MemStoreKey)
Expand Down Expand Up @@ -347,7 +339,6 @@ func NewApp(
scopedTransferKeeper := app.CapabilityKeeper.ScopeToModule(ibctransfertypes.ModuleName)
scopedICAHostKeeper := app.CapabilityKeeper.ScopeToModule(icahosttypes.SubModuleName)
scopedWasmKeeper := app.CapabilityKeeper.ScopeToModule(wasmtypes.ModuleName)
// this line is used by starport scaffolding # stargate/app/scopedKeeper

// add keepers
app.AccountKeeper = authkeeper.NewAccountKeeper(
Expand Down Expand Up @@ -573,8 +564,6 @@ func NewApp(
)
wasmStorageModule := wasmstorage.NewAppModule(appCodec, app.WasmStorageKeeper, app.AccountKeeper, app.BankKeeper)

// this line is used by starport scaffolding # stargate/app/keeperDefinition

/**** IBC Routing ****/

// Sealing prevents other modules from creating scoped sub-keepers
Expand All @@ -584,7 +573,6 @@ func NewApp(
ibcRouter := ibcporttypes.NewRouter()
ibcRouter.AddRoute(icahosttypes.SubModuleName, icaHostIBCModule).
AddRoute(ibctransfertypes.ModuleName, transferIBCModule)
// this line is used by starport scaffolding # ibc/app/router
app.IBCKeeper.SetRouter(ibcRouter)

/**** Module Hooks ****/
Expand Down Expand Up @@ -631,8 +619,6 @@ func NewApp(
transferModule,
icaModule,
wasmStorageModule,
// this line is used by starport scaffolding # stargate/app/appModule

crisis.NewAppModule(app.CrisisKeeper, skipGenesisInvariants, nil), // always be last to make sure that it checks for all invariants and not only part of them
)

Expand Down Expand Up @@ -665,7 +651,6 @@ func NewApp(
vestingtypes.ModuleName,
consensusparamtypes.ModuleName,
wasmstoragetypes.ModuleName,
// this line is used by starport scaffolding # stargate/app/beginBlockers
)

app.mm.SetOrderEndBlockers(
Expand All @@ -692,7 +677,6 @@ func NewApp(
vestingtypes.ModuleName,
consensusparamtypes.ModuleName,
wasmstoragetypes.ModuleName,
// this line is used by starport scaffolding # stargate/app/endBlockers
)

// NOTE: The genutils module must occur after staking so that pools are
Expand Down Expand Up @@ -724,7 +708,6 @@ func NewApp(
consensusparamtypes.ModuleName,
wasmstoragetypes.ModuleName,
wasmtypes.ModuleName,
// this line is used by starport scaffolding # stargate/app/initGenesis
}
app.mm.SetOrderInitGenesis(genesisModuleOrder...)
app.mm.SetOrderExportGenesis(genesisModuleOrder...)
Expand Down Expand Up @@ -788,7 +771,6 @@ func NewApp(
app.ScopedIBCKeeper = scopedIBCKeeper
app.ScopedTransferKeeper = scopedTransferKeeper
app.ScopedWasmKeeper = scopedWasmKeeper
// this line is used by starport scaffolding # stargate/app/beforeInitReturn

return app
}
Expand Down Expand Up @@ -947,9 +929,6 @@ func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino
paramsKeeper.Subspace(ibcexported.ModuleName)
paramsKeeper.Subspace(icacontrollertypes.SubModuleName)
paramsKeeper.Subspace(icahosttypes.SubModuleName)

// this line is used by starport scaffolding # stargate/app/paramSubspace

return paramsKeeper
}

Expand Down
6 changes: 3 additions & 3 deletions app/simulation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func BenchmarkSimulation(b *testing.B) {
simcli.FlagEnabledValue = true

config := simcli.NewConfigFromFlags()
config.ChainID = "mars-simapp"
config.ChainID = "seda-simapp"
db, dir, logger, _, err := simtestutil.SetupSimulation(
config,
"leveldb-bApp-sim",
Expand Down Expand Up @@ -220,7 +220,7 @@ func TestAppStateDeterminism(t *testing.T) {

func TestAppImportExport(t *testing.T) {
config := simcli.NewConfigFromFlags()
config.ChainID = "mars-simapp-import"
config.ChainID = "seda-simapp-import"

db, dir, logger, skip, err := simtestutil.SetupSimulation(
config,
Expand Down Expand Up @@ -374,7 +374,7 @@ func TestAppImportExport(t *testing.T) {

func TestAppSimulationAfterImport(t *testing.T) {
config := simcli.NewConfigFromFlags()
config.ChainID = "mars-simapp-after-import"
config.ChainID = "seda-simapp-after-import"

db, dir, logger, skip, err := simtestutil.SetupSimulation(
config,
Expand Down
2 changes: 0 additions & 2 deletions cmd/seda-chaind/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ func initRootCmd(
tmcli.NewCompletionCmd(rootCmd, true),
debug.Cmd(),
config.Cmd(),
// this line is used by starport scaffolding # root/commands
)

a := appCreator{
Expand Down Expand Up @@ -190,7 +189,6 @@ func txCommand() *cobra.Command {

func addModuleInitFlags(startCmd *cobra.Command) {
crisis.AddModuleInitFlags(startCmd)
// this line is used by starport scaffolding # root/arguments
}

func overwriteFlagDefaults(c *cobra.Command, defaults map[string]string) {
Expand Down
4 changes: 0 additions & 4 deletions x/wasm-storage/types/codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,13 @@ package types
import (
"github.com/cosmos/cosmos-sdk/codec"
cdctypes "github.com/cosmos/cosmos-sdk/codec/types"
// this line is used by starport scaffolding # 1
"github.com/cosmos/cosmos-sdk/types/msgservice"
)

func RegisterCodec(cdc *codec.LegacyAmino) {
// this line is used by starport scaffolding # 2
}

func RegisterInterfaces(registry cdctypes.InterfaceRegistry) {
// this line is used by starport scaffolding # 3

msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc)
}

Expand Down

0 comments on commit 5e50913

Please sign in to comment.