diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2017-02-02 21:54:21 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2017-02-09 07:40:07 +0800 |
commit | 6e2cc081ecec5c5c20945b70159d36b9e8286d0a (patch) | |
tree | d6fa18ba40c8bd57e2fa1acb18f7a4d14cf440cb | |
parent | 720cf20855b7695f3c2059c2e1c52e2cb2501995 (diff) | |
download | dexon-solidity-6e2cc081ecec5c5c20945b70159d36b9e8286d0a.tar dexon-solidity-6e2cc081ecec5c5c20945b70159d36b9e8286d0a.tar.gz dexon-solidity-6e2cc081ecec5c5c20945b70159d36b9e8286d0a.tar.bz2 dexon-solidity-6e2cc081ecec5c5c20945b70159d36b9e8286d0a.tar.lz dexon-solidity-6e2cc081ecec5c5c20945b70159d36b9e8286d0a.tar.xz dexon-solidity-6e2cc081ecec5c5c20945b70159d36b9e8286d0a.tar.zst dexon-solidity-6e2cc081ecec5c5c20945b70159d36b9e8286d0a.zip |
Update sources definition based on the metadata
-rw-r--r-- | docs/using-the-compiler.rst | 34 |
1 files changed, 25 insertions, 9 deletions
diff --git a/docs/using-the-compiler.rst b/docs/using-the-compiler.rst index dcd5e589..57135df8 100644 --- a/docs/using-the-compiler.rst +++ b/docs/using-the-compiler.rst @@ -52,17 +52,33 @@ should be backwards compatible if possible. .. code-block:: none { + // Required sources: { - // the keys here are the "global" names of the source files, imports can use other files via remappings (see below) - "abc": "contract b{}", // specify source directly - // (axic) I think 'keccak' on its on is not enough. I would go perhaps with swarm: "0x12.." and ipfs: "Qma..." for simplicity - // (chriseth) Where the content is stored is a second component, but yes, we could give an indication there. - "def": {keccak: "0x123..."}, // source has to be retrieved by its hash - "ghi": {file: "/tmp/path/to/file.sol"}, // file on filesystem - // (axic) I'm inclined to think the source _must_ be provided in the JSON, - - "dir/file.sol": "contract a {}" + // The keys here are the "global" names of the source files, + // imports can use other files via remappings (see below). + "myFile.sol": + { + // Optional: keccak256 hash of the source file + "keccak256": "0x123...", + // Required (unless "content" is used, see below): URL(s) to the source file. + // URL(s) should be imported in this order and the result checked against the + // keccak256 hash (if available). If the hash doesn't match or none of the + // URL(s) result in success, an error should be raised. + "urls": + [ + "bzzr://56ab...", + "ipfs://Qma...", + "file:///tmp/path/to/file.sol" + ] + }, + "mortal": + { + // Optional: keccak256 hash of the source file + "keccak256": "0x234...", + // Required (unless "urls" is used): literal contents of the source file + "content": "contract mortal is owned { function kill() { if (msg.sender == owner) selfdestruct(owner); } }" + } }, settings: { |