mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
commit
d2157ae5e9
@ -282,14 +282,14 @@ In the grammar, opcodes are represented as pre-defined identifiers.
|
|||||||
+-------------------------+-----+---+-----------------------------------------------------------------+
|
+-------------------------+-----+---+-----------------------------------------------------------------+
|
||||||
| extcodehash(a) | | C | code hash of address a |
|
| extcodehash(a) | | C | code hash of address a |
|
||||||
+-------------------------+-----+---+-----------------------------------------------------------------+
|
+-------------------------+-----+---+-----------------------------------------------------------------+
|
||||||
| create(v, p, s) | | F | create new contract with code mem[p...(p+s)) and send v wei |
|
| create(v, p, n) | | F | create new contract with code mem[p...(p+n)) and send v wei |
|
||||||
| | | | and return the new address |
|
| | | | and return the new address |
|
||||||
+-------------------------+-----+---+-----------------------------------------------------------------+
|
+-------------------------+-----+---+-----------------------------------------------------------------+
|
||||||
| create2(v, n, p, s) | | C | create new contract with code mem[p...(p+s)) at address |
|
| create2(v, p, n, s) | | C | create new contract with code mem[p...(p+n)) at address |
|
||||||
| | | | keccak256(0xff . self . n . keccak256(mem[p...(p+s))) |
|
| | | | keccak256(0xff . this . s . keccak256(mem[p...(p+n))) |
|
||||||
| | | | and send v wei and return the new address, where ``0xff`` is a |
|
| | | | and send v wei and return the new address, where ``0xff`` is a |
|
||||||
| | | | 8 byte value, ``self`` is the current contract's address |
|
| | | | 8 byte value, ``this`` is the current contract's address |
|
||||||
| | | | as a 20 byte value and ``n`` is a big-endian 256-bit value |
|
| | | | as a 20 byte value and ``s`` is a big-endian 256-bit value |
|
||||||
+-------------------------+-----+---+-----------------------------------------------------------------+
|
+-------------------------+-----+---+-----------------------------------------------------------------+
|
||||||
| call(g, a, v, in, | | F | call contract at address a with input mem[in...(in+insize)) |
|
| 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 |
|
| insize, out, outsize) | | | providing g gas and v wei and output area |
|
||||||
|
10
docs/yul.rst
10
docs/yul.rst
@ -415,14 +415,14 @@ The following functions must be available:
|
|||||||
+---------------------------------------------+-----------------------------------------------------------------+
|
+---------------------------------------------+-----------------------------------------------------------------+
|
||||||
| *Execution control* |
|
| *Execution control* |
|
||||||
+---------------------------------------------+-----------------------------------------------------------------+
|
+---------------------------------------------+-----------------------------------------------------------------+
|
||||||
| create(v:u256, p:u256, s:u256) | create new contract with code mem[p..(p+s)) and send v wei |
|
| create(v:u256, p:u256, n:u256) | create new contract with code mem[p..(p+n)) and send v wei |
|
||||||
| | and return the new address |
|
| | and return the new address |
|
||||||
+---------------------------------------------+-----------------------------------------------------------------+
|
+---------------------------------------------+-----------------------------------------------------------------+
|
||||||
| create2(v:u256, n:u256, p:u256, s:u256) | create new contract with code mem[p...(p+s)) at address |
|
| create2(v:u256, p:u256, n:u256, s:u256) | create new contract with code mem[p...(p+n)) at address |
|
||||||
| | keccak256(0xff . self . n . keccak256(mem[p...(p+s))) |
|
| | keccak256(0xff . this . s . keccak256(mem[p...(p+n))) |
|
||||||
| | and send v wei and return the new address, where ``0xff`` is a |
|
| | and send v wei and return the new address, where ``0xff`` is a |
|
||||||
| | 8 byte value, ``self`` is the current contract's address |
|
| | 8 byte value, ``this`` is the current contract's address |
|
||||||
| | as a 20 byte value and ``n`` is a big-endian 256-bit value |
|
| | as a 20 byte value and ``s`` is a big-endian 256-bit value |
|
||||||
+---------------------------------------------+-----------------------------------------------------------------+
|
+---------------------------------------------+-----------------------------------------------------------------+
|
||||||
| call(g:u256, a:u256, v:u256, in:u256, | call contract at address a with input mem[in..(in+insize)) |
|
| call(g:u256, a:u256, v:u256, in:u256, | call contract at address a with input mem[in..(in+insize)) |
|
||||||
| insize:u256, out:u256, | providing g gas and v wei and output area |
|
| insize:u256, out:u256, | providing g gas and v wei and output area |
|
||||||
|
Loading…
Reference in New Issue
Block a user