Skip to main content

starknet_traceBlockTransactions RPC Method

Returns the execution traces of all transactions included in the given block.

Updated on
Mar 18, 2024

starknet_traceBlockTransactions RPC Method

Parameters

block_id
string
REQUIRED
The hash of the requested block, or number (height) of the requested block, or a block tag

Returns

result
object
The traces object of all transactions in the block
transaction_hash
string
The transaction hash
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'
Request
1
curl --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_traceBlockTransactions",
8
"params": [
9
"latest"
10
]
11
}'
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free