import { IMessage, Uint256 } from '@ylide/sdk'; export enum EVMNetwork { LOCAL_HARDHAT, // = 'LOCAL_HARDHAT', ETHEREUM, // = 'ETHEREUM', BNBCHAIN, // = 'BNBCHAIN', POLYGON, // = 'POLYGON', ARBITRUM, // = 'ARBITRUM', OPTIMISM, // = 'OPTIMISM', AVALANCHE, // = 'AVALANCHE', CRONOS, // = 'CRONOS', FANTOM, // = 'FANTOM', KLAYTN, // = 'KLAYTN', GNOSIS, // = 'GNOSIS', AURORA, // = 'AURORA', CELO, // = 'CELO', MOONBEAM, // = 'MOONBEAM', MOONRIVER, // = 'MOONRIVER', METIS, // = 'METIS', ASTAR, // = 'ASTAR', } export interface IEVMBlock { hash: string; parentHash: string; // eslint-disable-next-line id-denylist number: number; timestamp: number; } export interface IEVMTransaction { hash: string; from: string; to: string | null; nonce: number; data: string; value: string; chainId: number; } export interface IEVMEvent { blockNumber: number; blockHash: string; transactionHash: string; transactionIndex: number; logIndex: number; eventName: string; topics: string[]; data: string; parsed: Parsed; } export interface IEVMEnrichedEvent { event: IEVMEvent; tx: IEVMTransaction; block: IEVMBlock; } export interface IEVMMeta extends IEVMEnrichedEvent { contentId: Uint256; index: number[]; } export enum EVMMailerContractType { EVMMailerV6 = 'EVMMailerV6', EVMMailerV7 = 'EVMMailerV7', EVMMailerV8 = 'EVMMailerV8', } export enum EVMRegistryContractType { EVMRegistryV3 = 'EVMRegistryV3', EVMRegistryV4 = 'EVMRegistryV4', EVMRegistryV5 = 'EVMRegistryV5', EVMRegistryV6 = 'EVMRegistryV6', } export interface IEVMBaseContractLink { id: number; verified: boolean; address: string; creationBlock: number; terminationBlock?: number; } export interface IEVMMailerContractLink extends IEVMBaseContractLink { type: EVMMailerContractType; } export interface IEVMRegistryContractLink extends IEVMBaseContractLink { type: EVMRegistryContractType; } export interface IEVMNetworkContracts { mailerContracts: IEVMMailerContractLink[]; registryContracts: IEVMRegistryContractLink[]; currentRegistryId: number; currentMailerId: number; } export type IEVMMessage = IMessage; export type IHistorySource = | { type: 'recipient'; feedId: Uint256; recipient: Uint256 } | { type: 'broadcast'; feedId: Uint256 };