3

STOP halts execution and according to this mentions INVALID is used as an abort. Is the difference between these opcodes purely semantical?

3

STOP is a valid stop to the contract. State changes are kept and unsued gas is refunded.

INVALID will throw the transaction, its state changes and cause the consumption of all gas sent with it.

As of Solidity 0.4.10 there is now a revert() call which enacts the REVERT opcode introduced in EIP140. This opcode, halts the contract, throws state changes but refunds unused gas.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.