extractWithdrawalMessageLogs
Extracts MessagePassed
logs from a withdrawal initialization from an opaque array of logs.
Import
import { extractWithdrawalMessageLogs } from 'viem'
Usage
import { extractWithdrawalMessageLogs } from 'viem'
const receipt = await client.getTransactionReceipt({
hash: '0xc9c0361bc3da9cd3560e48b469d0d6aac0e633e4897895edfd26a287f7c578ec',
})
const logs = extractWithdrawalMessageLogs(receipt)
// [
// { args: { ... }, blockHash: '0x...', eventName: 'MessagePassed' },
// { args: { ... }, blockHash: '0x...', eventName: 'MessagePassed' },
// { args: { ... }, blockHash: '0x...', eventName: 'MessagePassed' },
// ]
Returns
Log[]
The MessagePassed
logs.
Parameters
logs
- Type:
Log[]
An array of opaque logs.
const logs = extractWithdrawalMessageLogs({
logs: receipt.logs
})