getTransactionReceipts - SDK
Gets all transaction receipts for a given block by number or block hash.
Don’t have an API key?
Start using this method in your app today. Get started for free
Description
Gets all transaction receipts for a given block by number or block hash.
Parameters
params
Parameters
Response
TransactionReceiptsResponse
object parameters
Example Request and Response
Prerequisite: You will need to install the Alchemy SDK before making requests with it.
The commands for installing it using npm or yarn are given below:
Request
Here is an example of how to make a getTransactionReceipts
request using the Alchemy SDK:
Response
Use Cases
Here are some possible use cases for the getTransactionReceipts
method:
-
Transaction Confirmation: You can use
getTransactionReceipts
to check if a transaction has been successfully confirmed by the EVM networks. A transaction receipt contains information such as the block number and transaction status, which can indicate if the transaction was successful or not. -
Contract Interaction: When you interact with a smart contract on the EVM networks, you typically receive a transaction hash. You can use
getTransactionReceipts
to retrieve the transaction receipt for that hash, which contains the contract address and any events emitted by the contract during the transaction. -
Transaction History: If you need to keep track of the transactions you have sent or received on the EVM networks, you can use
getTransactionReceipts
to retrieve the receipts for those transactions. You can then store this information in your application’s database or use it to generate reports.
Related Methods
Here are the methods related to getTransactionReceipts
:
- getTransactionReceipt: Returns the transaction receipt for hash or null if the transaction has not been mined.