0

So far the team was aiming for doing something like this:

let batch_tx = subxt::dynamic::tx(
    "Utility",
    "batch",
    txes.iter().map(|tx| tx.into_value()).collect::<Vec<Value<_>>>(),
);
1
  • There is an example of creating a dynamic transaction here - it is a multisig example but still helpful - it uses a nested call just like batch does.
    – Bruno
    Commented Dec 8, 2022 at 17:02

1 Answer 1

2

Something like this:

let tx = polkadot::tx()
         .utility()
         .batch(calls);

let hash = api.tx().sign_and_submit_default(&tx, &signer).await?;

println!("Extrinsic submitted: {}", hash);

Ok(())

where calls is a vec! of calls.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.