Skip to main content

What Happens If a Transaction Runs out of Gas?

If a transaction runs out of Gas (meaning the Gas Limit was set too low for the required computation), the transaction is immediately reverted. All state changes that occurred during the execution are undone, as if the transaction never happened.

Crucially, the user still pays the transaction fee for the Gas that was consumed up until the point of failure, as the network resources were still utilized.

What Is the Difference between a Transaction’s Size and Its Gas Limit?
What Happens If a Single Transaction in the Merkle Tree Is Altered?
Explain the Difference between “Gas” and “Gas Limit” in a Transaction
What Happens If a Signed Transaction with a Future Nonce Is Broadcast?