Transactions are atomic

Transactions are either successfully terminated or reverted:

1) From EOA to EOA: any changes to the global state are recorded (e.g., account balances).

2) From EOA to a contract that does not invoke other contracts: any changes to the global state are recorded (e.g., account balances, state variables of the contracts).

3) From EOA to a contract that invokes other contracts in a manner that propagates errors: any changes to the global state are recorded (e.g. account balances, state variables of the contracts).

4) From EOA to a contract that invokes other contracts in a manner that does NOT propagate errors: there may be changes to the global state recorded (e.g., account balances, state variables of the non-erroring contracts), whereas other changes are not recorded (e.g. state variables of the erroring contracts).

If a tx is reverted, all of its effects (changes in state) are "rolled back". A failed transaction is still recorded and the ether spent on gas for the execution is deducted from the originating account.

Last updated