Skip to content

Commit

Permalink
remove module config flag
Browse files Browse the repository at this point in the history
  • Loading branch information
Pantani committed Jul 4, 2024
1 parent 831e4ca commit c312a37
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 10 deletions.
5 changes: 0 additions & 5 deletions ignite/cmd/scaffold_chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ about Cosmos SDK on https://docs.cosmos.network
c.Flags().StringP(flagPath, "p", "", "create a project in a specific path")
c.Flags().Bool(flagNoDefaultModule, false, "create a project without a default module")
c.Flags().StringSlice(flagParams, []string{}, "add default module parameters")
c.Flags().StringSlice(flagModuleConfigs, []string{}, "add module configs")
c.Flags().Bool(flagSkipGit, false, "skip Git repository initialization")
c.Flags().Bool(flagSkipProto, false, "skip proto generation")
c.Flags().Bool(flagMinimal, false, "create a minimal blockchain (with the minimum required Cosmos SDK modules)")
Expand All @@ -108,15 +107,12 @@ func scaffoldChainHandler(cmd *cobra.Command, args []string) error {
minimal, _ = cmd.Flags().GetBool(flagMinimal)
isConsumer, _ = cmd.Flags().GetBool(flagIsConsumer)
params, _ = cmd.Flags().GetStringSlice(flagParams)
moduleConfigs, _ = cmd.Flags().GetStringSlice(flagModuleConfigs)
skipProto, _ = cmd.Flags().GetBool(flagSkipProto)
)

if noDefaultModule {
if len(params) > 0 {
return errors.New("params flag is only supported if the default module is enabled")
} else if len(moduleConfigs) > 0 {
return errors.New("module configs flag is only supported if the default module is enabled")
}
}

Expand All @@ -136,7 +132,6 @@ func scaffoldChainHandler(cmd *cobra.Command, args []string) error {
minimal,
isConsumer,
params,
moduleConfigs,
)
if err != nil {
return err
Expand Down
2 changes: 0 additions & 2 deletions ignite/cmd/scaffold_module.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ const (
flagDep = "dep"
flagIBC = "ibc"
flagParams = "params"
flagModuleConfigs = "module-configs"
flagIBCOrdering = "ordering"
flagRequireRegistration = "require-registration"
)
Expand Down Expand Up @@ -107,7 +106,6 @@ params.
c.Flags().String(flagIBCOrdering, "none", "channel ordering of the IBC module [none|ordered|unordered]")
c.Flags().Bool(flagRequireRegistration, false, "fail if module can't be registered")
c.Flags().StringSlice(flagParams, []string{}, "add module parameters")
c.Flags().StringSlice(flagModuleConfigs, []string{}, "add module configs")

return c
}
Expand Down
5 changes: 2 additions & 3 deletions ignite/services/scaffolder/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func Init(
runner *xgenny.Runner,
root, name, addressPrefix string,
noDefaultModule, minimal, isConsumerChain bool,
params, moduleConfigs []string,
params []string,
) (string, string, error) {
pathInfo, err := gomodulepath.Parse(name)
if err != nil {
Expand Down Expand Up @@ -53,7 +53,6 @@ func Init(
minimal,
isConsumerChain,
params,
moduleConfigs,
)
return path, gomodule, err
}
Expand All @@ -66,7 +65,7 @@ func generate(
addressPrefix,
absRoot string,
noDefaultModule, minimal, isConsumerChain bool,
params, moduleConfigs []string,
params []string,
) (xgenny.SourceModification, error) {
// Parse params with the associated type
paramsFields, err := field.ParseFields(params, checkForbiddenTypeIndex)
Expand Down

0 comments on commit c312a37

Please sign in to comment.