bex_simulate

Validate a BEX request without storing it. Returns whether the request would be accepted, its deterministic bundle hash, and a list of any validation issues.

Use this to verify your request is well-formed before submitting with bex_sendBundle.

Parameters

Identical to bex_sendBundle:

Field
Type
Required
Description

targetBlock

number

Yes

Block number to target

replacementUuid

string

No

UUID (validated but not stored)

replacementNonce

number

No

Replacement nonce (validated but not stored)

bex

object

Yes

BEX extension with compute and execute specs

Request

{
  "jsonrpc": "2.0",
  "method": "bex_simulate",
  "params": [{
    "targetBlock": 20000000,
    "bex": {
      "compute": {
        "to": "0x1111111111111111111111111111111111111111",
        "calldata": "0x70a08231..."
      },
      "execute": {
        "to": "0x2222222222222222222222222222222222222222",
        "selector": "0xa9059cbb",
        "prefixArgs": "0x",
        "appendComputeResult": true
      }
    }
  }],
  "id": 1
}

Response

If validation fails:

Field
Type
Description

accepted

boolean

true if the request passes all validation checks

bundleHash

string

Deterministic hash of the request (same as bex_sendBundle would return)

issues

string[]

List of validation errors. Empty if accepted is true.

Notes

  • The request is not stored — simulate never affects block building.

  • The bundleHash is deterministic: the same inputs always produce the same hash, so you can use it to correlate with a future bex_sendBundle submission.

Last updated