pub async fn batch_make_transfer_transactions(
context: &WalletContext,
max_txn_num: usize,
) -> Vec<Transaction>
Expand description
A helper function to make Transactions with controlled accounts in WalletContext. Particularly, the wallet needs to own gas objects for transactions. However, if this function is called multiple times without any “sync” actions on gas object management, txns may fail and objects may be locked.
The param is called max_txn_num
because it does not always return the exact
same amount of Transactions, for example when there are not enough gas objects
controlled by the WalletContext. Caller should rely on the return value to
check the count.