import { BigNumber, BigNumberish, BytesLike, ethers, providers, utils } from "ethers"; import { ExternalProvider } from "@ethersproject/providers"; import { ConnectionInfo } from "@ethersproject/web"; import { Address, BalancesMap, BatchDetails, Block, BlockDetails, BlockTag, BlockWithTransactions, ContractAccountInfo, EventFilter, Log, MessageProof, PriorityOpResponse, Token, TransactionDetails, TransactionReceipt, TransactionRequest, TransactionResponse, TransactionStatus, Fee, Network as ZkSyncNetwork, RawBlockTransaction } from "./types"; import { Signer } from "./signer"; import Formatter = providers.Formatter; export declare class Provider extends ethers.providers.JsonRpcProvider { private static _nextPollId; protected contractAddresses: { mainContract?: Address; erc20BridgeL1?: Address; erc20BridgeL2?: Address; wethBridgeL1?: Address; wethBridgeL2?: Address; }; poll(): Promise; getTransactionReceipt(transactionHash: string | Promise): Promise; getBlock(blockHashOrBlockTag: BlockTag | string | Promise): Promise; getBlockWithTransactions(blockHashOrBlockTag: BlockTag | string | Promise): Promise; static getFormatter(): Formatter; getBalance(address: Address, blockTag?: BlockTag, tokenAddress?: Address): Promise; l2TokenAddress(token: Address): Promise; l1TokenAddress(token: Address): Promise; static hexlifyTransaction(transaction: ethers.providers.TransactionRequest, allowExtra?: Record): { [key: string]: string | ethers.utils.AccessList; }; estimateGas(transaction: utils.Deferrable): Promise; estimateGasL1(transaction: utils.Deferrable): Promise; estimateFee(transaction: TransactionRequest): Promise; getGasPrice(token?: Address): Promise; constructor(url?: ConnectionInfo | string, network?: ethers.providers.Networkish); getMessageProof(blockNumber: ethers.BigNumberish, sender: Address, messageHash: BytesLike, logIndex?: number): Promise; getLogProof(txHash: BytesLike, index?: number): Promise; getL1BatchBlockRange(l1BatchNumber: number): Promise<[number, number] | null>; getMainContractAddress(): Promise
; getTestnetPaymasterAddress(): Promise
; getDefaultBridgeAddresses(): Promise<{ erc20L1: string; erc20L2: string; wethL1: string; wethL2: string; }>; getConfirmedTokens(start?: number, limit?: number): Promise; getTokenPrice(token: Address): Promise; getAllAccountBalances(address: Address): Promise; l1ChainId(): Promise; getL1BatchNumber(): Promise; getL1BatchDetails(number: number): Promise; getBlockDetails(number: number): Promise; getTransactionDetails(txHash: BytesLike): Promise; getBytecodeByHash(bytecodeHash: BytesLike): Promise; getRawBlockTransactions(number: number): Promise; getWithdrawTx(transaction: { token: Address; amount: BigNumberish; from?: Address; to?: Address; bridgeAddress?: Address; overrides?: ethers.CallOverrides; }): Promise; estimateGasWithdraw(transaction: { token: Address; amount: BigNumberish; from?: Address; to?: Address; bridgeAddress?: Address; overrides?: ethers.CallOverrides; }): Promise; getTransferTx(transaction: { to: Address; amount: BigNumberish; from?: Address; token?: Address; overrides?: ethers.CallOverrides; }): Promise; estimateGasTransfer(transaction: { to: Address; amount: BigNumberish; from?: Address; token?: Address; overrides?: ethers.CallOverrides; }): Promise; static getDefaultProvider(zksyncNetwork?: ZkSyncNetwork): Provider; newFilter(filter: EventFilter | Promise): Promise; newBlockFilter(): Promise; newPendingTransactionsFilter(): Promise; getFilterChanges(idx: BigNumber): Promise>; getLogs(filter?: EventFilter | Promise): Promise>; protected _parseLogs(logs: any[]): Array; protected _prepareFilter(filter: EventFilter): { fromBlock: string; toBlock: string; topics?: (string | string[])[]; address?: string | string[]; blockHash?: string; }; _wrapTransaction(tx: ethers.Transaction, hash?: string): TransactionResponse; getTransactionStatus(txHash: string): Promise; getTransaction(hash: string | Promise): Promise; sendTransaction(transaction: string | Promise): Promise; getL2TransactionFromPriorityOp(l1TxResponse: ethers.providers.TransactionResponse): Promise; getPriorityOpResponse(l1TxResponse: ethers.providers.TransactionResponse): Promise; getContractAccountInfo(address: Address): Promise; estimateL1ToL2Execute(transaction: { contractAddress: Address; calldata: BytesLike; caller?: Address; l2Value?: BigNumberish; factoryDeps?: ethers.BytesLike[]; gasPerPubdataByte?: BigNumberish; overrides?: ethers.PayableOverrides; }): Promise; } export declare class Web3Provider extends Provider { readonly provider: ExternalProvider; constructor(provider: ExternalProvider, network?: ethers.providers.Networkish); send(method: string, params?: Array): Promise; getSigner(addressOrIndex?: number | string): Signer; estimateGas(transaction: ethers.utils.Deferrable): Promise; }