Creates an event object for the Transfer event.
import { getContractEvents } from "thirdweb";import { transferEvent } from "thirdweb/extensions/erc20"; const events = await getContractEvents({contract,events: [ transferEvent({ from: ..., to: ...,})],});
function transferEvent( filters: Partial<{ from: string; to: string }>,): PreparedEvent<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "from"; readonly type: "address"; }, { readonly indexed: true; readonly name: "to"; readonly type: "address"; }, { readonly name: "value"; readonly type: "uint256" }, ]; readonly name: "Transfer"; readonly type: "event";}>;
Optional filters to apply to the event.
let filters: Partial<{ from: string; to: string }>;
let returnType: PreparedEvent<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "from"; readonly type: "address"; }, { readonly indexed: true; readonly name: "to"; readonly type: "address"; }, { readonly name: "value"; readonly type: "uint256" }, ]; readonly name: "Transfer"; readonly type: "event";}>;
The prepared event object.