A FeeData wraps all the fee-related values associated with the network.

Constructors

new FeeData()

new FeeData(gasPrice?, minerTip?): FeeData

Creates a new FeeData for gasPrice, gasPrice and minerTip.

Parameters

ParameterTypeDescription
gasPrice?null | bigintThe gas price.
minerTip?null | bigintThe maximum priority fee per gas.

Returns

FeeData

Source

providers/provider.ts:116

Properties

PropertyModifierTypeDescription
gasPricereadonlynull | bigintThe gas price for legacy networks.
minerTipreadonlynull | bigintThe additional amount to pay per gas to encourage a validator to include the transaction.

The purpose of this is to compensate the validator for the adjusted risk for including a given transaction.

This will be null on legacy networks (i.e. pre-EIP-1559)

Methods

toJSON()

toJSON(): any

Returns a JSON-friendly value.

Returns

any

The JSON-friendly value.

Source

providers/provider.ts:128