Bundle Requirements

  1. The type (legacy, type 2) of the searcher's transaction must be the same as the opportunity-creating transaction.

  2. For legacy transactions, the gasPrice of the searcher's transaction must be the same as the opportunity-creating transaction.

  3. For type 2 (EIP-1559) transactions, both the maxFeePerGas and the maxPriorityFeePerGas of the searcher's transaction must be the same as the opportunity-creating transaction.

  4. The hash used for _oppTxHash argument of the submitFlashBid function must match the hash of the opportunity-creating transaction.

import json
from web3 import Web3
import eth_abi

opportunityTx = web3.eth.get_transaction(hash_of_a_tx_in_mempool)

opportunityTxHash = eth_abi.encode_single('bytes32', opportunityTx.hash)

searcherTxDict = {
    'from': searcher_eoa_address,
    'nonce': searcher_eoa_nonce,
    'maxFeePerGas': opportunityTx.maxFeePerGas,
    'maxPriorityFeePerGas': opportunityTx.maxPriorityFeePerGas,
    'gas': 500_000,
    'chainId': 137,
}

Last updated