Links

getBlockTransactions

Get the contents of all transactions in a block

Parameters

  • blockNumberOrHash :(string) REQUIRED - Indicate the block height or the block hash

Returns

  • blockHash : <string> - The hash of the block containing the transaction
  • blockNumber : <integer> - The height of the block containing the transaction
  • blockTimestamp : <string> - The timestamp of the block in which the transfer transaction was executed
  • transactionCount : <integer> - The number of transactions
  • transactions : <array> - Array of Transaction objects
    • transactionHash: <string>- The hash of the transaction
    • transactionIndex: <integer> - The index of the transaction
    • blockHash : <string> - The hash of the block containing the transaction
    • blockNumber : <integer> - The height of the block containing the transaction
    • blockTimestamp : <string> - The timestamp of the block in which the transfer transaction was executed
    • fromAddress : <string> - The address executing the transaction
    • toAddress : <string> - The address on the receiving end of the transaction
    • nonce : <integer> - The number of transactions sent from the sender address
    • minerAddress : <string> - The address of the validator that mined the block
    • gasLimit : <string> - The maximum amount of gas you set for the transaction
    • gasPrice : <string> - The price per gas unit set for the transaction
    • gasUsed : <string> - The total amount paid for the transaction, a multiplication product of gasLimit and gasPrice
    • value : <string> - The value being transacted
    • contractAddress : <string> - The address of the contract
    • input : <string> - Additional data included for this transaction
    • status : <integer> - The status for the transaction
    • type : <integer> - The type of the transaction

Example Request and Result for getBlockTransactions

Request
curl --location 'https://eth-mainnet.blastapi.io/<project-id>/builder/getBlockTransactions?blockNumberOrHash=18375873'
Result
{
"blockHash": "0x248aac16904eb52e25ff4a594acbea314a216d5fc0968facb0c10366503aaab2",
"blockNumber": 18375873,
"blockTimestamp": "2023-10-18T07:51:59.000Z",
"transactionCount": 101,
"transactions": [
{
"transactionHash": "0x2c40ee001352cfb73a2047c0ec71f016a1bd02e7fa2ed35adeaee46ca0c7719e",
"transactionIndex": 0,
"blockHash": "0x248aac16904eb52e25ff4a594acbea314a216d5fc0968facb0c10366503aaab2",
"blockNumber": 18375873,
"blockTimestamp": "2023-10-18T07:51:59.000Z",
"fromAddress": "0xe65f60ae20998b6cb2d2a6edb2e551843e7bb816",
"toAddress": "0xf482d79ae6e8725c199213fc909d6bc30df62815",
"nonce": 20951,
"minerAddress": "0x388c818ca8b9251b393131c08a736a67ccb19297",
"gasLimit": "90000",
"gasPrice": "11000000000",
"gasUsed": "43580",
"value": "0",
"contractAddress": null,
"input": "0xa9059cbb000000000000000000000000c99d5ae8a7c36325294c2424928bd776ab63f8b7000000000000000000000000000000000000000000000000007e5196c1911e00",
"status": 1,
"type": 0
},
{
"transactionHash": "0x9befb89d0180358d300180c24530d9a16382ef770ec3eddab641e878d71d64e6",
"transactionIndex": 1,
"blockHash": "0x248aac16904eb52e25ff4a594acbea314a216d5fc0968facb0c10366503aaab2",
"blockNumber": 18375873,
"blockTimestamp": "2023-10-18T07:51:59.000Z",
"fromAddress": "0xf2e5c846534535feda767171e0676d7b97689490",
"toAddress": "0x1366c1de83cf5a8a3f3d77293602d1f081877005",
"nonce": 224,
"minerAddress": "0x388c818ca8b9251b393131c08a736a67ccb19297",
"gasLimit": "200000",
"gasPrice": "10000000000",
"gasUsed": "35922",
"value": "0",
"contractAddress": null,
"input": "0xe19c2253000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000000010000000000000000000000009b1f3625980e6acb153da8b06235923845ecca010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000e29a909a294896c167adc29a05681ff987a1d1450000000000000000000000000000000000000000000000000000000000000001000000000000000000000000ca53029a981a807c78c7cde496c5b52ef4532445000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000003866a1100",
"status": 1,
"type": 0
},
{
"transactionHash": "0xa606977aa92227c4fab1ddc66032e9d6077cfaf62cd3c759542de9bfccf57d06",
"transactionIndex": 2,
"blockHash": "0x248aac16904eb52e25ff4a594acbea314a216d5fc0968facb0c10366503aaab2",
"blockNumber": 18375873,
"blockTimestamp": "2023-10-18T07:51:59.000Z",
"fromAddress": "0x264bd8291fae1d75db2c5f573b07faa6715997b5",
"toAddress": "0xdfa6a3daf94944dcf36ed0c9b029f7489a3864af",
"nonce": 212909,
"minerAddress": "0x388c818ca8b9251b393131c08a736a67ccb19297",
"gasLimit": "500000",
"gasPrice": "10000000000",
"gasUsed": "21000",
"value": "63010360000000000",
"contractAddress": null,
"input": "0x",
"status": 1,
"type": 1
},
{
"transactionHash": "0x22bc17f909856ea2bc5288aa089854c0efc91f50f49c11469d3ee4df8ab78794",
"transactionIndex": 3,
"blockHash": "0x248aac16904eb52e25ff4a594acbea314a216d5fc0968facb0c10366503aaab2",
"blockNumber": 18375873,
"blockTimestamp": "2023-10-18T07:51:59.000Z",
"fromAddress": "0x7954377c5efc49e8de403bb171211e413abaf8a2",
"toAddress": "0xb01cb49fe0d6d6e47edf3a072d15dfe73155331c",
"nonce": 5,
"minerAddress": "0x388c818ca8b9251b393131c08a736a67ccb19297",
"gasLimit": "21000",
"gasPrice": "9305248398",
"gasUsed": "21000",
"value": "101755458379311000",
"contractAddress": null,
"input": "0x",
"status": 1,
"type": 2
},
{
"transactionHash": "0xcdf4bf3fb78f95d95bf1190dcab9714fab9b21ecf62f28e1d1fb6878c2f9322a",
"transactionIndex": 4,
"blockHash": "0x248aac16904eb52e25ff4a594acbea314a216d5fc0968facb0c10366503aaab2",
"blockNumber": 18375873,
"blockTimestamp": "2023-10-18T07:51:59.000Z",
"fromAddress": "0xe7889da54a6bcba426f0c159d23bdf8ead96ada0",
"toAddress": "0xdac17f958d2ee523a2206206994597c13d831ec7",
"nonce": 115,
"minerAddress": "0x388c818ca8b9251b393131c08a736a67ccb19297",
"gasLimit": "120000",
"gasPrice": "8838497550",
"gasUsed": "120000",
"value": "0",
"contractAddress": null,
"input": "0xa9059cbb00000000000000000000000077134cbc06cb00b66f4c7e623d5fdbf6777635ec0000000000000000000000000000000000000000000000000000000029e88365",
"status": 0,
"type": 0
},
{
"transactionHash": "0xaf6141476d62c4dbea73f6f6ac1e008d965ef62a8cd7f672bf4ae3ece52f1bdd",
"transactionIndex": 5,
"blockHash": "0x248aac16904eb52e25ff4a594acbea314a216d5fc0968facb0c10366503aaab2",
"blockNumber": 18375873,
"blockTimestamp": "2023-10-18T07:51:59.000Z",
"fromAddress": "0x74a75db3fbd0374c58e7120c1068a8f22115f713",
"toAddress": "0xef371a11e6adb9dc3d333dafcb1ff5afbcb6cdc8",
"nonce": 99,
"minerAddress": "0x388c818ca8b9251b393131c08a736a67ccb19297",
"gasLimit": "207976",
"gasPrice": "8805248398",
"gasUsed": "138651",
"value": "0",
"contractAddress": null,
"input": "0x8bb2513b00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000003470000000000000000000000000000000000000000000000000000000000000041223274af3f4a90d18c7caf1581ec09e901eb6d82412c9d562b4140cd4d25591f05a02d22bea46ddfb1b9c149345bf686ad43ce6e2129cbd33856db5effa962211c00000000000000000000000000000000000000000000000000000000000000",
"status": 1,
"type": 2
},
{
"transactionHash": "0x9eccf79bd00b5d6cd897d5c8483e626f7f22c4551096c54a3604057230b61215",
"transactionIndex": 6,
"blockHash": "0x248aac16904eb52e25ff4a594acbea314a216d5fc0968facb0c10366503aaab2",
"blockNumber": 18375873,
"blockTimestamp": "2023-10-18T07:51:59.000Z",
"fromAddress": "0xaa364c1a348f9517009207a1601e0a73c1cd530b",
"toAddress": "0x2fde1e211bbcce520fa1455a2364b0460898d72e",
"nonce": 81522,
"minerAddress": "0x388c818ca8b9251b393131c08a736a67ccb19297",
"gasLimit": "21000",
"gasPrice": "8306248398",
"gasUsed": "21000",
"value": "603090000000000",
"contractAddress": null,
"input": "0x",
"status": 1,
"type": 2
},
```