addEvent

Creates an event object for the Add event.

Example

import { getContractEvents } from "thirdweb";
import { addEvent } from "thirdweb/extensions/farcaster";
const events = await getContractEvents({
contract,
events: [
addEvent({
fid: ...,
keyType: ...,
key: ...,
})
],
});
function addEvent(
filters: Partial<{
fid: bigint;
key: `0x${string}`;
keyType: number;
}>,
readonly inputs: readonly [
{
readonly indexed: true;
readonly name: "fid";
readonly type: "uint256";
},
{
readonly indexed: true;
readonly name: "keyType";
readonly type: "uint32";
},
{
readonly indexed: true;
readonly name: "key";
readonly type: "bytes";
},
{ readonly name: "keyBytes"; readonly type: "bytes" },
{ readonly name: "metadataType"; readonly type: "uint8" },
{ readonly name: "metadata"; readonly type: "bytes" },
];
readonly name: "Add";
readonly type: "event";
}>;

Parameters

Optional filters to apply to the event.

Type

let filters: Partial<{
fid: bigint;
key: `0x${string}`;
keyType: number;
}>;

Returns

let returnType: PreparedEvent<{
readonly inputs: readonly [
{
readonly indexed: true;
readonly name: "fid";
readonly type: "uint256";
},
{
readonly indexed: true;
readonly name: "keyType";
readonly type: "uint32";
},
{
readonly indexed: true;
readonly name: "key";
readonly type: "bytes";
},
{ readonly name: "keyBytes"; readonly type: "bytes" },
{ readonly name: "metadataType"; readonly type: "uint8" },
{ readonly name: "metadata"; readonly type: "bytes" },
];
readonly name: "Add";
readonly type: "event";
}>;

The prepared event object.