POST
/
transactions
/
simulate
curl --request POST \
  --url https://aptos-mainnet.s.chainbase.online/{api-key}/v1/transactions/simulate \
  --header 'Content-Type: application/json' \
  --data '{
  "sender": "0xc739507214d0e1bf9795485299d709e00024e92f7c0d055a4c2c39717882bdfd",
  "sequence_number": "32425224034",
  "max_gas_amount": "32425224034",
  "gas_unit_price": "32425224034",
  "expiration_timestamp_secs": "32425224034",
  "payload": {
    "type": "entry_function_payload",
    "function": "0x1::aptos_coin::transfer",
    "type_arguments": [
      "<string>"
    ],
    "arguments": [
      "<any>"
    ]
  },
  "signature": {
    "type": "ed25519_signature",
    "public_key": "0xc739507214d0e1bf9795485299d709e00024e92f7c0d055a4c2c39717882bdfd",
    "signature": "0xc739507214d0e1bf9795485299d709e00024e92f7c0d055a4c2c39717882bdfd"
  }
}'
[
  {
    "version": "32425224034",
    "hash": "<string>",
    "state_change_hash": "<string>",
    "event_root_hash": "<string>",
    "state_checkpoint_hash": "<string>",
    "gas_used": "32425224034",
    "success": true,
    "vm_status": "<string>",
    "accumulator_root_hash": "<string>",
    "changes": [
      {
        "type": "delete_module",
        "address": "0xc739507214d0e1bf9795485299d709e00024e92f7c0d055a4c2c39717882bdfd",
        "state_key_hash": "<string>",
        "module": "0x1::aptos_coin"
      }
    ],
    "sender": "0xc739507214d0e1bf9795485299d709e00024e92f7c0d055a4c2c39717882bdfd",
    "sequence_number": "32425224034",
    "max_gas_amount": "32425224034",
    "gas_unit_price": "32425224034",
    "expiration_timestamp_secs": "32425224034",
    "payload": {
      "type": "entry_function_payload",
      "function": "0x1::aptos_coin::transfer",
      "type_arguments": [
        "<string>"
      ],
      "arguments": [
        "<any>"
      ]
    },
    "signature": {
      "type": "ed25519_signature",
      "public_key": "0xc739507214d0e1bf9795485299d709e00024e92f7c0d055a4c2c39717882bdfd",
      "signature": "0xc739507214d0e1bf9795485299d709e00024e92f7c0d055a4c2c39717882bdfd"
    },
    "events": [
      {
        "guid": {
          "creation_number": "32425224034",
          "account_address": "0xc739507214d0e1bf9795485299d709e00024e92f7c0d055a4c2c39717882bdfd"
        },
        "sequence_number": "32425224034",
        "type": "<string>",
        "data": "<any>"
      }
    ],
    "timestamp": "32425224034"
  }
]

Query Parameters

estimate_max_gas_amount
boolean

If set to true, the max gas value in the transaction will be ignored and the maximum possible gas will be used

estimate_gas_unit_price
boolean

If set to true, the gas unit price in the transaction will be ignored and the estimated value will be used

estimate_prioritized_gas_unit_price
boolean

If set to true, the transaction will use a higher price than the original estimate.

Body

A request to submit a transaction

This requires a transaction and a signature of it

sender
string
required

A hex encoded 32 byte Aptos account address.

This is represented in a string as a 64 character hex string, sometimes shortened by stripping leading 0s, and adding a 0x.

For example, address 0x0000000000000000000000000000000000000000000000000000000000000001 is represented as 0x1.

Example:

"0xc739507214d0e1bf9795485299d709e00024e92f7c0d055a4c2c39717882bdfd"

sequence_number
string
required

A string containing a 64-bit unsigned integer.

We represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.

Example:

"32425224034"

max_gas_amount
string
required

A string containing a 64-bit unsigned integer.

We represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.

Example:

"32425224034"

gas_unit_price
string
required

A string containing a 64-bit unsigned integer.

We represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.

Example:

"32425224034"

expiration_timestamp_secs
string
required

A string containing a 64-bit unsigned integer.

We represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.

Example:

"32425224034"

payload
object
required

An enum of the possible transaction payloads

signature
object
required

An enum representing the different transaction signatures available

Response

200
application/json
version
string
required

A string containing a 64-bit unsigned integer.

We represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.

Example:

"32425224034"

hash
string
required
state_change_hash
string
required
event_root_hash
string
required
gas_used
string
required

A string containing a 64-bit unsigned integer.

We represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.

Example:

"32425224034"

success
boolean
required

Whether the transaction was successful

vm_status
string
required

The VM status of the transaction, can tell useful information in a failure

accumulator_root_hash
string
required
changes
object[]
required

Final state of resources changed by the transaction

A final state change of a transaction on a resource or module

sender
string
required

A hex encoded 32 byte Aptos account address.

This is represented in a string as a 64 character hex string, sometimes shortened by stripping leading 0s, and adding a 0x.

For example, address 0x0000000000000000000000000000000000000000000000000000000000000001 is represented as 0x1.

Example:

"0xc739507214d0e1bf9795485299d709e00024e92f7c0d055a4c2c39717882bdfd"

sequence_number
string
required

A string containing a 64-bit unsigned integer.

We represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.

Example:

"32425224034"

max_gas_amount
string
required

A string containing a 64-bit unsigned integer.

We represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.

Example:

"32425224034"

gas_unit_price
string
required

A string containing a 64-bit unsigned integer.

We represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.

Example:

"32425224034"

expiration_timestamp_secs
string
required

A string containing a 64-bit unsigned integer.

We represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.

Example:

"32425224034"

payload
object
required

An enum of the possible transaction payloads

events
object[]
required

Events generated by the transaction

An event from a transaction

timestamp
string
required

A string containing a 64-bit unsigned integer.

We represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.

Example:

"32425224034"

state_checkpoint_hash
string
signature
object

An enum representing the different transaction signatures available