Skip to content

Commit

Permalink
Merge pull request ethereum#13286 from LCamel/contract_metadata_doc
Browse files Browse the repository at this point in the history
Modify the metadata / hash document.
  • Loading branch information
ekpyron authored Aug 10, 2022
2 parents c4b0cb7 + 14f63cc commit 3a5b43e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions docs/metadata.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,12 @@ the :ref:`Standard JSON Interface<compiler-api>`.

You have to publish the metadata file to IPFS, Swarm, or another service so
that others can access it. You create the file by using the ``solc --metadata``
command that generates a file called ``ContractName_meta.json``. It contains
IPFS and Swarm references to the source code, so you have to upload all source
files and the metadata file.
command together with the ``--output-dir`` parameter. Without the parameter,
the metadata will be written to standard output.
The metadata contains IPFS and Swarm references to the source code, so you have to
upload all source files in addition to the metadata file. For IPFS, the hash contained
in the CID returned by ``ipfs add`` (not the direct sha2-256 hash of the file)
shall match with the one contained in the bytecode.

The metadata file has the following format. The example below is presented in a
human-readable way. Properly formatted metadata should use quotes correctly,
Expand Down

0 comments on commit 3a5b43e

Please sign in to comment.