You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
829 B
37 lines
829 B
import type { ErrorType } from '../../errors/utils.js'
|
|
import type { Log } from '../../types/log.js'
|
|
import {
|
|
type ParseEventLogsErrorType,
|
|
parseEventLogs,
|
|
} from '../../utils/abi/parseEventLogs.js'
|
|
import { l2ToL1MessagePasserAbi } from '../abis.js'
|
|
|
|
export type ExtractWithdrawalMessageLogsParameters = {
|
|
/** An opaque array of logs. */
|
|
logs: Log[]
|
|
}
|
|
|
|
export type ExtractWithdrawalMessageLogsReturnType = Log<
|
|
bigint,
|
|
number,
|
|
false,
|
|
undefined,
|
|
true,
|
|
typeof l2ToL1MessagePasserAbi,
|
|
'MessagePassed'
|
|
>[]
|
|
|
|
export type ExtractWithdrawalMessageLogsErrorType =
|
|
| ParseEventLogsErrorType
|
|
| ErrorType
|
|
|
|
export function extractWithdrawalMessageLogs({
|
|
logs,
|
|
}: ExtractWithdrawalMessageLogsParameters) {
|
|
return parseEventLogs({
|
|
abi: l2ToL1MessagePasserAbi,
|
|
eventName: 'MessagePassed',
|
|
logs,
|
|
})
|
|
}
|