Skip to content

getTransactionReceipt

Returns the Transaction Receipt given a Transaction hash.

Usage

example.ts
import { publicClient } from "./client";
 
const transaction = await publicClient.getTransactionReceipt({

  hash: "0x...",
});

Returns

TransactionReceipt

The transaction receipt.

Parameters

hash

  • Type: '0x${string}'

A transaction hash.

const transaction = await publicClient.getTransactionReceipt({
  hash: "0x...", 
});

JSON-RPC Method

cfx_getTransactionReceipt