import { BigNumber, BigNumberish } from "@ethersproject/bignumber"; import { BytesLike } from "@ethersproject/bytes"; import { Network } from "@ethersproject/networks"; import { Description } from "@ethersproject/properties"; import { Transaction } from "@ethersproject/transactions"; import { OnceBlockable } from "@ethersproject/web"; export declare type TransactionRequest = { to?: string | Promise; from?: string | Promise; nonce?: BigNumberish | Promise; gasLimit?: BigNumberish | Promise; gasPrice?: BigNumberish | Promise; data?: BytesLike | Promise; value?: BigNumberish | Promise; chainId?: number | Promise; }; export interface TransactionResponse extends Transaction { hash: string; blockNumber?: number; blockHash?: string; timestamp?: number; confirmations: number; from: string; raw?: string; wait: (confirmations?: number) => Promise; } export declare type BlockTag = string | number; interface _Block { hash: string; parentHash: string; number: number; timestamp: number; nonce: string; difficulty: number; gasLimit: BigNumber; gasUsed: BigNumber; miner: string; extraData: string; } export interface Block extends _Block { transactions: Array; } export interface BlockWithTransactions extends _Block { transactions: Array; } export interface Log { blockNumber?: number; blockHash?: string; transactionIndex?: number; removed?: boolean; transactionLogIndex?: number; address: string; data: string; topics: Array; transactionHash?: string; logIndex?: number; } export interface TransactionReceipt { to?: string; from?: string; contractAddress?: string; transactionIndex?: number; root?: string; gasUsed?: BigNumber; logsBloom?: string; blockHash?: string; transactionHash?: string; logs?: Array; blockNumber?: number; confirmations?: number; cumulativeGasUsed?: BigNumber; byzantium: boolean; status?: number; } export interface EventFilter { address?: string; topics?: Array>; } export interface Filter extends EventFilter { fromBlock?: BlockTag; toBlock?: BlockTag; } export interface FilterByBlockHash extends EventFilter { blockhash?: string; } export declare abstract class ForkEvent extends Description { readonly expiry: number; readonly _isForkEvent?: boolean; static isForkEvent(value: any): value is ForkEvent; } export declare class BlockForkEvent extends ForkEvent { readonly blockhash: string; readonly _isBlockForkEvent?: boolean; constructor(blockhash: string, expiry?: number); } export declare class TransactionForkEvent extends ForkEvent { readonly hash: string; readonly _isTransactionOrderForkEvent?: boolean; constructor(hash: string, expiry?: number); } export declare class TransactionOrderForkEvent extends ForkEvent { readonly beforeHash: string; readonly afterHash: string; constructor(beforeHash: string, afterHash: string, expiry?: number); } export declare type EventType = string | Array> | EventFilter | ForkEvent; export declare type Listener = (...args: Array) => void; export declare abstract class Provider implements OnceBlockable { abstract getNetwork(): Promise; abstract getBlockNumber(): Promise; abstract getGasPrice(): Promise; abstract getBalance(addressOrName: string | Promise, blockTag?: BlockTag | Promise): Promise; abstract getTransactionCount(addressOrName: string | Promise, blockTag?: BlockTag | Promise): Promise; abstract getCode(addressOrName: string | Promise, blockTag?: BlockTag | Promise): Promise; abstract getStorageAt(addressOrName: string | Promise, position: BigNumberish | Promise, blockTag?: BlockTag | Promise): Promise; abstract sendTransaction(signedTransaction: string | Promise): Promise; abstract call(transaction: TransactionRequest, blockTag?: BlockTag | Promise): Promise; abstract estimateGas(transaction: TransactionRequest): Promise; abstract getBlock(blockHashOrBlockTag: BlockTag | string | Promise): Promise; abstract getBlockWithTransactions(blockHashOrBlockTag: BlockTag | string | Promise): Promise; abstract getTransaction(transactionHash: string): Promise; abstract getTransactionReceipt(transactionHash: string): Promise; abstract getLogs(filter: Filter): Promise>; abstract resolveName(name: string | Promise): Promise; abstract lookupAddress(address: string | Promise): Promise; abstract on(eventName: EventType, listener: Listener): Provider; abstract once(eventName: EventType, listener: Listener): Provider; abstract emit(eventName: EventType, ...args: Array): boolean; abstract listenerCount(eventName?: EventType): number; abstract listeners(eventName?: EventType): Array; abstract off(eventName: EventType, listener?: Listener): Provider; abstract removeAllListeners(eventName?: EventType): Provider; addListener(eventName: EventType, listener: Listener): Provider; removeListener(eventName: EventType, listener: Listener): Provider; abstract waitForTransaction(transactionHash: string, timeout?: number): Promise; readonly _isProvider: boolean; constructor(); static isProvider(value: any): value is Provider; } export {};