wait_crosschain_swaps
Documentation for eth_defi.lifi.crosschain.wait_crosschain_swaps function.
- wait_crosschain_swaps(results, max_wait_seconds=None, poll_interval=10, progress=True)
Wait for cross-chain bridge transfers to complete on destination chains.
Polls the LI.FI
GET /v1/statusendpoint for each executed swap until all transfers reach a terminal status (DONEorFAILED) or the timeout is reached.- Parameters
results (list[eth_defi.lifi.crosschain.CrossChainSwapResult]) – List of executed swap results from
execute_crosschain_swaps()max_wait_seconds (float | None) – Maximum time to wait in seconds. If None, uses 1.5x the maximum
execution_durationacross all swaps, with a minimum of 300s.poll_interval (float) – Seconds between status polls (default 10s)
progress (bool) – Show a
tqdmprogress bar during waiting (defaultTrue)
- Returns
Dict mapping tx_hash → final LI.FI status response dict. Each response contains a
statusfield (DONE,FAILED,PENDING, etc.) and optionally areceivingdict with the destination transaction hash.- Return type