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
Originally posted by t-vila June 12, 2023
Hey all,
As far as I remember maxFeePerGas was optional in 1.x and calculated from the baseFee - in 4.x I get MissingGasError if I don't specify it. It looks like it's expected
Thank you for submitting this! 4.x is slightly different on validating transactions and the error message isn't clear, when we validate a transaction this is the conditional
Since you are using maxPriorityFeePerGas and specified a type 2 transaction its expected that you define maxFeePerGas as well.
If you wanted to submit a legacy transaction you would need to specify gas && gasPrice
I'll create a PR to make the error message more clear. thank you
For more clarity as well, what code/methods were u running
Discussed in #6188
Originally posted by t-vila June 12, 2023
Hey all,
As far as I remember
maxFeePerGas
was optional in 1.x and calculated from thebaseFee
- in 4.x I getMissingGasError
if I don't specify it. It looks like it's expectedweb3.js/packages/web3-errors/src/errors/transaction_errors.ts
Line 315 in f8a2533
For instance this:
Will throw:
MissingGasError: Invalid value given "gas: 0x5208, gasPrice: undefined, maxPriorityFeePerGas: 0xb2d05e00, maxFeePerGas: undefined". Error: "gas" is missing.
The text was updated successfully, but these errors were encountered: