898 B

description
description
Gets the messages from a withdrawal initialization.

getWithdrawals

Gets withdrawal messages emitted from the MessagePassed log from a withdrawal initialization.

Import

import { getWithdrawals } from 'viem'

Usage

import { extractTransactionDepositedLogs, getWithdrawals } from 'viem'

const receipt = await client.getTransactionReceipt({
  hash: '0xa08acae48f12243bccd7153c88d892673d5578cce4ee9988c0332e8bba47436b',
})

const withdrawals = getWithdrawals(receipt) // [!code hl]

Returns

Hex

The L2 transaction hash.

Parameters

logs

  • Type: Log[]

An array of L2 logs.

const withdrawals = getWithdrawals({ 
  logs: receipt.logs // [!code focus]
})