Skip to content

FIX: array of coin is not support as a autoCLI param #4622

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

Closed
Pantani opened this issue Apr 16, 2025 · 1 comment · Fixed by #4624
Closed

FIX: array of coin is not support as a autoCLI param #4622

Pantani opened this issue Apr 16, 2025 · 1 comment · Fixed by #4624
Assignees

Comments

@Pantani
Copy link
Collaborator

Pantani commented Apr 16, 2025

Create types as array.coin / coins will not be able to send parameters through the CLI; the autoCLI does not support parsing the coins as slices in this new version of the SDK:

https://github.com/cosmos/cosmos-sdk/blob/main/client/v2/autocli/flag/coin.go#L45-L45

Eg:

  • Scaffold a chain with a coins type and run it:
ignite s chain venus && cd venus && \
ignite s list employee salary:coins && \
ignite chain serve
  • Try to create a new transaction:
venusd tx venus create-employee "2token,4stake"
@julienrbrt
Copy link
Member

julienrbrt commented Apr 16, 2025

This issue is a bug in the scaffolding logic, we need to set VarArgs: true in the autocli config when it is an array.
Fixing this will show up this issue: #4623 (meaning the parsing went well)

Additionally variadics should be using spaces, so it should be venusd tx venus create-employee 2token 4stake

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

Successfully merging a pull request may close this issue.

2 participants