getTransaction

Get the contents of a transaction by the given transaction hash

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

transactionHash

string

The hash of the transaction

Returns

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

FieldTypeDescription

transactionHash

string

The hash of the transaction

transactionIndex

number

The index of the transaction

blockHash

string

The hash of the block containing the transaction

blockNumber

number

The height of the block containing the transaction

blockTimestamp

string

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

executionStatus

string

SUCCEEDED, REVERTED

finalityStatus

string

ACCEPTED_ON_L2, ACCEPTED_ON_L1

type

number

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

version

number

actualFee

string

maxFee

string

DECLARE, DEPLOY_ACCOUNT, INVOKE

senderAddress

string

DECLARE, INVOKE_v1

signature

array[string]

DECLARE, DEPLOY_ACCOUNT, INVOKE

nonce

number

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

newContractAddress

string

DEPLOY, DEPLOY_ACCOUNT

classHash

string

DECLARE, DEPLOY, DEPLOY_ACCOUNT

compiledClassHash

string

DECLARE_v2

constructorCallData

array[string]

DEPLOY, DEPLOY_ACCOUNT

contractAddressSalt

string

DEPLOY, DEPLOY_ACCOUNT

calldata

array[string]

INVOKE, L1_HANDLER

contractAddress

string

The address of the contract: INVOKE_v0, L1_HANDLER

entryPointSelector

string

INVOKE_v0, L1_HANDLER

events

array[object]

Array of Event objects

fromAddress

string

The address executing the transaction

keys

array[string]

data

array[string]

messagesSent

array[object]

Array of Message objects

fromAddress

string

The address executing the transaction

toAddress

string

The address on the receiving end of the transaction

payload

array[strings[

executionResources

array[object]

bitwiseBuiltinApplications

number

ecOpBuiltinApplications

number

ecdsaBuiltinApplicationsn

number

keccakBuiltinApplications

number

memoryHoles

number

pedersenBuiltinApplications

number

poseidonBuiltinApplications

number

rangeCheckBuiltinApplications

number

steps

number

revertReason

string

Example Request and Result for getTransaction

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!

Get the contents of a transaction by the given transaction hash

GET https://starkent-mainnet.blastapi.io/<project-id>/builder/getTransaction?

Query Parameters

NameTypeDescription

transactionHash*

String

0x07749161c5a647d9935bbfd9f61b2694b6b5c5e4937ead39340a31371476a51e

{
    "transactionHash": "0x61cd71ef9f4f62807d6c6ba124e2bfafde4db5778f6830df0b81794b8ed29aa7",
    "transactionIndex": 27,
    "blockHash": "0x248aac16904eb52e25ff4a594acbea314a216d5fc0968facb0c10366503aaab2",
    "blockNumber": 18375873,
    "blockTimestamp": "2023-10-18T07:51:59.000Z",
    "fromAddress": "0xf16e9b0d03470827a95cdfd0cb8a8a3b46969b91",
    "toAddress": "0x013062189dc3dcc99e9cee714c513033b8d99e3c",
    "nonce": 2096256,
    "minerAddress": "0x388c818ca8b9251b393131c08a736a67ccb19297",
    "gasLimit": "100000",
    "gasPrice": "7305248398",
    "gasUsed": "29640",
    "value": "0",
    "contractAddress": null,
    "input": "0xa9059cbb00000000000000000000000058edf78281334335effa23101bbe3371b6a36a510000000000000000000000000000000000000000000008d5df38fe835121a9cf",
    "status": 1,
    "type": 2
}

Curl request example

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

Last updated