transferEvent

Creates an event object for the Transfer event.

Example

import { getContractEvents } from "thirdweb";
import { transferEvent } from "thirdweb/extensions/farcaster";
const events = await getContractEvents({
contract,
events: [
transferEvent({
from: ...,
to: ...,
})
],
});
function transferEvent(
filters: Partial<{ from: string; to: string }>,
readonly inputs: readonly [
{
readonly indexed: true;
readonly name: "from";
readonly type: "address";
},
{
readonly indexed: true;
readonly name: "to";
readonly type: "address";
},
{ readonly name: "id"; readonly type: "uint256" },
];
readonly name: "Transfer";
readonly type: "event";
}>;

Parameters

Optional filters to apply to the event.

Type

let filters: Partial<{ from: string; to: string }>;

Returns

let returnType: PreparedEvent<{
readonly inputs: readonly [
{
readonly indexed: true;
readonly name: "from";
readonly type: "address";
},
{
readonly indexed: true;
readonly name: "to";
readonly type: "address";
},
{ readonly name: "id"; readonly type: "uint256" },
];
readonly name: "Transfer";
readonly type: "event";
}>;

The prepared event object.