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
Returns

Map of transaction hashes -> receipt

Raises
  • ConfirmationTimedOut – If we cannot get transactions out

  • NonceMismatch

    Starting nonce does not match what we see on chain.

    When check_nonce_validity is set.

  • Exception

    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

Dict[hexbytes.main.HexBytes, dict]