import { providers } from "ethers"; import { BigNumber } from "../../utils"; import { GasPriceEstimate } from "../types"; import { GasPriceEstimateOptions } from "../oracle"; /** * @dev If GAS_PRICE_EIP1559_RAW_${chainId}=true, then constructs total fee by adding * eth_getBlock("pending").baseFee to eth_maxPriorityFeePerGas, otherwise calls the ethers provider's * getFeeData() method which adds eth_getBlock("latest").baseFee to a hardcoded priority fee of 1.5 gwei. * @param provider ethers RPC provider instance. * @param {GasPriceEstimateOptions} opts See notes below on specific parameters. * @param baseFeeMultiplier Amount to multiply base fee or total fee for legacy gas pricing. * @param priorityFeeMultiplier Amount to multiply priority fee or unused for legacy gas pricing. * @returns Promise of gas price estimate object. */ export declare function eip1559(provider: providers.Provider, opts: GasPriceEstimateOptions): Promise; /** * @note Performs direct RPC calls to retrieve the RPC-suggested priority fee for the next block. * @dev Constructs total fee by adding eth_getBlock("pending").baseFee to eth_maxPriorityFeePerGas * @param provider ethers RPC provider instance. * @param chainId Chain ID of the provider instance. * @returns Promise of gas price estimate object. */ export declare function eip1559Raw(provider: providers.Provider, chainId: number, baseFeeMultiplier: BigNumber, priorityFeeMultiplier: BigNumber): Promise; /** * @notice Returns fee data using provider's getFeeData() method. * @note Resolves priority gas pricing poorly, because the priority fee is hardcoded to 1.5 Gwei in ethers v5's * getFeeData() method * @dev TODO: Remove this function soon. See note above about slowly rolling out eip1559Raw. * @param provider ethers RPC provider instance. * @param chainId Chain ID of the provider instance. * @returns Promise of gas price estimate object. */ export declare function eip1559Bad(provider: providers.Provider, chainId: number, baseFeeMultiplier: BigNumber, priorityFeeMultiplier: BigNumber): Promise; /** * @notice Returns result of eth_gasPrice RPC call * @dev Its recommended to use the eip1559Raw method over this one where possible as it will be more accurate. * @returns GasPriceEstimate */ export declare function legacy(provider: providers.Provider, opts: GasPriceEstimateOptions): Promise;