How to increase Gas Used by Transaction #2729
Replies: 1 comment
-
You are likely wildly overpaying for your transactions, and should read EIP-1559 and research the fee market a bit to determine the best way to prioritize your transaction. The amount of gas used is not relevant. That indicates their transaction consumed more resources, which makes sense; if they won, there were probably additional values set, checks done and contract calls made. I am not familiar with your contract, but the logic of winning is part of that contract; your transaction may have failed because there were constraints not met (insufficient value, unlucky timestamp, etc.) or because their transaction got mined first, possibly because they were part of a bundle, or because their transaction was picked up by a miner first. It could be a million different things, and you will likely want to look through the contract and possibly the documentation of the service you are interacting with. Does that make sense? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I am using this library to perform transaction:
var transaction = {
data:
xyz
,to:
abx
,value: 0,
from: My_Address,
gasLimit: 450000,
maxFeePerGas: ethers.utils.parseUnits("500", "gwei"),
maxPriorityFeePerGas: ethers.utils.parseUnits("500", "gwei"),
};
My transaction is just using 9.94% of gas, and it fails.

I checked the winning transaction from another party, and I see his transaction uses more gas than mine.
How can I achieve the same thing in my code? I am new to crypto :). I am trying to understand. If I explicitly set gasprice, I get the following error:
eip-1559 transaction do not support gasPrice
Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions