REVERT returns 0 in CALL/CREATE

This commit is contained in:
Alex Beregszaszi 2017-07-31 13:49:08 +01:00
parent efd2333c80
commit 8740170c62
1 changed files with 2 additions and 2 deletions

View File

@ -32,9 +32,9 @@ The cost of the `REVERT` instruction equals to that of the `RETURN` instruction,
In case there is not enough gas left to cover the cost of `REVERT` or there is a stack underflow, the effect of the `REVERT` instruction will equal to that of a regular out of gas exception, i.e. it will consume all gas.
In the same way as all other failures, the calling opcode returns `1` on the stack following a `REVERT` opcode in the callee.
In the same way as all other failures, the calling opcode returns `0` on the stack following a `REVERT` opcode in the callee.
In case `REVERT` is used in the context of a `CREATE` or `CREATE2` call, no code is deployed, `1` is put on the stack and the error message is available in the returndata buffer.
In case `REVERT` is used in the context of a `CREATE` or `CREATE2` call, no code is deployed, `0` is put on the stack and the error message is available in the returndata buffer.
The content of the optionally provided memory section is not defined by this EIP, but is a candidate for another Informational EIP.