From 1fcad8b4ab48f63504c69c24372fb34f34a79436 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Mon, 6 Feb 2017 22:47:05 +0000 Subject: Document revert() --- Changelog.md | 2 ++ docs/assembly.rst | 2 ++ 2 files changed, 4 insertions(+) diff --git a/Changelog.md b/Changelog.md index d383ba42..bd514cfe 100644 --- a/Changelog.md +++ b/Changelog.md @@ -2,6 +2,8 @@ Features: * Add ``assert(condition)``, which throws if condition is false. + * Code generator: Support ``revert()`` to abort with rolling back, but not consuming all gas. + * Inline assembly: Support ``revert`` (EIP140) as an opcode. * Type system: Support explicit conversion of external function to address. Bugfixes: diff --git a/docs/assembly.rst b/docs/assembly.rst index 79137b7e..23ccfcbe 100644 --- a/docs/assembly.rst +++ b/docs/assembly.rst @@ -248,6 +248,8 @@ In the grammar, opcodes are represented as pre-defined identifiers. +-------------------------+------+-----------------------------------------------------------------+ | return(p, s) | `-` | end execution, return data mem[p..(p+s)) | +-------------------------+------+-----------------------------------------------------------------+ +| revert(p, s) | `-` | end execution, revert state changes, return data mem[p..(p+s)) | ++-------------------------+------+-----------------------------------------------------------------+ | selfdestruct(a) | `-` | end execution, destroy current contract and send funds to a | +-------------------------+------+-----------------------------------------------------------------+ | invalid | `-` | end execution with invalid instruction | -- cgit v1.2.3