approvalForAllEvent

Creates an event object for the ApprovalForAll event.

Example

import { getContractEvents } from "thirdweb";
import { approvalForAllEvent } from "thirdweb/extensions/erc1155";
const events = await getContractEvents({
contract,
events: [
approvalForAllEvent({
_owner: ...,
_operator: ...,
})
],
});
function approvalForAllEvent(
filters: Partial<{ _operator: string; _owner: string }>,
readonly inputs: readonly [
{
readonly indexed: true;
readonly name: "_owner";
readonly type: "address";
},
{
readonly indexed: true;
readonly name: "_operator";
readonly type: "address";
},
{ readonly name: "_approved"; readonly type: "bool" },
];
readonly name: "ApprovalForAll";
readonly type: "event";
}>;

Parameters

Optional filters to apply to the event.

Type

let filters: Partial<{ _operator: string; _owner: string }>;

Returns

let returnType: PreparedEvent<{
readonly inputs: readonly [
{
readonly indexed: true;
readonly name: "_owner";
readonly type: "address";
},
{
readonly indexed: true;
readonly name: "_operator";
readonly type: "address";
},
{ readonly name: "_approved"; readonly type: "bool" },
];
readonly name: "ApprovalForAll";
readonly type: "event";
}>;

The prepared event object.