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