import type { Removal, Market, LockedNORI, NORI, BridgedPolygonNORI, Certificate, RestrictedNORI } from '../typechain-types/index'; import type { Contracts } from '../contracts'; import type { BridgedPolygonNORIEvents } from './BridgedPolygonNORI'; import type { RemovalEvents } from './Removal'; import type { NORIEvents } from './NORI'; import type { LockedNORIEvents } from './LockedNORI'; import type { MarketEvents } from './Market'; import type { CertificateEvents } from './Certificate'; import type { RestrictedNORIEvents } from './RestrictedNORI'; export type ContractWithEvents = Contracts[keyof Contracts]; export type ContractEventInterface = TInterface extends Removal ? RemovalEvents : TInterface extends Market ? MarketEvents : TInterface extends LockedNORI ? LockedNORIEvents : TInterface extends NORI ? NORIEvents : TInterface extends BridgedPolygonNORI ? BridgedPolygonNORIEvents : TInterface extends Certificate ? CertificateEvents : TInterface extends RestrictedNORI ? RestrictedNORIEvents : never; export type ContractEventNames = ContractEventInterface['name']; export type NamedLogs[] = Exclude, undefined>[]> = Extract, { name: TEventNames[number]; args: ContractEventInterface['args']; }>[];