aboutsummaryrefslogtreecommitdiffstats
path: root/docs/assembly.rst
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2018-09-27 08:35:42 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2018-09-28 07:08:02 +0800
commit2a7514268860e364298ab1efd8f9d878a217922f (patch)
tree176fbbade970d13d117c3c80ba817b8fb3a474be /docs/assembly.rst
parentc4b5101b9d8337069c495b95b04a420e2665aa2d (diff)
downloaddexon-solidity-2a7514268860e364298ab1efd8f9d878a217922f.tar
dexon-solidity-2a7514268860e364298ab1efd8f9d878a217922f.tar.gz
dexon-solidity-2a7514268860e364298ab1efd8f9d878a217922f.tar.bz2
dexon-solidity-2a7514268860e364298ab1efd8f9d878a217922f.tar.lz
dexon-solidity-2a7514268860e364298ab1efd8f9d878a217922f.tar.xz
dexon-solidity-2a7514268860e364298ab1efd8f9d878a217922f.tar.zst
dexon-solidity-2a7514268860e364298ab1efd8f9d878a217922f.zip
Improve the create2 description in assembly.rst
Diffstat (limited to 'docs/assembly.rst')
-rw-r--r--docs/assembly.rst6
1 files changed, 4 insertions, 2 deletions
diff --git a/docs/assembly.rst b/docs/assembly.rst
index 02a802a8..c609fa9d 100644
--- a/docs/assembly.rst
+++ b/docs/assembly.rst
@@ -277,8 +277,10 @@ In the grammar, opcodes are represented as pre-defined identifiers.
| | | | and return the new address |
+-------------------------+-----+---+-----------------------------------------------------------------+
| create2(v, n, p, s) | | C | create new contract with code mem[p...(p+s)) at address |
-| | | | keccak256(0xff . <address> . n . keccak256(mem[p...(p+s))) |
-| | | | and send v wei and return the new address |
+| | | | keccak256(0xff . self . n . keccak256(mem[p...(p+s))) |
+| | | | and send v wei and return the new address, where ``0xff`` is a |
+| | | | 8 byte value, ``self`` is the current contract's address |
+| | | | as a 20 byte value and ``n`` is a big-endian 256-bit value |
+-------------------------+-----+---+-----------------------------------------------------------------+
| call(g, a, v, in, | | F | call contract at address a with input mem[in...(in+insize)) |
| insize, out, outsize) | | | providing g gas and v wei and output area |