broadcast_transactions
Documentation for eth_defi.confirmation.broadcast_transactions function.
- broadcast_transactions(web3, txs, confirmation_block_count=0, work_around_bad_nodes=True, bad_node_sleep=0.5)[source]
Broadcast and wait a bunch of signed transactions to confirm.
Multiple transactions can be broadcasted and confirmed in a single go, to ensure fast confirmation batches.
- Parameters
web3 (web3.main.Web3) – Web3
txs (List[eth_account.datastructures.SignedTransaction]) – List of Signed transactions
work_around_bad_nodes – If true try to work around issues with low quality JSON-RPC APIs like Ganache by checking if the transaction broadcast succeeded
confirmation_block_count – How many blocks wait for the transaction receipt to settle. Set to zero to return as soon as we see the first transaction receipt or when using insta-mining tester RPC.
- Returns
List of tx hashes
- Raises
If the JSON-RPC node rejects the transaction.
Anvil will reject some transactions immediately: if there is not enough gas money
Ethereum Tester reject some transactions immediately on any error in automining mode
- Return type
List[hexbytes.main.HexBytes]