Working with Transactions
Retrieve a user transaction details
async function getTransaction(txHash) {
const transaction = await client.getTransaction({
hash: txHash, // Replace with the actual transaction hash
});
return transaction;
}
// Example usage
getTransaction('0xTransactionHash').then(console.log);Retrieve a user transaction receipt
async function getTransactionReceipt(txHash) {
const transactionReceipt = await client.getTransactionReceipt({
hash: txHash, // Replace with the actual transaction hash
});
return transactionReceipt;
}
// Example usage
getTransactionReceipt('0xTransactionHash').then(console.log);Last updated