• Core
  • Actions
  • fetchTransaction

fetchTransaction

Action for fetching transaction by hash.

This is a wrapper around viem's getTransaction.

import { fetchTransaction } from '@wagmi/core'

Usage

import { fetchTransaction } from '@wagmi/core'
 
const transaction = await fetchTransaction({
  hash: '0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060',
})

Return Value

Transaction

Configuration

hash

Hash of the transaction.

import { fetchTransaction } from '@wagmi/core'
 
const transaction = await fetchTransaction({
  hash: '0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060',
})