What Happens When a Transaction Runs out of Gas?
When a transaction runs out of gas, it means the 'Gas Limit' set by the user was insufficient to cover the computational cost of the operation. The transaction execution halts, and the state changes are reverted, meaning the transaction fails.
Crucially, the gas consumed up to the point of failure is still paid to the miner and is not refunded.