Skip to main content

getTransaction

The getTransaction method provides developers with a powerful tool to efficiently access and retrieve detailed information about specific transactions on the blockchain. By specifying the transaction hash, you can gain valuable insights into the content and characteristics of individual transactions, empowering developers to analyze and monitor blockchain activity effectively.

How to use getTransaction method ?

Below, you'll find an in-depth guide that provides a comprehensive explanation of how to utilize the getTransaction Builder API method effectively using Blast.

Parameters

Below, you can find the query parameters accepted by the method.

FieldTypeDescription
transactionHashstringThe hash of the transaction

Returns

Discover an insightful explanation of the returned parameters here, offering a deep understanding of their significance and implications.

FieldTypeDescription
transactionHashstringThe hash of the transaction
transactionIndexnumberThe index of the transaction
blockHashstringThe hash of the block containing the transaction
blockNumbernumberThe height of the block containing the transaction
blockTimestampstring

The timestamp of the block in which the transfer transaction was executed

executionStatusstring

SUCCEEDED, REVERTED

finalityStatusstring

ACCEPTED_ON_L2, ACCEPTED_ON_L1

type number

The type of the transaction: DECLARE, DEPLOY, DEPLOY_ACCOUNT, INVOKE, L1_HANDLER

versionnumber
actualFeestring
maxFeestring

DECLARE, DEPLOY_ACCOUNT, INVOKE

senderAddressstring

DECLARE, INVOKE_v1

signaturearray[string]

DECLARE, DEPLOY_ACCOUNT, INVOKE

noncenumber

The number of transactions sent from the sender address: DECLARE_v1_v2, DEPLOY_ACCOUNT, INVOKE_v1, L1_HANDLER

newContractAddressstring

DEPLOY, DEPLOY_ACCOUNT

classHashstring

DECLARE, DEPLOY, DEPLOY_ACCOUNT

compiledClassHashstringDECLARE_v2
constructorCallDataarray[string]

DEPLOY, DEPLOY_ACCOUNT

contractAddressSaltstring

DEPLOY, DEPLOY_ACCOUNT

calldataarray[string]

INVOKE, L1_HANDLER

contractAddressstring

The address of the contract: INVOKE_v0, L1_HANDLER

entryPointSelectorstring

INVOKE_v0, L1_HANDLER

eventsarray[object]Array of Event objects
fromAddressstringThe address executing the transaction
keysarray[string]
dataarray[string]
messagesSentarray[object]Array of Message objects
fromAddressstringThe address executing the transaction
toAddressstringThe address on the receiving end of the transaction
payloadarray[strings[
executionResourcesarray[object]
bitwiseBuiltinApplicationsnumber
ecOpBuiltinApplicationsnumber
ecdsaBuiltinApplicationsnnumber
keccakBuiltinApplicationsnumber
memoryHolesnumber
pedersenBuiltinApplicationsnumber
poseidonBuiltinApplicationsnumber
rangeCheckBuiltinApplicationsnumber
stepsnumber
revertReasonstring

Example Request and Result for getTransaction

info

The example in this section uses a non-existing project id.

Make sure you replace it with your Starknet endpoint when issuing the Builder API calls.

Don't have a project id? Here's a straightforward guide on how to obtain one!

Curl request example

curl -X GET https://starknet-mainnet.blastapi.io/<project-id>/builder/getTransaction?transactionHash=0x07749161c5a647d9935bbfd9f61b2694b6b5c5e4937ead39340a31371476a51e -H 'Content-Type: application/json'