Skip to content

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

Open
@mitinarseny

Description

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),
}

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    • Status

      NEW❗

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions