diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2017-02-07 06:47:05 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2017-02-11 06:41:09 +0800 |
commit | 1fcad8b4ab48f63504c69c24372fb34f34a79436 (patch) | |
tree | e320e1e8dfa30e2b909a9f953d9443076b7e887e | |
parent | f3158f92d6070b6088c6a1b32f2934b9cd7dde1b (diff) | |
download | dexon-solidity-1fcad8b4ab48f63504c69c24372fb34f34a79436.tar.gz dexon-solidity-1fcad8b4ab48f63504c69c24372fb34f34a79436.tar.zst dexon-solidity-1fcad8b4ab48f63504c69c24372fb34f34a79436.zip |
Document revert()
-rw-r--r-- | Changelog.md | 2 | ||||
-rw-r--r-- | docs/assembly.rst | 2 |
2 files changed, 4 insertions, 0 deletions
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 | |