import type { AbiParameterToPrimitiveType } from "abitype"; import { prepareEvent } from "../../../../../event/prepare-event.js"; /** * Represents the filters for the "Withdrawn" event. */ export type WithdrawnEventFilters = Partial<{ account: AbiParameterToPrimitiveType<{ type: "address"; name: "account"; indexed: true; }>; }>; /** * Creates an event object for the Withdrawn event. * @param filters - Optional filters to apply to the event. * @returns The prepared event object. * @extension ERC4337 * @example * ```ts * import { getContractEvents } from "thirdweb"; * import { withdrawnEvent } from "thirdweb/extensions/erc4337"; * * const events = await getContractEvents({ * contract, * events: [ * withdrawnEvent({ * account: ..., * }) * ], * }); * ``` */ export function withdrawnEvent(filters: WithdrawnEventFilters = {}) { return prepareEvent({ filters, signature: "event Withdrawn(address indexed account, address withdrawAddress, uint256 amount)", }); }