@xspswap/smart-order-router
Version:
XSwap Protocol V3 Smart Order Router
20 lines (19 loc) • 953 B
TypeScript
import { ChainId } from '../util/chains';
import { EIP1559GasPriceProvider } from './eip-1559-gas-price-provider';
import { GasPrice, IGasPriceProvider } from './gas-price-provider';
import { LegacyGasPriceProvider } from './legacy-gas-price-provider';
/**
* Gets gas prices on chain. If the chain supports EIP-1559 and has the feeHistory API,
* uses the EIP1559 provider. Otherwise it will use a legacy provider that uses eth_gasPrice
*
* @export
* @class OnChainGasPriceProvider
*/
export declare class OnChainGasPriceProvider extends IGasPriceProvider {
protected chainId: ChainId;
protected eip1559GasPriceProvider: EIP1559GasPriceProvider;
protected legacyGasPriceProvider: LegacyGasPriceProvider;
protected eipChains: ChainId[];
constructor(chainId: ChainId, eip1559GasPriceProvider: EIP1559GasPriceProvider, legacyGasPriceProvider: LegacyGasPriceProvider, eipChains?: ChainId[]);
getGasPrice(): Promise<GasPrice>;
}