aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2016-06-11 04:03:22 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2017-02-09 05:53:07 +0800
commit57662e1bf3cba937289c50b3b711918a456101a6 (patch)
treeeb21967279036fe33d0b6b3d6243d96858ef7b0a /docs
parent4fccb5fdaca054905bfab7cb01e7eba6fb47c114 (diff)
downloaddexon-solidity-57662e1bf3cba937289c50b3b711918a456101a6.tar.gz
dexon-solidity-57662e1bf3cba937289c50b3b711918a456101a6.tar.zst
dexon-solidity-57662e1bf3cba937289c50b3b711918a456101a6.zip
Add language and some minor corrections and clarifications.
Diffstat (limited to 'docs')
-rw-r--r--docs/using-the-compiler.rst15
1 files changed, 9 insertions, 6 deletions
diff --git a/docs/using-the-compiler.rst b/docs/using-the-compiler.rst
index 47d7c717..8ceb52a7 100644
--- a/docs/using-the-compiler.rst
+++ b/docs/using-the-compiler.rst
@@ -38,10 +38,11 @@ Standardized Input Description and Metadata Output
**************************************************
In order to ease source code verification of complex contracts that are spread across several files,
-there is a standardized for describing the relations between those files.
+there is a standardized way for describing the relations between those files.
Furthermore, the compiler can generate a json file while compiling that includes
the source, natspec comments and other metadata whose hash is included in the
-actual bytecode.
+actual bytecode. Specifically, the creation data for a contract has to begin with
+`push32 <metadata hash> pop`.
There is some overlap between the input description and the metadata output
and due to the fact that some fields are optional, the metadata can be used as
@@ -55,8 +56,8 @@ the compiler can still generate the metadata alongside the bytecode of each
contract.
The metadata standard is versioned. Future versions are only required to provide the "version" field,
-the two keys inside the "compiler" field. The field compiler.keccak should be the keccak hash
-of a binary of the compiler with the given version.
+the "language" field and the two keys inside the "compiler" field.
+The field compiler.keccak should be the keccak hash of a binary of the compiler with the given version.
The example below is presented in a human-readable way. Properly formatted metadata
should use quotes correctly, reduce whitespace to a minimum and sort the keys of all objects
@@ -67,7 +68,7 @@ Comments are of course not permitted and used here only for explanatory purposes
Input Description
-----------------
-The input description could change with each compiler version, but it
+The input description is language-specific and could change with each compiler version, but it
should be backwards compatible if possible.
{
@@ -105,11 +106,13 @@ This requires the compiler to be able to compute the hash of its own binary,
which requires it to be statically linked. The hash of the binary is not
too important. It is much more important to have the commit hash because
that can be used to query a location of the binary (and whether the version is
-"official") at a registry contract.
+"official") at a registry contract.
{
version: "1",
+ language: "Solidity",
compiler: {
+ commit: "55db20e32c97098d13230ab7500758e8e3b31d64",
version: "soljson-2313-2016-12-12",
keccak: "0x123..."
},