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

Improve generated cli help #581

Merged
merged 2 commits into from
Jul 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,12 @@ pub const UPDATE_ACCOUNT_MSG: [u8; 32] = [1; 32];
pub enum CallMessage<C: sov_modules_api::Context> {
/// Updates a public key for the corresponding Account.
/// The sender must be in possession of the new key.
UpdatePublicKey(C::PublicKey, C::Signature),
UpdatePublicKey(
/// The new public key
C::PublicKey,
/// A valid signature from the new public key
C::Signature,
),
}

impl<C: sov_modules_api::Context> Accounts<C> {
Expand Down
2 changes: 2 additions & 0 deletions module-system/sov-modules-macros/src/cli_parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ pub(crate) fn derive_cli_wallet_arg(
Fields::Unnamed(_) => {
variants_with_named_fields.push(quote! {
#( #variant_docs )*
#[command(arg_required_else_help(true))]
#variant_name {#(#named_variant_fields),* }
});
convert_cases.push(quote! {
Expand All @@ -215,6 +216,7 @@ pub(crate) fn derive_cli_wallet_arg(
Fields::Named(_) => {
variants_with_named_fields.push(quote! {
#( #variant_docs )*
#[command(arg_required_else_help(true))]
#variant_name {#(#named_variant_fields),* }
});
convert_cases.push(quote! {
Expand Down