You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now we have hardcoded the type of all transactions to 0 (effectively making them legacy). This is to avoid the fact that - if gasPrice is defined and a chain does support EIP-1559 - ethers will set these values like so:
According to sources below, this is what will effectively be paid in gas fees in EIP-1559:
min(gasFeeCap, baseFee + gasTipCap)
It's unclear where the gasFeeCap will come from exactly with ethers' converted transaction. So we need to manage the fee logic depending on whether the chain supports EIP-1559 or not.
Right now we have hardcoded the
type
of all transactions to0
(effectively making them legacy). This is to avoid the fact that - ifgasPrice
is defined and a chain does support EIP-1559 - ethers will set these values like so:According to sources below, this is what will effectively be paid in gas fees in EIP-1559:
It's unclear where the
gasFeeCap
will come from exactly with ethers' converted transaction. So we need to manage the fee logic depending on whether the chain supports EIP-1559 or not.Some important links:
ethers-io/ethers.js#1610
https://docs.ethers.io/v5/api/utils/transactions/#Transaction
https://docs.ethers.io/v5/api/providers/provider/#Provider-getGasPrice
https://docs.ethers.io/v5/api/providers/types/#providers-FeeData
https://docs.avax.network/learn/platform-overview/transaction-fees/
https://www.blocknative.com/blog/eip-1559-fees
The text was updated successfully, but these errors were encountered: