Skip to main content

Function: decodeLogMessageSendRequested()

decodeLogMessageSendRequested(log): EquitoMessageWithData | undefined

Decodes a MessageSendRequested event logs into a EquitoMessageWithData object. This function extracts the message and messageData fields from the event logs using the specified ABI.

Parameters

log: Log

Log The log object.

Returns

EquitoMessageWithData | undefined

A EquitoMessageWithData object containing the decoded message and message data if exists.

Throws

Throws an error if the data & topics lengths to not conform to the event on the ABI.

Example

const logs = ['0x...', ..., '0x...'];  // Replace with actual logs data
const result = decodeLogMessageSendRequested(logs);
console.log('Decoded Message:', result[0].message);
console.log('Decoded Message Data:', result[0].messageData);

Defined in

packages/viem/src/router/decode-log-message-send-requested.ts:23