wait_for_transaction_visibility
Documentation for eth_defi.provider.receipt.wait_for_transaction_visibility function.
- wait_for_transaction_visibility(web3, tx_hash, timeout, poll_delay=1.0, max_poll_delay=5.0, allow_partial_visibility_after_timeout=True)
Wait for a transaction to become visible through read RPC providers.
Unlike
wait_for_transaction_receipt_robust(), this checks a pending transaction witheth_getTransactionByHash. It gates sequential nonce broadcasts: the following transaction is sent as soon as every configured read provider can return the preceding transaction.At timeout, one visible transaction response is enough to proceed by default. This prevents a failed or lagging read provider from unnecessarily blocking the batch. It does not confirm that the transaction was mined.
- Parameters
timeout (float) – Maximum seconds to wait for all read providers to see the transaction.
poll_delay (float) – Initial delay between visibility polls.
max_poll_delay (float) – Maximum adaptive delay between visibility polls.
allow_partial_visibility_after_timeout (bool) – Proceed at timeout when at least one read provider sees the transaction.
web3 (web3.main.Web3) –
- Returns
Raw JSON-RPC transaction data from one provider that sees the hash.
- Raises
TransactionVisibilityTimedOut – No read provider saw the transaction before the timeout, or all-provider visibility was required and did not happen.
- Return type