import type { AbiParameterToPrimitiveType } from "abitype"; import { prepareEvent } from "../../../../../event/prepare-event.js"; /** * Represents the filters for the "AuctionClosed" event. */ export type AuctionClosedEventFilters = Partial<{ listingId: AbiParameterToPrimitiveType<{ type: "uint256"; name: "listingId"; indexed: true; }>; closer: AbiParameterToPrimitiveType<{ type: "address"; name: "closer"; indexed: true; }>; cancelled: AbiParameterToPrimitiveType<{ type: "bool"; name: "cancelled"; indexed: true; }>; }>; /** * Creates an event object for the AuctionClosed event. * @param filters - Optional filters to apply to the event. * @returns The prepared event object. * @extension MARKETPLACE * @example * ```ts * import { getContractEvents } from "thirdweb"; * import { auctionClosedEvent } from "thirdweb/extensions/marketplace"; * * const events = await getContractEvents({ * contract, * events: [ * auctionClosedEvent({ * listingId: ..., * closer: ..., * cancelled: ..., * }) * ], * }); * ``` */ export function auctionClosedEvent(filters: AuctionClosedEventFilters = {}) { return prepareEvent({ filters, signature: "event AuctionClosed(uint256 indexed listingId, address indexed closer, bool indexed cancelled, address auctionCreator, address winningBidder)", }); }