-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Make an SDK function for getting base module query command command #11867
Comments
@aaronc are you also working on refactoring this lol? |
@ValarDragon see the work that is started in |
ah amazing, didn't know about that! Just saw the ADR, lets close this in favor of that work for just generating these CLI files automatically. |
Went ahead and did this for Osmosis osmosis-labs/osmosis#3611 |
Reopening this in order to track Autocli and potentially up streaming osmosis work |
Hey folks. Is this issue still open ? |
AutoCLI solves that issue and is being tackled here: #11775. |
Given that AutoCLI is now getting implemented in the SDK closing this. |
Summary
Every module has roughly the same few lines for getting the base cobra command. So much so, that ignite basically code generates boilerplate for this. Lets just make a common function in the SDK that every module can use, and save ourselves these extra 6 lines per module?
Staking cli query base: https://github.com/cosmos/cosmos-sdk/blob/main/x/staking/client/cli/query.go#L19-L25
Proposal
I propose we make a method that does this generically, taking in types.ModuleName as argument, and using that in
Use
and inShort
(via fmt.SprintF)Then we change this in every module to be:
I don't know which package this belongs in, perhaps
client
?For Admin Use
The text was updated successfully, but these errors were encountered: