How Does the ‘Out-of-Gas’ Error Impact a Smart Contract Transaction’s State Change?
An 'out-of-gas' error occurs when the user-specified gas limit for a transaction is insufficient to complete all the smart contract operations. When this happens, the transaction fails, and all state changes that occurred during the execution are reverted.
However, the user still pays the gas fee for the computational work that was performed before the failure, as the validators expended resources.