chain

Simulate Transaction

Simulates a signed transaction in the current network context without broadcasting, returning an encoded outcome, potential events, and resource cost metrics (CPU, memory). The response also includes the minimum resource fee and ledger number, enabling developers to verify, optimize, and confirm transaction behavior before committing funds.

💡 Compute Unit Value: 50 (Fixed)

post/defi/v1/chain/simulatetransaction

Request

  • Base URL
    https://svc.blockdaemon.com
  • URL
    https://svc.blockdaemon.com/defi/v1/chain/simulatetransaction
  • Auth
    API key in header X-API-Key

Request body

chainId'1500' | '1501'

The unique ID to direct queries or transactions to the correct blockchain. Find more here.

chainSymbolstring

The abbreviated chain name for queries or transactions.

rawTransactionstring required

A signed Stellar transaction, serialized as a base64 string.

Example request

{
  "chainId": "1500",
  "chainSymbol": "ETH",
  "rawTransaction": "0xf86f048433918fbe830493e0949b79d6dfe4650d70f35dbb80f7d1ec0cf7f823fd87038d7ea4c6800084022794382da0c9bd6b5c7e18a258b04039d524a3e1382ec0f522d160dc027428933f520b6868a07332736f1df297842299230820626f1fc5b8d4cdd602ade55e3ba02c63e756ce"
}

Response

Successful response

statusinteger
msgstring
dataobject

Example response

{
  "status": 200,
  "msg": "success",
  "data": {
    "result": {
      "transactionData": "AAAAAAAAAAEAAAAHCxRSx/lCsIebq3ncX/0VB3zL1ZCf+AY3FmCgx7Q9iO0AAAABAAAABgAAAAFV3d0a2VhBZ+54/g6tRMfgt+WajUevdHo3A8wtDuWS+QAAABQAAAABADpyuAAAAwAAAACEAAAAAAAAxO0=",
      "minResourceFee": "50413",
      "events": [
        "AAAAAQAAAAAAAAAAAAAAAgAAAAAAAAADAAAADwAAAAdmbl9jYWxsAAAAAA0AAAAgVd3dGtlYQWfueP4OrUTH4Lflmo1Hr3R6NwPMLQ7lkvkAAAAPAAAACWluY3JlbWVudAAAAAAAAAE=",
        "AAAAAQAAAAAAAAABVd3dGtlYQWfueP4OrUTH4Lflmo1Hr3R6NwPMLQ7lkvkAAAACAAAAAAAAAAIAAAAPAAAACWZuX3JldHVybgAAAAAAAA8AAAAJaW5jcmVtZW50AAAAAAAAAwAAAAI="
      ],
      "results": [
        {
          "auth": [],
          "xdr": "AAAAAwAAAAI="
        }
      ],
      "cost": {
        "cpuInsns": "830456",
        "memBytes": "1223985"
      },
      "latestLedger": 51103937
    }
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.