Skip to main content

/v1/transactions/simulate REST API Endpoint

Allows users to simulate a transaction on the FullNode DevNet platform, providing transaction details in the request body and receiving a response with the simulation result, offering insights into the potential outcome of the transaction.

Updated on
Oct 04, 2023

Query Parameters

estimate_gas_unit_price
boolean

If true, the estimated gas unit price will be used instead of the value specified in the transaction

estimate_max_gas_amount
boolean

If true, the maximum gas value specified in the transaction will be ignored, and the maximum possible gas will be used instead

estimate_prioritized_gas_unit_price
boolean

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

sender
string
REQUIRED

The account from which the transaction was sent

sequence_number
string
REQUIRED

The sequence of a transaction sent by the specific sender

max_gas_amount
string
REQUIRED

The maximum amount of gas allocated for the execution of a transaction

gas_unit_price
string
REQUIRED

The cost per unit of gas, determining the transaction fee paid by the sender for each unit of computational resource consumed

expiration_timestamp_secs
string
REQUIRED

The timestamp indicating the expiration period of a transaction, specifying the time until which the transaction can be included in a block

payload
object
REQUIRED

The data that is being carried by a transaction. It contains the following fields:

type
string

The type of payload indicating the purpose of the data contained

function
string

The function associated with the payload

type_arguments
array

An array specifying the types of arguments provided to the function

arguments
array

An array containing the actual arguments passed to the function

signature
object
REQUIRED

An array with the following fields:

type
string

The type of signature used to verify the authenticity of the function

public_key
string

The public key associated with the account that generated the signature, used for verifying the signature's validity

signature
string

The actual signature generated using the private key corresponding to the public key provided

Returns

version

The version of the simulated transaction

hash

The hash value associated with the simulated transaction

state_change_hash

The hash value of the state change resulting from the simulated transaction

event_root_hash

The hash value of the event root generated by the simulated transaction

state_checkpoint_hash

The hash value of the state checkpoint associated with the simulated transaction

gas_used

The amount of gas used by the simulated transaction

success

It indicated whether the simulated transaction was success or not

vm_status

The virtual machine status of the simulated transaction

accumulator_root_hash

The hash value of the accumulator root associated with the simulated transaction

changes

An array that contains information about the state changes caused by the simulated transaction:

type

The type of change

address

The address associated with the change

state_key_hash

The hash value of the state key

module

The module associated with the change

sender

The sender's address for the simulated transaction

sequence_number

The sequence number of the simulated transaction

max_gas_amount

The maximum amount of gas allowed for the simulated transaction

gas_unit_price

The price per unit of gas for the simulated transaction

expiration_timestamp_secs

The expiration timestamp in seconds for the simulated transaction

payload

An array that contains information about the payload of the simulated transaction:

type

The type of payload

function

The function to be executed as part of the simulated transaction

type_arguments

An array that contains the type arguments associated with the function

arguments

An array that contains the arguments for the function, which may include null or actual values

signature

The signature details for the simulated transaction with the following fields:

type

The type of signature, such as an ed25519 signature

public_key

The public key associated with the simulated transaction

signature

The actual signature value

events

An array that contains information about the events generated by the simulated transaction:

guid

The GUID details for the event

creation_number

The creation number of the event

account_address

The account address associated with the event

sequence_number

The sequence number of the event

type

The type of event

data

The data associated with the event

timestamp

The timestamp associated with the simulated transaction

Request
Don't have an account yet?
Create your Quicknode endpoint in seconds and start building
Get started for free