Skip to main content

starknet_getTransactionReceipt RPC Method

Returns the transaction receipt by the transaction hash.

Updated on
Mar 18, 2024

Parameters

transaction_hash
string
REQUIRED

The hash of the requested transaction

Returns

result
object

The result object which contains one of the following object:

TXN_RECEIPT_WITH_BLOCK_INFO
object

(Optional) The transaction receipt together with its block info. A pre-confirmed receipt has the same shape, with block_hash omitted. It can be one of the following objects

INVOKE_TXN_RECEIPT
object

The invoke transaction receipt object which contains one of the following object:

type
string

The type. The values it can take includes 'INVOKE'

transaction_hash
string

The hash identifying the transaction

block_hash
string

(Optional) The hash of the block including the transaction; omitted when the transaction is pre-confirmed and not yet part of a block

block_number
integer

The number of the block including the transaction

actual_fee
string

The fee that was charged by the sequencer

amount
string

The amount paid

unit
string

The units in which the fee is given

execution_status
string

The execution status. Possible values includes - 'SUCCEEDED' or 'REVERTED'

finality_status
string

The finality status of the tx. Possible values includes - 'PRE_CONFIRMED', 'ACCEPTED_ON_L2' or 'ACCEPTED_ON_L1'

messages_sent
array

The Messages sent

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

revert_reason
string

(Optional) The revert reason for the failed execution

events
array

The events emitted as part of this transaction

from_address
string

The address of the L2 contract sending the message

keys
array

The keys associated with the event

data
array

The data associated with the event

execution_resources
object

The resources consumed by the transaction, which contains the following fields

l1_gas
integer

The L1 gas consumed by the transaction

l1_data_gas
integer

The L1 data gas consumed by the transaction

l2_gas
integer

The L2 gas consumed by the transaction

L1_HANDLER_TXN_RECEIPT
object

The L1 handler transaction receipt object which contains one of the following object:

type
string

The type. The values it can take includes 'L1_HANDLER'

message_hash
string

The message hash as it appears on the L1 core contract

transaction_hash
string

The hash identifying the transaction

block_hash
string

(Optional) The hash of the block including the transaction; omitted when the transaction is pre-confirmed and not yet part of a block

block_number
integer

The number of the block including the transaction

actual_fee
string

The fee that was charged by the sequencer

amount
string

The amount paid

unit
string

The units in which the fee is given

execution_status
string

The execution status. Possible values includes - 'SUCCEEDED' or 'REVERTED'

finality_status
string

The finality status of the tx. Possible values includes - 'PRE_CONFIRMED', 'ACCEPTED_ON_L2' or 'ACCEPTED_ON_L1'

messages_sent
array

The Messages sent

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

revert_reason
string

(Optional) The revert reason for the failed execution

events
array

The events emitted as part of this transaction

from_address
string

The address of the L2 contract sending the message

keys
array

The keys associated with the event

data
array

The data associated with the event

execution_resources
object

The resources consumed by the transaction, which contains the following fields

l1_gas
integer

The L1 gas consumed by the transaction

l1_data_gas
integer

The L1 data gas consumed by the transaction

l2_gas
integer

The L2 gas consumed by the transaction

DECLARE_TXN_RECEIPT
object

The declare transaction receipt object which contains one of the following object:

type
string

The type. The values it can take includes 'DECLARE'

transaction_hash
string

The hash identifying the transaction

block_hash
string

(Optional) The hash of the block including the transaction; omitted when the transaction is pre-confirmed and not yet part of a block

block_number
integer

The number of the block including the transaction

actual_fee
string

The fee that was charged by the sequencer

amount
string

The amount paid

unit
string

The units in which the fee is given

execution_status
string

The execution status. Possible values includes - 'SUCCEEDED' or 'REVERTED'

finality_status
string

The finality status of the tx. Possible values includes - 'PRE_CONFIRMED', 'ACCEPTED_ON_L2' or 'ACCEPTED_ON_L1'

messages_sent
array

The Messages sent

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

revert_reason
string

(Optional) The revert reason for the failed execution

events
array

The events emitted as part of this transaction

from_address
string

The address of the L2 contract sending the message

keys
array

The keys associated with the event

data
array

The data associated with the event

execution_resources
object

The resources consumed by the transaction, which contains the following fields

l1_gas
integer

The L1 gas consumed by the transaction

l1_data_gas
integer

The L1 data gas consumed by the transaction

l2_gas
integer

The L2 gas consumed by the transaction

DEPLOY_TXN_RECEIPT
object

The deploy transaction receipt object which contains one of the following object:

type
string

The type. The values it can take includes 'DEPLOY'

contract_address
string

The address of the deployed contract

transaction_hash
string

The hash identifying the transaction

block_hash
string

(Optional) The hash of the block including the transaction; omitted when the transaction is pre-confirmed and not yet part of a block

block_number
integer

The number of the block including the transaction

actual_fee
string

The fee that was charged by the sequencer

amount
string

The amount paid

unit
string

The units in which the fee is given

execution_status
string

The execution status. Possible values includes - 'SUCCEEDED' or 'REVERTED'

finality_status
string

The finality status of the tx. Possible values includes - 'PRE_CONFIRMED', 'ACCEPTED_ON_L2' or 'ACCEPTED_ON_L1'

messages_sent
array

The Messages sent

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

revert_reason
string

(Optional) The revert reason for the failed execution

events
array

The events emitted as part of this transaction

from_address
string

The address of the L2 contract sending the message

keys
array

The keys associated with the event

data
array

The data associated with the event

execution_resources
object

The resources consumed by the transaction, which contains the following fields

l1_gas
integer

The L1 gas consumed by the transaction

l1_data_gas
integer

The L1 data gas consumed by the transaction

l2_gas
integer

The L2 gas consumed by the transaction

DEPLOY_ACCOUNT_TXN_RECEIPT
object

The deploy account transaction receipt object which contains one of the following object:

type
string

The type. The values it can take includes 'DEPLOY_ACCOUNT'

contract_address
string

The address of the deployed contract

transaction_hash
string

The hash identifying the transaction

block_hash
string

(Optional) The hash of the block including the transaction; omitted when the transaction is pre-confirmed and not yet part of a block

block_number
integer

The number of the block including the transaction

actual_fee
string

The fee that was charged by the sequencer

amount
string

The amount paid

unit
string

The units in which the fee is given

execution_status
string

The execution status. Possible values includes - 'SUCCEEDED' or 'REVERTED'

finality_status
string

The finality status of the tx. Possible values includes - 'PRE_CONFIRMED', 'ACCEPTED_ON_L2' or 'ACCEPTED_ON_L1'

messages_sent
array

The Messages sent

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

revert_reason
string

(Optional) The revert reason for the failed execution

events
array

The events emitted as part of this transaction

from_address
string

The address of the L2 contract sending the message

keys
array

The keys associated with the event

data
array

The data associated with the event

execution_resources
object

The resources consumed by the transaction, which contains the following fields

l1_gas
integer

The L1 gas consumed by the transaction

l1_data_gas
integer

The L1 data gas consumed by the transaction

l2_gas
integer

The L2 gas consumed by the transaction

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