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
After looking at similar issues and discussions for quite a bit, I still can't understand why all retrieved (and sent) transactions using ethers.js are of type 0 i.e transactionResponse(s) have a gasPrice field instead of maxFeePerGas and maxPriorityFeePerGas. Here's an example of a contract deploy on Goerli :
According to the threads I read, the default ethers.js behavior should be to adapt to the default transaction type of the underlying network, which should be 2 for goerli. Isn't that the case ? How can I choose type 2 as the default transaction type ?
My goal is to find the most reliable way to resend or cancel transactions and make sure they are mined fast. How would I do that in either type of transaction ? How does ethers.js populate the gasPrice ? I cannot find that in the code.
Currently, getFeeData() returns a maxPriorityFeePerGas of 1.5gwei and maxFeePerGas of 2*baseFee + priorityFee. Are these values supposed to just make sure the transaction passes ? What's a good rule of thumb for setting the priority fee (akin to metamask's low, medium and high gas prices)
EDIT : Doubling the Base Fee when calculating the Max Fee ensures that the transaction will remain marketable for six consecutive 100% full blocks since 2 ~= 1.125^6
I know the two latter questions are more general gas knowledge but I hope you guys can help me some,
Thanks 😄
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi guys,
After looking at similar issues and discussions for quite a bit, I still can't understand why all retrieved (and sent) transactions using ethers.js are of type 0 i.e transactionResponse(s) have a
gasPrice
field instead ofmaxFeePerGas
andmaxPriorityFeePerGas
. Here's an example of a contract deploy on Goerli :According to the threads I read, the default ethers.js behavior should be to adapt to the default transaction type of the underlying network, which should be 2 for goerli. Isn't that the case ? How can I choose type 2 as the default transaction type ?
My goal is to find the most reliable way to resend or cancel transactions and make sure they are mined fast. How would I do that in either type of transaction ? How does ethers.js populate the
gasPrice
? I cannot find that in the code.Currently,
getFeeData()
returns amaxPriorityFeePerGas
of 1.5gwei andmaxFeePerGas
of 2*baseFee + priorityFee. Are these values supposed to just make sure the transaction passes ? What's a good rule of thumb for setting the priority fee (akin to metamask's low, medium and high gas prices)I know the two latter questions are more general gas knowledge but I hope you guys can help me some,
Thanks 😄
Beta Was this translation helpful? Give feedback.
All reactions