UNPKG

@holographxyz/cli

Version:
21 lines (20 loc) 1.12 kB
import { BigNumber } from '@ethersproject/bignumber'; import { Block, BlockWithTransactions } from '@ethersproject/abstract-provider'; import { WebSocketProvider, JsonRpcProvider } from '@ethersproject/providers'; export declare type GasPricing = { isEip1559: boolean; gasPrice: BigNumber | null; nextBlockFee: BigNumber | null; nextPriorityFee: BigNumber | null; maxFeePerGas: BigNumber | null; lowestBlockFee: BigNumber | null; averageBlockFee: BigNumber | null; highestBlockFee: BigNumber | null; lowestPriorityFee: BigNumber | null; averagePriorityFee: BigNumber | null; highestPriorityFee: BigNumber | null; }; export declare function calculateNextBlockFee(parent: Block | BlockWithTransactions): BigNumber; export declare function adjustBaseBlockFee(network: string, baseBlockFee: BigNumber): BigNumber; export declare function initializeGasPricing(network: string, provider: JsonRpcProvider | WebSocketProvider): Promise<GasPricing>; export declare function updateGasPricing(network: string, block: Block | BlockWithTransactions, gasPricing: GasPricing): GasPricing;