-
Notifications
You must be signed in to change notification settings - Fork 556
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: add missing tx.go
file by default and enable cli if autocli does not exist
#3849
Conversation
tx.go
file by default and enable cli if autocli not existtx.go
file by default and enable cli if autocli does not exist
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you mean exactly? The only use case you need to uncomment it is for IBC command. Otherwise you should not create it as AutoCLI takes care of it.
A new chain in most cases should not need any cli code.
We should imho uncomment the GetTxCommand instead when scaffolding an IBC command, and let that file be created only for IBC commands.
If you scaffold a packet: and if you try to use the Now, I changed the PR to scaffold the |
Oh yes, I understand what is happening. It uses the default AutoCLI config for IBC, which we don't want in that case. |
ignite/templates/module/create/files/ibc/x/{{moduleName}}/client/cli/tx.go.plush
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change makes sense, but I still don't think we should create the tx.go by default. The previous logic would create it only when it is an IBC module as well. I think only the module.go wiring was missing?
ignite/templates/module/create/files/base/x/{{moduleName}}/module/module.go.plush
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tACK! One nit
ignite/templates/module/create/files/ibc/x/{{moduleName}}/client/cli/tx.go.plush
Show resolved
Hide resolved
ignite/templates/module/create/files/base/x/{{moduleName}}/module/module.go.plush
Outdated
Show resolved
Hide resolved
ignite/templates/module/create/files/base/x/{{moduleName}}/module/module.go.plush
Outdated
Show resolved
Hide resolved
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3849 +/- ##
==========================================
+ Coverage 24.36% 24.37% +0.01%
==========================================
Files 294 294
Lines 24555 24547 -8
==========================================
+ Hits 5982 5984 +2
+ Misses 18036 18027 -9
+ Partials 537 536 -1
|
Description
Scaffold the
x/<module-name>/client/cli/tx.go
by default, and enable theGetTxCmd()
module command. Now, it is a little bit confusing. We need to uncomment the method to allow the CLI to command the package. If not enabled, the command appears without the args.