Skip to content

Commit

Permalink
REVERT returns 0 in CALL/CREATE
Browse files Browse the repository at this point in the history
  • Loading branch information
1pass-fi committed Jul 31, 2017
1 parent d360508 commit 837ee0f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions EIPS/eip-140.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down

0 comments on commit 837ee0f

Please sign in to comment.