curl --request POST \
--url https://bsc-mainnet.core.chainstack.com/35848e183f3e3303c8cfeacbea831cab \
--header 'Content-Type: application/json' \
--data '
{
"id": 1,
"jsonrpc": "2.0",
"method": "trace_replayBlockTransactions",
"params": [
"0x23a25c2",
[
"trace"
]
]
}
'{
"jsonrpc": "<string>",
"id": 123,
"result": {}
}curl --request POST \
--url https://bsc-mainnet.core.chainstack.com/35848e183f3e3303c8cfeacbea831cab \
--header 'Content-Type: application/json' \
--data '
{
"id": 1,
"jsonrpc": "2.0",
"method": "trace_replayBlockTransactions",
"params": [
"0x23a25c2",
[
"trace"
]
]
}
'{
"jsonrpc": "<string>",
"id": 123,
"result": {}
}trace_replayBlockTransactions replays transactions in a specified block individually, returning the trace data for each transaction. This method is invaluable for developers, auditors, and analysts who wish to inspect the execution path of transactions within a block, including calls to other contracts, state changes, and execution outcomes, without affecting the live blockchain.
blockHash or blockNumber — The hash or number of the block whose transactions you want to replay, specified as:
Hexadecimal — for the block hash.Hexadecimal or decimal number — for the block number.traceTypes — An array of strings specifying the types of traces to return for each transaction, with options including:
vmTrace — virtual machine trace.trace — standard trace.stateDiff — state difference.result — An array containing the trace data for each transaction in the specified block. Each item in the array represents the trace of a single transaction, detailing calls to contracts, value transfers, and other relevant state changes that occurred during its execution.trace_replayBlockTransactions method is particularly useful for conducting detailed analyses of block transactions. Developers can use it to debug contract interactions within a specific block, auditors can use it to verify the correctness and security of transactions, and analysts might use it to study transaction patterns or detect anomalies. This method provides a granular view of transaction execution, which is essential for understanding complex interactions on the blockchain.Was this page helpful?