Transactions

Simulate transaction

Simulate submitting a transaction. To use this, you must:

  • Create a SignedTransaction with a zero-padded signature.
  • Submit a SubmitTransactionRequest containing a UserTransactionRequest containing that signature.
post/transactions/simulate

Request body

senderstring required
sequence_numberstring required
max_gas_amountstring required
gas_unit_pricestring required
expiration_timestamp_secsstring required

Example request

{
  "payload": {
    "type": "ScriptFunctionPayload"
  },
  "signature": {
    "type": "Ed25519Signature",
    "public_key": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1",
    "signature": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1"
  }
}

Response

Example response

[
  {
    "type": "PendingTransaction",
    "payload": {
      "type": "ScriptFunctionPayload"
    },
    "signature": {
      "type": "Ed25519Signature",
      "public_key": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1",
      "signature": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1"
    }
  }
]

Changes