eth_getTransactionReceiptsByBlock
Introduction
This API returns all transaction receipts for the given block number or hash. It consumes 1100 CUs.
Parameter Description
Parameter |
Type |
Description |
---|---|---|
Block number or hash |
String |
A hexadecimal block number, or the string latest, or the block hash. |
Return Value
An array of objects with the following fields:
- Object: A transaction receipt object with the following fields, or null when no transaction receipt was found:
- blockHash: the hash of the block where this transaction was in.
- blockNumber: the block number where this transaction was added encoded as a hexadecimal.
- contractAddress: the contract address created for contract creation. It is null for a transaction that is not for contract creation.
- cumulativeGasUsed: the total gas used when this transaction was executed in the block.
- from: the address of the sender.
- gasUsed: the amount of gas used by this specific transaction alone.
- logs: an array of log objects that generated this transaction.
- address: the address from which this log was generated.
- topics: an array of zero to four 32-byte data of the index log arguments. In Solidity, the first topic is the hash of the signature of the event (e.g. Deposit(address,bytes32,uint256)), except you declare the event with the anonymous specifier.
- data: the 32-byte non-indexed argument of the log.
- blockNumber: the number of the block where this log was in.
- transactionHash: the hash of the transaction from which this log was created. It is null for a pending log.
- transactionIndex: the transactions index position from which this log was created. It is null for a pending log.
- blockHash: the hash of the block where this log was in.
- logIndex: the integer of log index position in the block encoded as hexadecimal. It is null for a pending log.
- removed: true if log was removed due to a chain reorganization and false if the log is valid.
- logsBloom: the bloom filter which is used to retrieve related logs.
- status: 1 (success) or 0 (failure) encoded as a hexadecimal.
- to: the address of the receiver. It is null for a contract creation transaction.
- transactionHash: the hash of the transaction.
- transactionIndex: the transaction index position encoded as a hexadecimal.
- type: the value type.
Request
curl https://your-http-endpoint/v1/<API-KEY> \ -X POST \ -H "Content-Type: application/json" \ --data '{"method":"eth_getTransactionReceiptsByBlock","params":["latest"],"id":1,"jsonrpc":"2.0"}'
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot