Solidity v0.4.10 introduced the revert()
and require()
functions, along with support for the REVERT
opcode. As far as I can tell, this means that any contract compiled using ^0.4.10
will express different behavior on throw
after metropolis.
Background:
According to the Solidity Exceptions documentation:
user-provided exception is generated in the following situations:
- Calling throw.
- Calling require with an argument that evaluates to false.
and
Internally, Solidity performs a revert operation (instruction
0xfd
) when a user-provided exception is thrown.
Conclusion:
So, it seems that recently compiled/deployed contracts will include the 0xfd
opcode, which on homestead is just an INVALID
operation, but will become REVERT
after metropolis.
Question:
Is my conclusion correct?
Are there any cases where the the changed behavior could be problematic?