execute_crosschain_swaps
Documentation for eth_defi.lifi.crosschain.execute_crosschain_swaps function.
- execute_crosschain_swaps(wallet, source_web3, swaps, progress=True, max_quote_age_seconds=120)
Execute prepared cross-chain gas top-up swaps sequentially.
Signs and broadcasts each swap transaction on the source chain. Waits for each transaction to confirm before proceeding to the next.
If a quote is older than
max_quote_age_seconds(checked viais_valid()), it is automatically re-fetched before execution.- Parameters
wallet (eth_defi.hotwallet.HotWallet) – Hot wallet to sign transactions with
source_web3 (web3.main.Web3) – Web3 connection to the source chain
swaps (list[eth_defi.lifi.crosschain.CrossChainSwap]) – List of prepared swaps from
prepare_crosschain_swaps()progress (bool) – Show a
tqdmprogress bar during execution (defaultTrue)max_quote_age_seconds (float) – Maximum acceptable quote age in seconds before re-fetching (default 120s)
- Returns
List of results with transaction hashes
- Raises
Reverted – If any transaction fails on-chain
- Return type