function applyOnEventimport { applyOnEvent } from "https://dotland.deno.dev/x/polkadot@0.2.45/api-contract/util.ts"; applyOnEvent<T>(result: SubmittableResult,types: ContractEvents[],fn: (records: EventRecord[]) => T,): T | undefinedType ParametersTParametersresult: SubmittableResulttypes: ContractEvents[]fn: (records: EventRecord[]) => TReturnsT | undefined