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

near transaction construct-transaction is limited to maximum of 3 actions #408

Open
mitinarseny opened this issue Oct 9, 2024 · 0 comments

Comments

@mitinarseny
Copy link

Hey Team!
Awesome CLI, absolutely love it! Would it be hard to add support for adding more than 3 actions to a single batch transaction? So it can be useful for flows like: create account -> deploy -> call init() -> call acl_revoke_super_admin() -> ...

$ near transaction construct-transaction abc.near abc.near \
  add-action function-call first  json-args '{}' prepaid-gas '1.0 Tgas' attached-deposit '0 NEAR' \
  add-action function-call second json-args '{}' prepaid-gas '1.0 Tgas' attached-deposit '0 NEAR' \
  add-action function-call third  json-args '{}' prepaid-gas '1.0 Tgas' attached-deposit '0 NEAR' \
  add-action #function-call forth json-args '{}' prepaid-gas '1.0 Tgas' attached-deposit '0 NEAR'

error: unexpected argument 'add-action' found

Usage: near transaction construct-transaction add-action function-call prepaid-gas attached-deposit add-action function-call prepaid-gas attached-deposit add-action function-call prepaid-gas attached-deposit [DEPOSIT] [COMMAND]

For more information, try '--help'.

The problem seems to be connected with interactive_clap limitations:

#[derive(Debug, Clone, EnumDiscriminants, interactive_clap::InteractiveClap)]
#[interactive_clap(context = super::ConstructTransactionContext)]
#[strum_discriminants(derive(EnumMessage, EnumIter))]
/// Select an action that you want to add to the action:
pub enum NextAction {
#[strum_discriminants(strum(message = "skip - Skip adding a new action"))]
/// Go to transaction signing
Skip(super::skip_action::SkipAction),
}

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

1 participant