getTransactionConfirmations
Returns the number of blocks passed (confirmations) since the transaction was processed on a block.
Usage
import { } from './client'
const = await .getTransactionReceipt({ : '...' })
const = await .getTransactionConfirmations({
})
// 15nYou can also fetch confirmations by Transaction hash:
import { } from './client'
const = await .getTransactionConfirmations({
: '0x...'
})
15nReturns
bigint
The number of blocks passed since the transaction was processed. If confirmations is 0, then the Transaction has not been confirmed & processed yet.
Parameters
transactionReceipt
- Type:
TransactionReceipt
The transaction receipt.
const = await .getTransactionConfirmations({
: { ... },
})hash
- Type:
Hash
The hash of the transaction.
const = await .getTransactionConfirmations({
: '0x...'
})Example
Check out the usage of getTransactionConfirmations in the live Fetching Transactions Example below.