mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #7278 from ethereum/develop
Merge develop into develop_060
This commit is contained in:
+1
-1
@@ -47,7 +47,7 @@ usual ``//`` and ``/* */`` comments. There is one exception: Identifiers in inli
|
||||
these curly braces, you can use the following (see the later sections for more details):
|
||||
|
||||
- literals, i.e. ``0x123``, ``42`` or ``"abc"`` (strings up to 32 characters)
|
||||
- opcodes in functional style, e.g. ``add(1, mlod(0))``
|
||||
- opcodes in functional style, e.g. ``add(1, mload(0))``
|
||||
- variable declarations, e.g. ``let x := 7``, ``let x := add(y, 3)`` or ``let x`` (initial value of empty (0) is assigned)
|
||||
- identifiers (assembly-local variables and externals if used as inline assembly), e.g. ``add(3, x)``, ``sstore(x_slot, 2)``
|
||||
- assignments, e.g. ``x := add(y, 3)``
|
||||
|
||||
+4
-4
@@ -124,7 +124,7 @@ Encoding of the Metadata Hash in the Bytecode
|
||||
=============================================
|
||||
|
||||
Because we might support other ways to retrieve the metadata file in the future,
|
||||
the mapping ``{"bzzr0": <Swarm hash>, "solc": <compiler version>}`` is stored
|
||||
the mapping ``{"bzzr1": <Swarm hash>, "solc": <compiler version>}`` is stored
|
||||
`CBOR <https://tools.ietf.org/html/rfc7049>`_-encoded. Since the mapping might
|
||||
contain more keys (see below) and the beginning of that
|
||||
encoding is not easy to find, its length is added in a two-byte big-endian
|
||||
@@ -132,7 +132,7 @@ encoding. The current version of the Solidity compiler usually adds the followin
|
||||
to the end of the deployed bytecode::
|
||||
|
||||
0xa2
|
||||
0x65 'b' 'z' 'z' 'r' '0' 0x58 0x20 <32 bytes swarm hash>
|
||||
0x65 'b' 'z' 'z' 'r' '1' 0x58 0x20 <32 bytes swarm hash>
|
||||
0x64 's' 'o' 'l' 'c' 0x43 <3 byte version encoding>
|
||||
0x00 0x32
|
||||
|
||||
@@ -150,9 +150,9 @@ will instead use a complete version string including commit hash and build date.
|
||||
are used, the mapping will also contain ``"experimental": true``.
|
||||
|
||||
.. note::
|
||||
The compiler currently uses the "swarm version 0" hash of the metadata,
|
||||
The compiler currently uses the "swarm version 1" hash of the metadata,
|
||||
but this might change in the future, so do not rely on this sequence
|
||||
to start with ``0xa2 0x65 'b' 'z' 'z' 'r' '0'``. We might also
|
||||
to start with ``0xa2 0x65 'b' 'z' 'z' 'r' '1'``. We might also
|
||||
add additional data to this CBOR structure, so the
|
||||
best option is to use a proper CBOR parser.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user