Integration Guide

Submitting an End-of-Block Bundle

Use eth_sendEndOfBlockBundle with the same structure as a regular bundle. The only difference is the method name — the builder handles positioning automatically.

import requests
from eth_account import Account

EUREKA_RPC = "https://rpc.eurekabuilder.xyz"

def send_end_of_block_bundle(signed_txs: list[str], block_number: int, private_key: str):
    body = {
        "jsonrpc": "2.0",
        "method": "eth_sendEndOfBlockBundle",
        "params": [{
            "txs": signed_txs,
            "blockNumber": hex(block_number),
        }],
        "id": 1,
    }

    # Sign the payload with Flashbots-style header
    message = json.dumps(body)
    account = Account.from_key(private_key)
    signature = account.sign_message(encode_defunct(text=message))
    header_value = f"{account.address}:{signature.signature.hex()}"

    response = requests.post(
        EUREKA_RPC,
        json=body,
        headers={"X-Flashbots-Signature": header_value},
    )
    return response.json()

Replacing an End-of-Block Bundle

Use replacementUuid to update the bundle contents up until the block is built. Submit the same UUID with updated txs to replace the previously queued bundle. The builder always uses the latest version.

Cancelling

To cancel without submitting a replacement:

Tracking Inclusion

End-of-block bundles return a bundleHash just like regular bundles. Use eureka_getBundleStats to track whether the bundle was included:

With Refunds

End-of-block bundles support refundPercent and refundRecipient the same as regular bundles. The refund is calculated from the builder's profit attributable to the bundle.

Last updated