Skip to content
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

Scaffolded autocli definitions for modules (list) are incomplete #3845

Closed
RaulBernal opened this issue Dec 15, 2023 · 2 comments
Closed

Scaffolded autocli definitions for modules (list) are incomplete #3845

RaulBernal opened this issue Dec 15, 2023 · 2 comments

Comments

@RaulBernal
Copy link
Contributor

Describe the bug
The scaffold of the cli commands for the new module/list is not complete (don't show the fields). Also the help for that commands aren't.

To reproduce
Steps to reproduce the behavior:

  1. Scaffold a chain, e.g. ignite scaffold chain github.com/BitCannaGlobal/bcna --address-prefix bcna
  2. Scaffold a list, e.g. ignite scaffold list bitcannaid bcnaid address
  3. Run the chain and execute:
  • bcnad tx bcna create-bitcannaid -> you didn't notice the needed fields
  • bcnad tx bcna create-bitcannaid --help -> same
    e.g.:
bcnad tx bcna create-bitcannaid
accepts 2 arg(s), received 0

bcnad tx bcna create-bitcannaid --help
Create bitcannaid

Usage:
  bcnad tx bcna create-bitcannaid [flags]

If you check the Tx: &autocliv1.ServiceCommandDescriptor at x/bcna/module/autocli.go you can see that is a different scaffold than the Query; being the Query more complete with fields and giving info about the fields.

What version are you using?

Ignite CLI version:		v28.0.0-dev
Ignite CLI build date:		2023-12-11T11:52:06Z
Ignite CLI source hash:		52c1d09f3c8840951a92d548ebfe8547b78b039a
Ignite CLI config version:	v1
Cosmos SDK version:		v0.50.1
Your OS:			darwin
Your arch:			arm64
Your Node.js version:		v16.15.0
Your go version:		go version go1.21.5 darwin/arm64
@RaulBernal
Copy link
Contributor Author

RaulBernal commented Dec 15, 2023

Opps! I noticed that the delete-bitcannaid has not positional arguments defined:

{
	RpcMethod: "DeleteBitcannaid",
	Use:       "delete-bitcannaid",
	Short:     "Delete bitcannaid",
},

Should be:

{
	RpcMethod: "DeleteBitcannaid",
	Use:       "delete-bitcannaid",
	Short:     "Delete bitcannaid",
        PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "id"}},
},

@julienrbrt
Copy link
Member

Hi, yes, it has been fixed here: #3822
It will come in the next patch release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants