Send bundles

merkle supports bundles on both Ethereum and BSC. Bundles are accepted through the standard eth_sendBundle endpoint:

{
    "id": 1,
    "jsonrpc": "2.0",
    "method": "eth_sendBundle",
    "params": [
      {
        txs,               // Array[String], A list of signed transactions to execute in an atomic bundle
        blockNumber,       // String, a hex encoded block number for which this bundle is valid on
        minTimestamp,      // (Optional) Number, the minimum timestamp for which this bundle is valid, in seconds since the unix epoch
        maxTimestamp,      // (Optional) Number, the maximum timestamp for which this bundle is valid, in seconds since the unix epoch
        revertingTxHashes, // (Optional) Array[String], A list of tx hashes that are allowed to revert
        replacementUuid,   // (Optional) String, UUID that can be used to cancel/replace this bundle
      }
    ]
}

The RPC will return a bundle hash:

{
    "id": 1,
    "result": "0x......" // bundle hash
}

Bundles can be cancelled on Ethereum using the eth_cancelBundle RPC endpoint with the replacement UUID.

Bundle cancellation is "best effort", not guaranteed! Cancelling a bundle close to the end of the slot might not work.

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_cancelBundle",
  "params": [
    {
      replacementUuid, // provided buring eth_sendBundle
    }
  ]
}

Last updated