diff --git a/docs/using-the-compiler.rst b/docs/using-the-compiler.rst index 47d7c7175..8ceb52a74 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 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..." },