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
I noticed that Ethers requests the gas price in the populateTransaction method even when it is already provided in the arguments.
Could you please review the code snippet I attached? I think need to add a check similar to the EIP-1559 transaction scenario: if feeData is provided through function arguments, the request for it should be skipped.
Code Snippet
if((pop.type ===2|| pop.type == null) && (pop.maxFeePerGas != null && pop.maxPriorityFeePerGas != null)) {
// Fully-formed EIP-1559 transaction (skip getFeeData)
pop.type = 2;
} elseif (pop.type === 0 || pop.type === 1) {
// Explicit Legacy or EIP-2930 transaction
// We need to get fee data to determine things
const feeData = await provider.getFeeData();
assert(feeData.gasPrice != null, "network does not support gasPrice", "UNSUPPORTED_OPERATION", {
operation: "getGasPrice" });
// Populate missing gasPrice
if (pop.gasPrice == null) { pop.gasPrice = feeData.gasPrice; }
}
Contract ABI
Errors
Environment
No response
Environment (Other)
No response
The text was updated successfully, but these errors were encountered:
Happy to watch someone else pointing out the issue #4687, hope the polygon support could be also fixed as the polygon oracle formula is also somewhat similar with default maxPriorityFeePerGas ( both oracle and rpc method uses eth_feeHistory inside ) #4909
Ethers Version
6.13.5
Search Terms
populateTransaction
Describe the Problem
Hello,
I noticed that Ethers requests the gas price in the populateTransaction method even when it is already provided in the arguments.
Could you please review the code snippet I attached? I think need to add a check similar to the EIP-1559 transaction scenario: if feeData is provided through function arguments, the request for it should be skipped.
Code Snippet
Contract ABI
Errors
Environment
No response
Environment (Other)
No response
The text was updated successfully, but these errors were encountered: