transferSingleEvent

Creates an event object for the TransferSingle event.

Example

import { getContractEvents } from "thirdweb";
import { transferSingleEvent } from "thirdweb/extensions/erc1155";
const events = await getContractEvents({
contract,
events: [
transferSingleEvent({
_operator: ...,
_from: ...,
_to: ...,
})
],
});
function transferSingleEvent(
filters: Partial<{ _from: string; _operator: string; _to: string }>,
readonly inputs: readonly [
{
readonly indexed: true;
readonly name: "_operator";
readonly type: "address";
},
{
readonly indexed: true;
readonly name: "_from";
readonly type: "address";
},
{
readonly indexed: true;
readonly name: "_to";
readonly type: "address";
},
{ readonly name: "tokenId"; readonly type: "uint256" },
{ readonly name: "_value"; readonly type: "uint256" },
];
readonly name: "TransferSingle";
readonly type: "event";
}>;

Parameters

Optional filters to apply to the event.

Type

let filters: Partial<{
_from: string;
_operator: string;
_to: string;
}>;

Returns

let returnType: PreparedEvent<{
readonly inputs: readonly [
{
readonly indexed: true;
readonly name: "_operator";
readonly type: "address";
},
{
readonly indexed: true;
readonly name: "_from";
readonly type: "address";
},
{
readonly indexed: true;
readonly name: "_to";
readonly type: "address";
},
{ readonly name: "tokenId"; readonly type: "uint256" },
{ readonly name: "_value"; readonly type: "uint256" },
];
readonly name: "TransferSingle";
readonly type: "event";
}>;

The prepared event object.