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
The documentation does not mention that the type needs to be set to 1 for EIP-2718, and does not mention that type needs to be set to 2 for EIP-1559 gas parameters.
The code does not respect "null to use the network default", it actually defaults to legacy transactions, which does not match what the documentation states. (See
Using signTransaction without setting a type, it will automatically default to the legacy transactions without explicitly setting type, which is not clarified in the documentation and is not explained in the error message.
A few fixes are recommended here:
Update the documentation or the code so that they match the intended function when type is null, maybe move type to the top of the transaction request documentation if it's critical to use EIP-1559 transactions
Suggest automatically recognizing when EIP-1559 transactions are being signed, by the existence of the maxPriorityFeePerGas or maxFeePerGas parameters, since that would save a lot of lost developer time debugging this particular issue
Code Snippet
No response
Contract ABI
No response
Errors
No response
Environment
Other (please specify)
Environment (Other)
N/A
The text was updated successfully, but these errors were encountered:
@ricmoo said "The ethers provider will automatically detect if a network supports EIP-1559 and use it if it does" in the thread #1610 (comment) but it's not working.
Using this code resulted in type 0 (legacy) transactions:
Ethers Version
5.7.2
Search Terms
wallet, signTransaction, serialize, eip1559, eip2718, maxPriorityFeePerGas, gasPrice, maxFeePerGas
Describe the Problem
Per the documentation for a Transaction Request, which states "The EIP-2718 type of this transaction envelope, or null for to use the network default.".
A few issues arise here:
ethers.js/packages/transactions/src.ts/index.ts
Line 307 in 71b7547
signTransaction
without setting a type, it will automatically default to the legacy transactions without explicitly settingtype
, which is not clarified in the documentation and is not explained in the error message.A few fixes are recommended here:
type
to the top of the transaction request documentation if it's critical to use EIP-1559 transactionsmaxPriorityFeePerGas
ormaxFeePerGas
parameters, since that would save a lot of lost developer time debugging this particular issueCode Snippet
No response
Contract ABI
No response
Errors
No response
Environment
Other (please specify)
Environment (Other)
N/A
The text was updated successfully, but these errors were encountered: