prepareEvent

Prepares an event by parsing the signature, generating the event hash, and encoding the event topics.

Example

import { prepareEvent } from "thirdweb";
const myEvent = prepareEvent({
signature: "event MyEvent(uint256 myArg)",
});
function prepareEvent(
options: PrepareEventOptions<TSignature>,
): PreparedEvent<ParseEvent<TSignature>>;

Parameters

The options for preparing the event.

Type

let options: PrepareEventOptions<TSignature>;

Returns

let returnType: PreparedEvent<ParseEvent<TSignature>>;

The prepared event object.