Get Transaction Internals
Overview
The Get Transaction Internals endpoint obtains a single transaction's internals by specifying
its txHash
(transaction hash) as a required path parameter. Transaction internals are essentially logs
and external function calls. The basic data includes block_hash
, block_timestamp
, block_number
, origin
,
to
, fee
, nonce
, sig_r/sig_s/sig_v
, status
, tx_type
, and information regarding gas
. The internals contain
contract
, topics
, log_data
, op_code
, sender
, sig_hash
, value
, input_data
, and output_data
.
Usage
In this example, we receive all internals on the transaction with the
hash 0xe3c64bbfcf28150c490d71e872cccb467f0f1907807df54c14a6cea202e97ec3
.
import * as Parsiq from '@parsiq/parsiq.js';
const client = Parsiq.createClient(process.env.API_KEY, Parsiq.ChainId.ETH_MAINNET);
const internals = await client.transactions.getTransactionInternals(
`0xa23be4f3661263b7677539dd90b9c5b0ce692e2d9fc46bd977e9146fb059a9d9`);
console.log(internals)
Output:
{
hash: '0xa23be4f3661263b7677539dd90b9c5b0ce692e2d9fc46bd977e9146fb059a9d9',
block_hash: '0xe73318973e2cf90d34514016ac4511b58fc4bc135409eab11bfd554aa63e9ed4',
block_timestamp: 1655903450,
index: 91,
block_number: 15007784,
data: {
origin: '0x7d459a4cfa4b70fcd322a649153f6f51d8e8db3d',
to: '0x5361445d9828cd3b1f30a809ef035d06374f7972',
fee: '2678596679024058',
nonce: 42,
sig_r: '0x62782e6ed508b0aa224975a97a5f0afcd045e54528d70bb18c96a9159bfd477f',
sig_s: '0x2cc5117586cdd09602be97a2bff85c0710df9ea05e892afd35b92e8d6bf31151',
sig_v: '0x01',
status: true,
tx_type: 2,
gas_used: 69589,
gas_limit: 104383,
gas_price: '38491667922',
gas_fee_cap: '75482329582',
gas_tip_cap: '1000000000',
txn_fee_savings: '2574143154257740'
},
gas_range: [ 8052039, 8121628 ],
logs: [
{
id: '0000000000e50028-005b-00000000',
sender: '0x7d459a4cfa4b70fcd322a649153f6f51d8e8db3d',
sig_hash: '0xa0712d68',
op_code: 'CALL',
value: '0',
input_data: '0xa0712d680000000000000000000000000000000000000000000000000000000000000002',
output_data: '0x',
contract: '0x5361445d9828cd3b1f30a809ef035d06374f7972'
},
{
id: '0000000000e50028-005b-00000001',
topic_0: '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef',
topic_1: '0x0000000000000000000000000000000000000000000000000000000000000000',
topic_2: '0x0000000000000000000000007d459a4cfa4b70fcd322a649153f6f51d8e8db3d',
topic_3: '0x000000000000000000000000000000000000000000000000000000000000052e',
log_data: '0x',
op_code: 'LOG4',
contract: '0x5361445d9828cd3b1f30a809ef035d06374f7972'
},
{
id: '0000000000e50028-005b-00000002',
topic_0: '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef',
topic_1: '0x0000000000000000000000000000000000000000000000000000000000000000',
topic_2: '0x0000000000000000000000007d459a4cfa4b70fcd322a649153f6f51d8e8db3d',
topic_3: '0x000000000000000000000000000000000000000000000000000000000000052f',
log_data: '0x',
op_code: 'LOG4',
contract: '0x5361445d9828cd3b1f30a809ef035d06374f7972'
}
]
}
Parameters
Path params
chainId
string
REQUIRED
version
string
REQUIRED
txHash
string
REQUIRED
Query params
estimate_cu
boolean