/// import { Block, BlockTag, BlockWithTransactions, EventType, Filter, FilterByBlockHash, Listener, Log, Provider, TransactionReceipt, TransactionRequest, TransactionResponse } from "@ethersproject/abstract-provider"; import { BigNumber, BigNumberish } from "@ethersproject/bignumber"; import { Network, Networkish } from "@ethersproject/networks"; import { Transaction } from "@ethersproject/transactions"; import { Formatter } from "./formatter"; /** * EventType * - "block" * - "pending" * - "error" * - filter * - topics array * - transaction hash */ export declare class Event { readonly listener: Listener; readonly once: boolean; readonly tag: string; constructor(tag: string, listener: Listener, once: boolean); get event(): EventType; get type(): string; get hash(): string; get filter(): Filter; pollable(): boolean; } export declare class BaseProvider extends Provider { _networkPromise: Promise; _network: Network; _events: Array; formatter: Formatter; _emitted: { [eventName: string]: number | "pending"; }; _pollingInterval: number; _poller: NodeJS.Timer; _lastBlockNumber: number; _fastBlockNumber: number; _fastBlockNumberPromise: Promise; _fastQueryDate: number; _maxInternalBlockNumber: number; _internalBlockNumber: Promise<{ blockNumber: number; reqTime: number; respTime: number; }>; /** * ready * * A Promise that resolves only once the provider is ready. * * Sub-classes that call the super with a network without a chainId * MUST set this. Standard named networks have a known chainId. * */ constructor(network: Networkish | Promise); _ready(): Promise; get ready(): Promise; detectNetwork(): Promise; static getFormatter(): Formatter; static getNetwork(network: Networkish): Network; _getInternalBlockNumber(maxAge: number): Promise; poll(): Promise; resetEventsBlock(blockNumber: number): void; get network(): Network; getNetwork(): Promise; get blockNumber(): number; get polling(): boolean; set polling(value: boolean); get pollingInterval(): number; set pollingInterval(value: number); _getFastBlockNumber(): Promise; _setFastBlockNumber(blockNumber: number): void; waitForTransaction(transactionHash: string, confirmations?: number, timeout?: number): Promise; getBlockNumber(): Promise; getGasPrice(): Promise; getBalance(addressOrName: string | Promise, blockTag?: BlockTag | Promise): Promise; getTransactionCount(addressOrName: string | Promise, blockTag?: BlockTag | Promise): Promise; getCode(addressOrName: string | Promise, blockTag?: BlockTag | Promise): Promise; getStorageAt(addressOrName: string | Promise, position: BigNumberish | Promise, blockTag?: BlockTag | Promise): Promise; _wrapTransaction(tx: Transaction, hash?: string): TransactionResponse; sendTransaction(signedTransaction: string | Promise): Promise; _getTransactionRequest(transaction: TransactionRequest | Promise): Promise; _getFilter(filter: Filter | FilterByBlockHash | Promise): Promise; call(transaction: TransactionRequest | Promise, blockTag?: BlockTag | Promise): Promise; estimateGas(transaction: TransactionRequest | Promise): Promise; _getAddress(addressOrName: string | Promise): Promise; _getBlock(blockHashOrBlockTag: BlockTag | string | Promise, includeTransactions?: boolean): Promise; getBlock(blockHashOrBlockTag: BlockTag | string | Promise): Promise; getBlockWithTransactions(blockHashOrBlockTag: BlockTag | string | Promise): Promise; getTransaction(transactionHash: string | Promise): Promise; getTransactionReceipt(transactionHash: string | Promise): Promise; getLogs(filter: Filter | FilterByBlockHash | Promise): Promise>; getEtherPrice(): Promise; _getBlockTag(blockTag: BlockTag | Promise): Promise; _getResolver(name: string): Promise; resolveName(name: string | Promise): Promise; lookupAddress(address: string | Promise): Promise; perform(method: string, params: any): Promise; _startEvent(event: Event): void; _stopEvent(event: Event): void; _addEventListener(eventName: EventType, listener: Listener, once: boolean): this; on(eventName: EventType, listener: Listener): this; once(eventName: EventType, listener: Listener): this; emit(eventName: EventType, ...args: Array): boolean; listenerCount(eventName?: EventType): number; listeners(eventName?: EventType): Array; off(eventName: EventType, listener?: Listener): this; removeAllListeners(eventName?: EventType): this; }