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), |
|
} |
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() -> ...The problem seems to be connected with
interactive_claplimitations:near-cli-rs/src/commands/transaction/construct_transaction/add_action_last/mod.rs
Lines 3 to 11 in 98960d5