withdrawEvent

Creates an event object for the Withdraw event.

Example

import { getContractEvents } from "thirdweb";
import { withdrawEvent } from "thirdweb/extensions/erc4626";
const events = await getContractEvents({
contract,
events: [
withdrawEvent({
caller: ...,
receiver: ...,
owner: ...,
})
],
});
function withdrawEvent(
filters: Partial<{
caller: string;
owner: string;
receiver: string;
}>,
readonly inputs: readonly [
{
readonly indexed: true;
readonly name: "caller";
readonly type: "address";
},
{
readonly indexed: true;
readonly name: "receiver";
readonly type: "address";
},
{
readonly indexed: true;
readonly name: "owner";
readonly type: "address";
},
{ readonly name: "assets"; readonly type: "uint256" },
{ readonly name: "shares"; readonly type: "uint256" },
];
readonly name: "Withdraw";
readonly type: "event";
}>;

Parameters

Optional filters to apply to the event.

Type

let filters: Partial<{
caller: string;
owner: string;
receiver: string;
}>;

Returns

let returnType: PreparedEvent<{
readonly inputs: readonly [
{
readonly indexed: true;
readonly name: "caller";
readonly type: "address";
},
{
readonly indexed: true;
readonly name: "receiver";
readonly type: "address";
},
{
readonly indexed: true;
readonly name: "owner";
readonly type: "address";
},
{ readonly name: "assets"; readonly type: "uint256" },
{ readonly name: "shares"; readonly type: "uint256" },
];
readonly name: "Withdraw";
readonly type: "event";
}>;

The prepared event object.