Skip to content

Commit

Permalink
refactor: remove devnet-gov
Browse files Browse the repository at this point in the history
  • Loading branch information
hoank101 committed May 24, 2024
1 parent a28396d commit 59e955f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 24 deletions.
7 changes: 6 additions & 1 deletion .idea/composable-cosmos.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,6 @@ func NewComposableApp(
homePath string,
invCheckPeriod uint,
appOpts servertypes.AppOptions,
devnetGov *string,
baseAppOptions ...func(*baseapp.BaseApp),
) *ComposableApp {
interfaceRegistry, err := types.NewInterfaceRegistryWithOptions(types.InterfaceRegistryOptions{
Expand Down Expand Up @@ -329,7 +328,6 @@ func NewComposableApp(
skipUpgradeHeights,
homePath,
appOpts,
devnetGov,
)

// transferModule := transfer.NewAppModule(app.TransferKeeper)
Expand Down
6 changes: 0 additions & 6 deletions app/keepers/keepers.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,14 +185,8 @@ func (appKeepers *AppKeepers) InitNormalKeepers(
skipUpgradeHeights map[int64]bool,
homePath string,
appOpts servertypes.AppOptions,
devnetGov *string,
) {
govModAddress := authtypes.NewModuleAddress(govtypes.ModuleName).String()

if devnetGov != nil {
govModAddress = *devnetGov
}

// add keepers
appKeepers.AccountKeeper = authkeeper.NewAccountKeeper(
appCodec, runtime.NewKVStoreService(appKeepers.keys[authtypes.StoreKey]), authtypes.ProtoBaseAccount, maccPerms, authcodec.NewBech32Codec(sdk.GetConfig().GetBech32AccountAddrPrefix()), AccountAddressPrefix, govModAddress,
Expand Down
15 changes: 0 additions & 15 deletions cmd/picad/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,6 @@ import (
// this line is used by starport scaffolding # stargate/root/import
)

const (
// if set, than uses specific key for governance instead of default (default is production; this override for local devtest)
flagDevnetGov = "devnet-gov"
)

var ChainID string

// NewRootCmd creates a new root command for simd. It is called once in the
Expand All @@ -59,8 +54,6 @@ func NewRootCmd() (*cobra.Command, app.EncodingConfig) {
app.DefaultNodeHome,
5,
EmptyAppOptions{},
nil,
nil,
)

encodingConfig := app.EncodingConfig{
Expand Down Expand Up @@ -229,7 +222,6 @@ func initRootCmd(rootCmd *cobra.Command, txConfig client.TxConfig) {

func addModuleInitFlags(startCmd *cobra.Command) {
crisis.AddModuleInitFlags(startCmd)
startCmd.Flags().String(flagDevnetGov, "", "Sets the devnet governance key (if not set, uses the default production key)")
// this line is used by starport scaffolding # stargate/root/initFlags
}

Expand Down Expand Up @@ -293,12 +285,6 @@ func newApp(logger log.Logger, db dbm.DB, traceStore io.Writer, appOpts serverty
}
skipUpgradeHeights[h] = true
}

var devnetGov *string
devnetGovOption, _ := appOpts.Get(flagDevnetGov).(string)
if devnetGovOption != "" {
devnetGov = &devnetGovOption
}
baseappOptions := server.DefaultBaseappOptions(appOpts)

newApp := app.NewComposableApp(
Expand All @@ -308,7 +294,6 @@ func newApp(logger log.Logger, db dbm.DB, traceStore io.Writer, appOpts serverty
cast.ToUint(appOpts.Get(server.FlagInvCheckPeriod)),
// this line is used by starport scaffolding # stargate/root/appArgument
appOpts,
devnetGov,
baseappOptions...,
)

Expand Down

0 comments on commit 59e955f

Please sign in to comment.