diff options
author | chriseth <chris@ethereum.org> | 2018-10-01 19:08:10 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-01 19:08:10 +0800 |
commit | ba68966ea1f47df2a862c15c6595e40e6723bbd5 (patch) | |
tree | 9ba02ff73a61e044f9a29edcc60039a398737bd3 /docs/assembly.rst | |
parent | 8ef47cb61a89c42ae7348a90d3eb3ee1765808d7 (diff) | |
parent | e109d1a6cfaa47dfc0919e028cccebb3219b1a68 (diff) | |
download | dexon-solidity-ba68966ea1f47df2a862c15c6595e40e6723bbd5.tar.gz dexon-solidity-ba68966ea1f47df2a862c15c6595e40e6723bbd5.tar.zst dexon-solidity-ba68966ea1f47df2a862c15c6595e40e6723bbd5.zip |
Merge pull request #5114 from ethereum/assembly-docs
Improve the create2 description in assembly.rst (and include in yul.rst)
Diffstat (limited to 'docs/assembly.rst')
-rw-r--r-- | docs/assembly.rst | 6 |
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 | |