import { Provider, TransactionRequest, TransactionResponse, Block, BlockWithTransactions } from '@ethersproject/abstract-provider'; import { BigNumber } from 'ethers'; export interface L2Transaction extends TransactionResponse { l1BlockNumber: number; l1TxOrigin: string; queueOrigin: string; rawTransaction: string; } export interface L2Block extends Block { stateRoot: string; } export interface L2BlockWithTransactions extends BlockWithTransactions { stateRoot: string; transactions: [L2Transaction]; } export type L2Provider = TProvider & { getL1GasPrice(): Promise; decimals(): Promise; scalar(): Promise; overhead(): Promise; estimateL1Gas(tx: TransactionRequest): Promise; estimateL1GasCost(tx: TransactionRequest): Promise; estimateL2GasCost(tx: TransactionRequest): Promise; estimateTotalGasCost(tx: TransactionRequest): Promise; _isL2Provider: true; };