wait_and_broadcast_multiple_nodes_mev_blocker
Documentation for eth_defi.confirmation.wait_and_broadcast_multiple_nodes_mev_blocker function.
- wait_and_broadcast_multiple_nodes_mev_blocker(provider, txs, max_timeout=datetime.timedelta(seconds=600), poll_delay=datetime.timedelta(seconds=10), broadcast_and_read_delay=datetime.timedelta(seconds=6), try_other_provider_delay=datetime.timedelta(seconds=45))[source]
Broadcast transactions through a MEV blocker enabled endpoint.
Cannot transact multiple transactions simultaneously, need to broadacst and confirm one by one
For all transactions
Broadcast transaction
- Wait until it is confirmed
To avoid nonce errors
- Parameters
web3 – Web3 instance with
eth_defi.provider.fallback.FallbackProvider
configured as its RPC provider.txs (Collection[Union[eth_account.datastructures.SignedTransaction, eth_defi.hotwallet.SignedTransactionWithNonce]]) –
List of transaction to broadcast.
Most be pre-ordered by
(address, nonce)
.check_nonce_validity – Check if signed nonces match on-chain data before attempting to broadcat.
provider (eth_defi.provider.mev_blocker.MEVBlockerProvider) –
- Returns
Map of transaction hashes -> receipt
- Raises
ConfirmationTimedOut – If we cannot get transactions out
Starting nonce does not match what we see on chain.
When
check_nonce_validity
is set.If all nodes fail to broadcast the transaction, then raise an exception.
It’s likely that there is a problem with a transaction.
The exception is raised after we try multiple nodes multiple times, based on
node_switch_timeout
and other arguments.A reverted transaction is not an exception, but will be returned in the receipts.
In the case of multiple exceptions, the last one is raised. The exception is whatever lower stack is giving us.
OutOfGasFunds – The hot wallet account does not have enough native token to cover the tx fees.
- Return type