starknet_simulateTransactions RPC Method
Please note that some of the transactions may revert, in which case no error is thrown, but revert details can be seen on the returned trace object. Additionally, the revert_error property in the trace will indicate any transactions that have experienced a revert. Other types of failures (e.g. unexpected error or failure in the validation phase) will result in TRANSACTION_EXECUTION_ERROR.
Parameters
block_id
string
REQUIRED
The hash of the requested block, or number (height) of the requested block, or a block tag, for the block referencing the state or call the transaction on
transactions
array
REQUIRED
The sequence of transactions to simulate, running each transaction on the state resulting from applying all the previous ones. It can take one of the following objects:
BROADCASTED_INVOKE_TXN
object
The broadcasted invoke transaction object which contains the following fields:
type
string
REQUIRED
The type of declare. It can take only one value - 'INVOKE'
max_fee
string
REQUIRED
The maximal fee that can be charged for including the transaction
version
string
REQUIRED
The version of the transaction scheme
signature
string
REQUIRED
The signature associated with the transaction
contract_address
string
REQUIRED
The address of the contract
entry_point_selector
string
REQUIRED
The entry point selector
calldata
array
REQUIRED
The parameters passed to the constructor
BROADCASTED_DECLARE_TXN
object
The broadcasted declare transaction which contains one of the following objects:
BROADCASTED_DECLARE_TXN_V1
object
The Broadcasted declare contract transaction V1
type
string
REQUIRED
The type of declare. It can take only one value - 'DECLARE'
sender_address
string
REQUIRED
The address of the account contract sending the declaration transaction
max_fee
string
REQUIRED
The maximal fee that can be charged for including the transaction
version
string
REQUIRED
The version of the transaction scheme
signature
string
REQUIRED
The signature associated with the transaction
nonce
string
REQUIRED
The nonce value
contract_class
object
REQUIRED
The class to be declared
sierra_program
array
REQUIRED
The list of Sierra instructions of which the program consists
contract_class_version
string
REQUIRED
The version of the contract class object. Currently, the Starknet OS supports version 0.1.0
entry_points_by_type
object
REQUIRED
The entry points by type object which contains the following fields:
CONSTRUCTOR
array
REQUIRED
The list of Sierra instructions of which the program consists
selector
string
REQUIRED
A unique identifier of the entry point (function) in the program
function_idx
integer
REQUIRED
The index of the function in the program
EXTERNAL
array
REQUIRED
The list of Sierra instructions of which the program consists
selector
string
REQUIRED
A unique identifier of the entry point (function) in the program
function_idx
integer
REQUIRED
The index of the function in the program
L1_HANDLER
array
REQUIRED
The list of Sierra instructions of which the program consists
selector
string
REQUIRED
A unique identifier of the entry point (function) in the program
function_idx
integer
REQUIRED
The index of the function in the program
abi
string
The class ABI, as supplied by the user declaring the class
BROADCASTED_DECLARE_TXN_V2
object
The Broadcasted declare Contract Transaction V2
type
string
REQUIRED
The type of declare. It can take only one value - 'DECLARE'
sender_address
string
REQUIRED
The address of the account contract sending the declaration transaction
compiled_class_hash
string
REQUIRED
The hash of the Cairo assembly resulting from the Sierra compilation
max_fee
string
REQUIRED
The maximal fee that can be charged for including the transaction
version
string
REQUIRED
The version of the transaction scheme
signature
string
REQUIRED
The signature associated with the transaction
nonce
string
REQUIRED
The nonce value
contract_class
object
REQUIRED
The class to be declared
sierra_program
array
REQUIRED
The list of Sierra instructions of which the program consists
contract_class_version
string
REQUIRED
The version of the contract class object. Currently, the Starknet OS supports version 0.1.0
entry_points_by_type
object
REQUIRED
The entry points by type object which contains the following fields:
CONSTRUCTOR
array
REQUIRED
The list of Sierra instructions of which the program consists
selector
string
REQUIRED
A unique identifier of the entry point (function) in the program
function_idx
integer
REQUIRED
The index of the function in the program
EXTERNAL
array
REQUIRED
The list of Sierra instructions of which the program consists
selector
string
REQUIRED
A unique identifier of the entry point (function) in the program
function_idx
integer
REQUIRED
The index of the function in the program
L1_HANDLER
array
REQUIRED
The list of Sierra instructions of which the program consists
selector
string
REQUIRED
A unique identifier of the entry point (function) in the program
function_idx
integer
REQUIRED
The index of the function in the program
abi
string
The class ABI, as supplied by the user declaring the class
BROADCASTED_DECLARE_TXN_V3
object
The Broadcasted declare Contract Transaction V3
type
string
REQUIRED
The type of declare. It can take only one value - 'DECLARE'
sender_address
string
REQUIRED
The address of the account contract sending the declaration transaction
compiled_class_hash
string
REQUIRED
The hash of the Cairo assembly resulting from the Sierra compilation
max_fee
string
REQUIRED
The maximal fee that can be charged for including the transaction
version
string
REQUIRED
The version of the transaction scheme
signature
string
REQUIRED
The signature associated with the transaction
nonce
string
REQUIRED
The nonce value
contract_class
object
REQUIRED
The class to be declared
sierra_program
array
REQUIRED
The list of Sierra instructions of which the program consists
contract_class_version
string
REQUIRED
The version of the contract class object. Currently, the Starknet OS supports version 0.1.0
entry_points_by_type
object
REQUIRED
The entry points by type object which contains the following fields:
CONSTRUCTOR
array
REQUIRED
The list of Sierra instructions of which the program consists
selector
string
REQUIRED
A unique identifier of the entry point (function) in the program
function_idx
integer
REQUIRED
The index of the function in the program
EXTERNAL
array
REQUIRED
The list of Sierra instructions of which the program consists
selector
string
REQUIRED
A unique identifier of the entry point (function) in the program
function_idx
integer
REQUIRED
The index of the function in the program
L1_HANDLER
array
REQUIRED
The list of Sierra instructions of which the program consists
selector
string
REQUIRED
A unique identifier of the entry point (function) in the program
function_idx
integer
REQUIRED
The index of the function in the program
abi
string
The class ABI, as supplied by the user declaring the class
resource_bounds
object
REQUIRED
The resource bounds for the transaction execution
l1_gas
string
REQUIRED
The max amount and max price per unit of L1 gas used in this tx
max_amount
string
REQUIRED
The max amount of the resource that can be used in the tx
max_price_per_unit
string
REQUIRED
The max price per unit of this resource for this tx
l2_gas
string
REQUIRED
The max amount and max price per unit of L2 gas used in this tx
max_amount
string
REQUIRED
The max amount of the resource that can be used in the tx
max_price_per_unit
string
REQUIRED
The max price per unit of this resource for this tx
tip
string
REQUIRED
The tip for the transaction
paymaster_data
array
REQUIRED
The data needed to allow the paymaster to pay for the transaction in native tokens
account_deployment_data
array
REQUIRED
The data needed to deploy the account contract from which this tx will be initiated
nonce_data_availability_mode
string
REQUIRED
The storage domain of the account's nonce (an account has a nonce per DA mode). It can be one of 'L1' or 'L2'
fee_data_availability_mode
string
REQUIRED
The storage domain of the account's balance from which fee will be charged. It can be one of 'L1' or 'L2'
BROADCASTED_DEPLOY_ACCOUNT_TXN
object
The broadcasted deploy account transaction which contains one of the following objects:
DEPLOY_ACCOUNT_TXN_V1
object
The deploy account transaction object which contains the following field:
type
string
REQUIRED
The type of declare. It can take only one value - 'DEPLOY_ACCOUNT'
max_fee
string
REQUIRED
The maximal fee that can be charged for including the transaction
version
string
REQUIRED
The version of the transaction scheme
signature
string
REQUIRED
The signature associated with the transaction
nonce
string
REQUIRED
The nonce value
contract_address_salt
string
REQUIRED
The salt for the address of the deployed contract
constructor_calldata
array
REQUIRED
The parameters passed to the constructor
class_hash
string
REQUIRED
The hash of the deployed contract's class
DEPLOY_ACCOUNT_TXN_V3
object
The deploy account transaction object which contains the following field:
type
string
REQUIRED
The type of declare. It can take only one value - 'DEPLOY_ACCOUNT'
version
string
REQUIRED
The version of the transaction scheme
signature
string
REQUIRED
The signature associated with the transaction
nonce
string
REQUIRED
The nonce value
contract_address_salt
string
REQUIRED
The salt for the address of the deployed contract
constructor_calldata
array
REQUIRED
The parameters passed to the constructor
class_hash
string
REQUIRED
The hash of the deployed contract's class
resource_bounds
object
REQUIRED
The resource bounds for the transaction execution
l1_gas
string
REQUIRED
The max amount and max price per unit of L1 gas used in this tx
max_amount
string
REQUIRED
The max amount of the resource that can be used in the tx
max_price_per_unit
string
REQUIRED
The max price per unit of this resource for this tx
l2_gas
string
REQUIRED
The max amount and max price per unit of L2 gas used in this tx
max_amount
string
REQUIRED
The max amount of the resource that can be used in the tx
max_price_per_unit
string
REQUIRED
The max price per unit of this resource for this tx
tip
string
REQUIRED
The tip for the transaction
paymaster_data
array
REQUIRED
The data needed to allow the paymaster to pay for the transaction in native tokens
nonce_data_availability_mode
string
REQUIRED
The storage domain of the account's nonce (an account has a nonce per DA mode). It can be one of 'L1' or 'L2'
fee_data_availability_mode
string
REQUIRED
The storage domain of the account's balance from which fee will be charged. It can be one of 'L1' or 'L2'
simulation_flags
array
REQUIRED
It describes what parts of the transaction should be executed. Possible value is - 'SKIP_VALIDATE'
Returns
result
object
The execution trace and consuemd resources of the required transactions
schema
object
The schema object which contains the following objects:
transaction_trace
object
The transaction's trace object which contains the following objects:
trace_root
object
The trace fields which can come from one of the following objects:
INVOKE_TXN_TRACE
object
The execution trace of an invoke transaction
validate_invocation
object
(Optional) The validate invocation schema which contains following fields:
contract_address
string
The address of the contract
entry_point_selector
string
The entry point selector
calldata
array
The parameters passed to the constructor
caller_address
string
The address of the invoking contract. 0 for the root invocation
class_hash
string
The hash of the class being called
entry_point_type
string
The type of entry point. Possible values includes - 'EXTERNAL', 'L1_HANDLER', 'CONSTRUCTOR'
call_type
string
The type of call. Possible values includes - 'LIBRARY_CALL', 'CALL', 'DELEGATE'
result
array
The value returned from the function invocation
calls
array
The calls made by this invocation. It contains the sub-calls
events
array
The events emitted in this invocation
order
integer
The order of the event within the transaction
keys
array
The keys associated with the event
data
array
The data associated with the event
messages
array
The messages sent by this invocation to L1
order
integer
The order of the message within the transaction
from_address
string
The address of the L2 contract sending the message
to_address
string
The target L1 address the message is sent to
payload
string
The payload of the message
execution_resources
array
The resources consumed by the internal call
steps
integer
The number of Cairo steps used
memory_holes
integer
The number of unused memory cells (each cell is roughly equivalent to a step)
range_check_builtin_applications
integer
The number of RANGE_CHECK builtin instances
pedersen_builtin_applications
integer
The number of Pedersen builtin instances
poseidon_builtin_applications
integer
The number of Poseidon builtin instances
ec_op_builtin_applications
integer
The number of EC_OP builtin instances
ecdsa_builtin_applications
integer
The number of ECDSA builtin instances
bitwise_builtin_applications
integer
The number of BITWISE builtin instances
keccak_builtin_applications
integer
The number of KECCAK builtin instances
segment_arena_builtin
integer
The number of accesses to the segment arena
execute_invocation
object
The trace of the __execute__ call or constructor call, depending on the transaction type (none for declare transactions)
revert_reason
string
The revert reason for the failed execution
contract_address
string
The address of the contract
entry_point_selector
string
The entry point selector
calldata
array
The parameters passed to the constructor
caller_address
string
The address of the invoking contract. 0 for the root invocation
class_hash
string
The hash of the class being called
entry_point_type
string
The type of entry point. Possible values includes - 'EXTERNAL', 'L1_HANDLER', 'CONSTRUCTOR'
call_type
string
The type of call. Possible values includes - 'LIBRARY_CALL', 'CALL', 'DELEGATE'
result
array
The value returned from the function invocation
calls
array
The calls made by this invocation. It contains the sub-calls
events
array
The events emitted in this invocation
order
integer
The order of the event within the transaction
keys
array
The keys associated with the event
data
array
The data associated with the event
messages
array
The messages sent by this invocation to L1
order
integer
The order of the message within the transaction
from_address
string
The address of the L2 contract sending the message
to_address
string
The target L1 address the message is sent to
payload
string
The payload of the message
execution_resources
array
The resources consumed by the internal call
steps
integer
The number of Cairo steps used
memory_holes
integer
The number of unused memory cells (each cell is roughly equivalent to a step)
range_check_builtin_applications
integer
The number of RANGE_CHECK builtin instances
pedersen_builtin_applications
integer
The number of Pedersen builtin instances
poseidon_builtin_applications
integer
The number of Poseidon builtin instances
ec_op_builtin_applications
integer
The number of EC_OP builtin instances
ecdsa_builtin_applications
integer
The number of ECDSA builtin instances
bitwise_builtin_applications
integer
The number of BITWISE builtin instances
keccak_builtin_applications
integer
The number of KECCAK builtin instances
segment_arena_builtin
integer
The number of accesses to the segment arena
fee_transfer_invocation
object
(Optional) The fee transfer invocation schema which contains following fields:
contract_address
string
The address of the contract
entry_point_selector
string
The entry point selector
calldata
array
The parameters passed to the constructor
caller_address
string
The address of the invoking contract. 0 for the root invocation
class_hash
string
The hash of the class being called
entry_point_type
string
The type of entry point. Possible values includes - 'EXTERNAL', 'L1_HANDLER', 'CONSTRUCTOR'
call_type
string
The type of call. Possible values includes - 'LIBRARY_CALL', 'CALL', 'DELEGATE'
result
array
The value returned from the function invocation
calls
array
The calls made by this invocation. It contains the sub-calls
events
array
The events emitted in this invocation
order
integer
The order of the event within the transaction
keys
array
The keys associated with the event
data
array
The data associated with the event
messages
array
The messages sent by this invocation to L1
order
integer
The order of the message within the transaction
from_address
string
The address of the L2 contract sending the message
to_address
string
The target L1 address the message is sent to
payload
string
The payload of the message
execution_resources
array
The resources consumed by the internal call
steps
integer
The number of Cairo steps used
memory_holes
integer
The number of unused memory cells (each cell is roughly equivalent to a step)
range_check_builtin_applications
integer
The number of RANGE_CHECK builtin instances
pedersen_builtin_applications
integer
The number of Pedersen builtin instances
poseidon_builtin_applications
integer
The number of Poseidon builtin instances
ec_op_builtin_applications
integer
The number of EC_OP builtin instances
ecdsa_builtin_applications
integer
The number of ECDSA builtin instances
bitwise_builtin_applications
integer
The number of BITWISE builtin instances
keccak_builtin_applications
integer
The number of KECCAK builtin instances
segment_arena_builtin
integer
The number of accesses to the segment arena
state_diff
object
(Optional) The state diff object which contains the following objects:
storage_entries
array
The previous global state root
key
string
The key value
value
string
The value
deprecated_declared_classes
array
The hash of the declared class
class_hash
string
The hash of the contract code
address
string
The address of the contract
declared_classes
array
The declared class hash and compiled class hash
class_hash
string
The hash of the declared class
compiled_class_hash
string
The Cairo assembly hash corresponding to the declared class
deployed_contracts
array
The contract deployed as part of the state update
class_hash
string
The hash of the contract code
address
string
The address of the contract
replaced_classes
array
The list of contracts whose class was replaced
class_hash
string
The new class hash
contract_address
string
The address of the contract whose class was replaced
nonces
array
The updated nonce per contract address
nonce
string
The nonce for the given address at the end of the block
contract_address
string
The address of the contract
execution_resources
string
The resources consumed by the transaction
data_availability
object
The data-availability resources of this transaction, which contains the following fields:
l1_gas
integer
The gas consumed by this transaction's data
l1_data_gas
integer
The data gas consumed by this transaction's data, 0 if it uses gas for DA
steps
integer
The number of Cairo steps used
memory_holes
integer
The number of unused memory cells (each cell is roughly equivalent to a step)
range_check_builtin_applications
integer
The number of RANGE_CHECK builtin instances
pedersen_builtin_applications
integer
The number of Pedersen builtin instances
poseidon_builtin_applications
integer
The number of Poseidon builtin instances
ec_op_builtin_applications
integer
The number of EC_OP builtin instances
ecdsa_builtin_applications
integer
The number of ECDSA builtin instances
bitwise_builtin_applications
integer
The number of BITWISE builtin instances
keccak_builtin_applications
integer
The number of KECCAK builtin instances
segment_arena_builtin
integer
The number of accesses to the segment arena
type
object
The type. Possible value include - 'INVOKE'
DECLARE_TXN_TRACE
object
The execution trace of an declare transaction
validate_invocation
object
(Optional) The validate invocation schema which contains following fields:
contract_address
string
The address of the contract
entry_point_selector
string
The entry point selector
calldata
array
The parameters passed to the constructor
caller_address
string
The address of the invoking contract. 0 for the root invocation
class_hash
string
The hash of the class being called
entry_point_type
string
The type of entry point. Possible values includes - 'EXTERNAL', 'L1_HANDLER', 'CONSTRUCTOR'
call_type
string
The type of call. Possible values includes - 'LIBRARY_CALL', 'CALL', 'DELEGATE'
result
array
The value returned from the function invocation
calls
array
The calls made by this invocation. It contains the sub-calls
events
array
The events emitted in this invocation
order
integer
The order of the event within the transaction
keys
array
The keys associated with the event
data
array
The data associated with the event
messages
array
The messages sent by this invocation to L1
order
integer
The order of the message within the transaction
from_address
string
The address of the L2 contract sending the message
to_address
string
The target L1 address the message is sent to
payload
string
The payload of the message
execution_resources
array
The resources consumed by the internal call
steps
integer
The number of Cairo steps used
memory_holes
integer
The number of unused memory cells (each cell is roughly equivalent to a step)
range_check_builtin_applications
integer
The number of RANGE_CHECK builtin instances
pedersen_builtin_applications
integer
The number of Pedersen builtin instances
poseidon_builtin_applications
integer
The number of Poseidon builtin instances
ec_op_builtin_applications
integer
The number of EC_OP builtin instances
ecdsa_builtin_applications
integer
The number of ECDSA builtin instances
bitwise_builtin_applications
integer
The number of BITWISE builtin instances
keccak_builtin_applications
integer
The number of KECCAK builtin instances
segment_arena_builtin
integer
The number of accesses to the segment arena
fee_transfer_invocation
object
(Optional) The fee transfer invocation schema which contains following fields:
contract_address
string
The address of the contract
entry_point_selector
string
The entry point selector
calldata
array
The parameters passed to the constructor
caller_address
string
The address of the invoking contract. 0 for the root invocation
class_hash
string
The hash of the class being called
entry_point_type
string
The type of entry point. Possible values includes - 'EXTERNAL', 'L1_HANDLER', 'CONSTRUCTOR'
call_type
string
The type of call. Possible values includes - 'LIBRARY_CALL', 'CALL', 'DELEGATE'
result
array
The value returned from the function invocation
calls
array
The calls made by this invocation. It contains the sub-calls
events
array
The events emitted in this invocation
order
integer
The order of the event within the transaction
keys
array
The keys associated with the event
data
array
The data associated with the event
messages
array
The messages sent by this invocation to L1
order
integer
The order of the message within the transaction
from_address
string
The address of the L2 contract sending the message
to_address
string
The target L1 address the message is sent to
payload
string
The payload of the message
execution_resources
array
The resources consumed by the internal call
steps
integer
The number of Cairo steps used
memory_holes
integer
The number of unused memory cells (each cell is roughly equivalent to a step)
range_check_builtin_applications
integer
The number of RANGE_CHECK builtin instances
pedersen_builtin_applications
integer
The number of Pedersen builtin instances
poseidon_builtin_applications
integer
The number of Poseidon builtin instances
ec_op_builtin_applications
integer
The number of EC_OP builtin instances
ecdsa_builtin_applications
integer
The number of ECDSA builtin instances
bitwise_builtin_applications
integer
The number of BITWISE builtin instances
keccak_builtin_applications
integer
The number of KECCAK builtin instances
segment_arena_builtin
integer
The number of accesses to the segment arena
state_diff
object
(Optional) The state diff object which contains the following objects:
storage_entries
array
The previous global state root
key
string
The key value
value
string
The value
deprecated_declared_classes
array
The hash of the declared class
class_hash
string
The hash of the contract code
address
string
The address of the contract
declared_classes
array
The declared class hash and compiled class hash
class_hash
string
The hash of the declared class
compiled_class_hash
string
The Cairo assembly hash corresponding to the declared class
deployed_contracts
array
The contract deployed as part of the state update
class_hash
string
The hash of the contract code
address
string
The address of the contract
replaced_classes
array
The list of contracts whose class was replaced
class_hash
string
The new class hash
contract_address
string
The address of the contract whose class was replaced
nonces
array
The updated nonce per contract address
nonce
string
The nonce for the given address at the end of the block
contract_address
string
The address of the contract
execution_resources
string
The resources consumed by the transaction
data_availability
object
The data-availability resources of this transaction, which contains the following fields:
l1_gas
integer
The gas consumed by this transaction's data
l1_data_gas
integer
The data gas consumed by this transaction's data, 0 if it uses gas for DA
steps
integer
The number of Cairo steps used
memory_holes
integer
The number of unused memory cells (each cell is roughly equivalent to a step)
range_check_builtin_applications
integer
The number of RANGE_CHECK builtin instances
pedersen_builtin_applications
integer
The number of Pedersen builtin instances
poseidon_builtin_applications
integer
The number of Poseidon builtin instances
ec_op_builtin_applications
integer
The number of EC_OP builtin instances
ecdsa_builtin_applications
integer
The number of ECDSA builtin instances
bitwise_builtin_applications
integer
The number of BITWISE builtin instances
keccak_builtin_applications
integer
The number of KECCAK builtin instances
segment_arena_builtin
integer
The number of accesses to the segment arena
type
object
The type. Possible value include - 'DECLARE'
DEPLOY_ACCOUNT_TXN_TRACE
object
The execution trace of a deploy account transaction
validate_invocation
object
(Optional) The validate invocation schema which contains following fields:
contract_address
string
The address of the contract
entry_point_selector
string
The entry point selector
calldata
array
The parameters passed to the constructor
caller_address
string
The address of the invoking contract. 0 for the root invocation
class_hash
string
The hash of the class being called
entry_point_type
string
The type of entry point. Possible values includes - 'EXTERNAL', 'L1_HANDLER', 'CONSTRUCTOR'
call_type
string
The type of call. Possible values includes - 'LIBRARY_CALL', 'CALL', 'DELEGATE'
result
array
The value returned from the function invocation
calls
array
The calls made by this invocation. It contains the sub-calls
events
array
The events emitted in this invocation
order
integer
The order of the event within the transaction
keys
array
The keys associated with the event
data
array
The data associated with the event
messages
array
The messages sent by this invocation to L1
order
integer
The order of the message within the transaction
from_address
string
The address of the L2 contract sending the message
to_address
string
The target L1 address the message is sent to
payload
string
The payload of the message
execution_resources
array
The resources consumed by the internal call
steps
integer
The number of Cairo steps used
memory_holes
integer
The number of unused memory cells (each cell is roughly equivalent to a step)
range_check_builtin_applications
integer
The number of RANGE_CHECK builtin instances
pedersen_builtin_applications
integer
The number of Pedersen builtin instances
poseidon_builtin_applications
integer
The number of Poseidon builtin instances
ec_op_builtin_applications
integer
The number of EC_OP builtin instances
ecdsa_builtin_applications
integer
The number of ECDSA builtin instances
bitwise_builtin_applications
integer
The number of BITWISE builtin instances
keccak_builtin_applications
integer
The number of KECCAK builtin instances
segment_arena_builtin
integer
The number of accesses to the segment arena
constructor_invocation
object
(Optional) The trace of the __execute__ call or constructor call, depending on the transaction type (none for declare transactions)
contract_address
string
The address of the contract
entry_point_selector
string
The entry point selector
calldata
array
The parameters passed to the constructor
caller_address
string
The address of the invoking contract. 0 for the root invocation
class_hash
string
The hash of the class being called
entry_point_type
string
The type of entry point. Possible values includes - 'EXTERNAL', 'L1_HANDLER', 'CONSTRUCTOR'
call_type
string
The type of call. Possible values includes - 'LIBRARY_CALL', 'CALL', 'DELEGATE'
result
array
The value returned from the function invocation
calls
array
The calls made by this invocation. It contains the sub-calls
events
array
The events emitted in this invocation
order
integer
The order of the event within the transaction
keys
array
The keys associated with the event
data
array
The data associated with the event
messages
array
The messages sent by this invocation to L1
order
integer
The order of the message within the transaction
from_address
string
The address of the L2 contract sending the message
to_address
string
The target L1 address the message is sent to
payload
string
The payload of the message
execution_resources
array
The resources consumed by the internal call
steps
integer
The number of Cairo steps used
memory_holes
integer
The number of unused memory cells (each cell is roughly equivalent to a step)
range_check_builtin_applications
integer
The number of RANGE_CHECK builtin instances
pedersen_builtin_applications
integer
The number of Pedersen builtin instances
poseidon_builtin_applications
integer
The number of Poseidon builtin instances
ec_op_builtin_applications
integer
The number of EC_OP builtin instances
ecdsa_builtin_applications
integer
The number of ECDSA builtin instances
bitwise_builtin_applications
integer
The number of BITWISE builtin instances
keccak_builtin_applications
integer
The number of KECCAK builtin instances
segment_arena_builtin
integer
The number of accesses to the segment arena
fee_transfer_invocation
object
(Optional) The fee transfer invocation schema which contains following fields:
contract_address
string
The address of the contract
entry_point_selector
string
The entry point selector
calldata
array
The parameters passed to the constructor
caller_address
string
The address of the invoking contract. 0 for the root invocation
class_hash
string
The hash of the class being called
entry_point_type
string
The type of entry point. Possible values includes - 'EXTERNAL', 'L1_HANDLER', 'CONSTRUCTOR'
call_type
string
The type of call. Possible values includes - 'LIBRARY_CALL', 'CALL', 'DELEGATE'
result
array
The value returned from the function invocation
calls
array
The calls made by this invocation. It contains the sub-calls
events
array
The events emitted in this invocation
order
integer
The order of the event within the transaction
keys
array
The keys associated with the event
data
array
The data associated with the event
messages
array
The messages sent by this invocation to L1
order
integer
The order of the message within the transaction
from_address
string
The address of the L2 contract sending the message
to_address
string
The target L1 address the message is sent to
payload
string
The payload of the message
execution_resources
array
The resources consumed by the internal call
steps
integer
The number of Cairo steps used
memory_holes
integer
The number of unused memory cells (each cell is roughly equivalent to a step)
range_check_builtin_applications
integer
The number of RANGE_CHECK builtin instances
pedersen_builtin_applications
integer
The number of Pedersen builtin instances
poseidon_builtin_applications
integer
The number of Poseidon builtin instances
ec_op_builtin_applications
integer
The number of EC_OP builtin instances
ecdsa_builtin_applications
integer
The number of ECDSA builtin instances
bitwise_builtin_applications
integer
The number of BITWISE builtin instances
keccak_builtin_applications
integer
The number of KECCAK builtin instances
segment_arena_builtin
integer
The number of accesses to the segment arena
state_diff
object
(Optional) The state diff object which contains the following objects:
storage_entries
array
The previous global state root
key
string
The key value
value
string
The value
deprecated_declared_classes
array
The hash of the declared class
class_hash
string
The hash of the contract code
address
string
The address of the contract
declared_classes
array
The declared class hash and compiled class hash
class_hash
string
The hash of the declared class
compiled_class_hash
string
The Cairo assembly hash corresponding to the declared class
deployed_contracts
array
The contract deployed as part of the state update
class_hash
string
The hash of the contract code
address
string
The address of the contract
replaced_classes
array
The list of contracts whose class was replaced
class_hash
string
The new class hash
contract_address
string
The address of the contract whose class was replaced
nonces
array
The updated nonce per contract address
nonce
string
The nonce for the given address at the end of the block
contract_address
string
The address of the contract
execution_resources
string
The resources consumed by the transaction
data_availability
object
The data-availability resources of this transaction, which contains the following fields:
l1_gas
integer
The gas consumed by this transaction's data
l1_data_gas
integer
The data gas consumed by this transaction's data, 0 if it uses gas for DA
steps
integer
The number of Cairo steps used
memory_holes
integer
The number of unused memory cells (each cell is roughly equivalent to a step)
range_check_builtin_applications
integer
The number of RANGE_CHECK builtin instances
pedersen_builtin_applications
integer
The number of Pedersen builtin instances
poseidon_builtin_applications
integer
The number of Poseidon builtin instances
ec_op_builtin_applications
integer
The number of EC_OP builtin instances
ecdsa_builtin_applications
integer
The number of ECDSA builtin instances
bitwise_builtin_applications
integer
The number of BITWISE builtin instances
keccak_builtin_applications
integer
The number of KECCAK builtin instances
segment_arena_builtin
integer
The number of accesses to the segment arena
type
object
The type. Possible value include - 'DEPLOY_ACCOUNT'
DEPLOY_ACCOUNT_TXN_TRACE
object
The execution trace of a deploy account transaction
function_invocation
object
The trace of the __execute__ call or constructor call, depending on the transaction type (none for declare transactions)
contract_address
string
The address of the contract
entry_point_selector
string
The entry point selector
calldata
array
The parameters passed to the constructor
caller_address
string
The address of the invoking contract. 0 for the root invocation
class_hash
string
The hash of the class being called
entry_point_type
string
The type of entry point. Possible values includes - 'EXTERNAL', 'L1_HANDLER', 'CONSTRUCTOR'
call_type
string
The type of call. Possible values includes - 'LIBRARY_CALL', 'CALL', 'DELEGATE'
result
array
The value returned from the function invocation
calls
array
The calls made by this invocation. It contains the sub-calls
events
array
The events emitted in this invocation
order
integer
The order of the event within the transaction
keys
array
The keys associated with the event
data
array
The data associated with the event
messages
array
The messages sent by this invocation to L1
order
integer
The order of the message within the transaction
from_address
string
The address of the L2 contract sending the message
to_address
string
The target L1 address the message is sent to
payload
string
The payload of the message
execution_resources
array
The resources consumed by the internal call
steps
integer
The number of Cairo steps used
memory_holes
integer
The number of unused memory cells (each cell is roughly equivalent to a step)
range_check_builtin_applications
integer
The number of RANGE_CHECK builtin instances
pedersen_builtin_applications
integer
The number of Pedersen builtin instances
poseidon_builtin_applications
integer
The number of Poseidon builtin instances
ec_op_builtin_applications
integer
The number of EC_OP builtin instances
ecdsa_builtin_applications
integer
The number of ECDSA builtin instances
bitwise_builtin_applications
integer
The number of BITWISE builtin instances
keccak_builtin_applications
integer
The number of KECCAK builtin instances
segment_arena_builtin
integer
The number of accesses to the segment arena
state_diff
object
(Optional) The state diff object which contains the following objects:
storage_entries
array
The previous global state root
key
string
The key value
value
string
The value
deprecated_declared_classes
array
The hash of the declared class
class_hash
string
The hash of the contract code
address
string
The address of the contract
declared_classes
array
The declared class hash and compiled class hash
class_hash
string
The hash of the declared class
compiled_class_hash
string
The Cairo assembly hash corresponding to the declared class
deployed_contracts
array
The contract deployed as part of the state update
class_hash
string
The hash of the contract code
address
string
The address of the contract
replaced_classes
array
The list of contracts whose class was replaced
class_hash
string
The new class hash
contract_address
string
The address of the contract whose class was replaced
nonces
array
The updated nonce per contract address
nonce
string
The nonce for the given address at the end of the block
contract_address
string
The address of the contract
type
object
The type. Possible value include - 'L1_HANDLER'
fee_estimation
object
The transaction's resources and fee
gas_consumed
string
The Ethereum gas consumption of the transaction
gas_price
string
The gas price (in wei or fri, depending on the tx version) that was used in the cost estimation
data_gas_consumed
string
The Ethereum data gas consumption of the transaction
data_gas_price
string
The data gas price (in wei or fri, depending on the tx version) that was used in the cost estimation
overall_fee
string
The estimated fee for the transaction (in wei or fri, depending on the tx version), equals to gas_consumed*gas_price + data_gas_consumed*data_gas_price
unit
string
The units in which the fee is given
Request
1curl --location 'https://docs-demo.strk-mainnet.quiknode.pro/' \2--header 'accept: application/json' \3--header 'content-type: application/json' \4--data '{5"id": 1,6"jsonrpc": "2.0",7"method": "starknet_simulateTransactions",8"params": {9"transactions": [10{11"to": "TO_ADDRESS",12"data": "TRANSACTION_DATA",13"nonce": "NONCE",14"signature": "SIGNATURE"15}16],17"block_id": "latest"18}19}'
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free