pub(crate) async fn prepare<'a, N: Network>(
sequence: &ScriptSequenceKind<N>,
sequence_index: usize,
provider: &RootProvider<N>,
transactions: &[(SendTransactionKind<'a, N>, bool, usize)],
gas_estimate_multiplier: u64,
) -> Result<Vec<Awaiting<'a, N>>>where
N::TxEnvelope: for<'de> Deserialize<'de> + Serialize,
N::TransactionRequest: FoundryTransactionBuilder<N> + Serialize,Expand description
Fixes the gas limits of the transactions of configurable accounts with offline owners, before anything is sent.
transactions are the remaining operations of sequence sequence_index, in order. They are
simulated in order up to the last one with offline owners, in one block or else one per block,
so that each gas limit succeeds after the operations before it, which are not sent yet. Fails
when one of them fails, when they fit neither in one block nor in as many blocks as a node
simulates, when one would change its account’s configuration before another transaction of
the account, or when an account already sent the nonce planned for its first transaction.