FeeData
Index
Properties
optionalreadonlybaseFeePerGas
The baseFeePerGas returned from the last available block.
If EIP-1559 is not supported, this will be undefined
However, the user will only pay (the future baseFeePerGas + the maxPriorityFeePerGas). And this value is just for getting informed about the fees of last block.
optionalreadonlygasPrice
This filed is used for legacy networks that does not support EIP-1559.
optionalreadonlymaxFeePerGas
The maximum fee that the user would be willing to pay per-gas.
However, the user will only pay (the future baseFeePerGas + the maxPriorityFeePerGas).
And the maxFeePerGas
could be used to prevent paying more than it, if baseFeePerGas
went too high.
If EIP-1559 is not supported, this will be undefined
optionalreadonlymaxPriorityFeePerGas
The validator's tip for including a transaction in a block.
If EIP-1559 is not supported, this will be undefined
To contain the gas Fee Data to be used with EIP-1559 transactions. EIP-1559 was applied to Ethereum after London hardfork.
Typically you will only need
maxFeePerGas
andmaxPriorityFeePerGas
for a transaction following EIP-1559. However, if you want to get informed about the fees of last block, you can usebaseFeePerGas
too.https://eips.ethereum.org/EIPS/eip-1559