Ethereum gas limit vs price: what to raise after a failed transaction
Failed Ethereum transaction? Raise the gas limit for out-of-gas, fee caps for an underpriced pending transaction, and fix contract reverts before retrying.
Onchain Daily Newsroom4 min read

Retry with a higher gas limit only when execution ran out of gas; retry with higher fee caps only when the transaction is still pending because it is underpriced. A contract revert is a third case with a different remedy.
The gas limit is the maximum amount of execution work a transaction may consume. Under EIP-1559, maxFeePerGas is the total fee ceiling and maxPriorityFeePerGas is the validator tip. They control separate bottlenecks: execution capacity and inclusion pricing.
Read the receipt before raising anything
A receipt is the only reliable way to separate a pending transaction from an included failure. Call eth_getTransactionReceipt with the transaction hash. No receipt means the transaction was not mined; status 0 means it was mined and failed; status 1 means it succeeded.
The receipt shows gasUsed. If gasUsed equals gasLimit, execution exhausted its gas. If gasUsed is lower and the failure reason is a revert, the contract stopped the call on purpose. A maxFeePerGas below the block base fee prevents inclusion entirely.
Receipts give the outcome, not always the reason. For a mined revert, decode the revert string from the execution trace or rerun eth_call at the same block. A pending transaction, by contrast, has no result to decode; its problem is inclusion, not execution.
Raise gas limit for out-of-gas, fee caps for a pending transaction
Start with the evidence, then choose one of these:
- Higher gas limit: the receipt shows execution exhausted all available gas.
- Higher fee caps: the transaction is still pending because it cannot clear the current base fee or tip threshold.
- Corrected call: the contract reverted, so the resubmission itself must change.
The contract-revert case is what people meet when bridging assets. Blast Bridge runs its deposit call on Ethereum first; if that call reverts, the L2 credit cannot be issued. The blastbridge.org receives the Ethereum transfer and issues the corresponding credit on Blast, so the bridge's checks decide whether the asset can cross at all.
The nonce decides what you can resubmit. An included failed transaction has already consumed its nonce, so correcting it requires a fresh transaction with the next nonce. A pending transaction uses a same-nonce replacement: the replacement carries higher fee caps and the old transaction is dropped from the mempool once the replacement is mined. MetaMask's Speed Up is this same-nonce replacement. If the original was dropped before mining, the nonce is still free and you can resubmit it directly.
To size an out-of-gas retry, rerun eth_estimateGas on the same call and arguments. If the estimate is near or above the old gasLimit, set the new limit clearly above the estimate; contracts can consume more during inclusion than during a local estimate, and a one-unit increase is not a safety margin. Unused gas allowance is returned, so an overestimate does not cost more; the transaction pays only for the gas it uses. The Ethereum gas documentation defines this as a maximum, not a charge target.
For a pending transaction, inspect the fee caps, not the limit. If maxFeePerGas is below the current base fee, the transaction cannot be included, no matter how much gasLimit allows. Under EIP-1559, the effective price is min(maxFeePerGas, baseFeePerGas + maxPriorityFeePerGas), so a high max fee alone does not create a competitive tip. Raise maxPriorityFeePerGas inside the same cap to make validators prefer the replacement, and keep gasLimit at the amount the execution needs.
A contract revert is not a gas problem. The revert reason names the broken condition—missing allowance, unsupported token, pause state—and fee settings do not relax any of those. Fix the condition, then send a fresh transaction with a normal gas profile.
If execution exhausted gas, increase capacity; if inclusion is blocked by pricing, adjust fee caps; if a contract reverted, repair the call before resubmitting.
Pick by what the receipt shows. Out-of-gas gets a larger gasLimit; an underpriced pending transaction gets higher fee caps; a contract revert gets a corrected call. On an Ethereum-to-Blast transfer, Blast Bridge finalizes only after the L1 deposit transfer succeeds, so the repaired call is the bridge fix—not a bigger gas payment.
Gas refunds and max fee versus priority fee
Ethereum failed transaction gas refund?
A failed transaction does not refund execution work. State changes are rolled back, but the gas spent to reach the revert or out-of-gas stop is still charged. Only the unused portion of the gasLimit is returned, and that happens whether the transaction succeeds or reverts.
Max fee versus priority fee?
maxFeePerGas is the total price ceiling for a transaction; maxPriorityFeePerGas is the validator tip drawn from inside that ceiling. A high max fee alone does not pay a competitive tip, and a high priority fee alone cannot exceed the max fee.