aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2017-02-02 21:58:30 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2017-02-09 07:41:47 +0800
commit82c0e4de1df0d4b17e01e7fd35ebc312156b85fd (patch)
tree1752573d47f590126c1f0828f433028f564e7310
parent6e2cc081ecec5c5c20945b70159d36b9e8286d0a (diff)
downloaddexon-solidity-82c0e4de1df0d4b17e01e7fd35ebc312156b85fd.tar.gz
dexon-solidity-82c0e4de1df0d4b17e01e7fd35ebc312156b85fd.tar.zst
dexon-solidity-82c0e4de1df0d4b17e01e7fd35ebc312156b85fd.zip
Update settings section
-rw-r--r--docs/using-the-compiler.rst29
1 files changed, 21 insertions, 8 deletions
diff --git a/docs/using-the-compiler.rst b/docs/using-the-compiler.rst
index 57135df8..2238a773 100644
--- a/docs/using-the-compiler.rst
+++ b/docs/using-the-compiler.rst
@@ -80,17 +80,29 @@ should be backwards compatible if possible.
"content": "contract mortal is owned { function kill() { if (msg.sender == owner) selfdestruct(owner); } }"
}
},
+ // Optional
settings:
{
- remappings: [":g/dir"], // just as it used to be
- // (axic) what is remapping doing exactly?
- optimizer: {enabled: true, runs: 500},
- // if given, only compiles this contract, can also be an array. If only a contract name is given, tries to find it if unique.
- compilationTarget: "myFile.sol:MyContract",
- // addresses of the libraries. If not all libraries are given here, it can result in unlinked objects whose output data is different
- libraries: {
- "def:MyLib": "0x123123..."
+ // Optional: Sorted list of remappings
+ remappings: [ ":g/dir" ],
+ // Optional: Optimizer settings (enabled defaults to false)
+ optimizer: {
+ enabled: true,
+ runs: 500
+ },
+ // If given, only compiles the specified contracts.
+ compilationTarget: {
+ "myFile.sol": "MyContract"
},
+ // Addresses of the libraries. If not all libraries are given here, it can result in unlinked objects whose output data is different.
+ libraries: {
+ // The top level key is the the name of the source file where the library is used.
+ // If remappings are used, this source file should match the global path after remappings were applied.
+ // If this key is an empty string, that refers to a global level.
+ "myFile.sol": {
+ "MyLib": "0x123123..."
+ }
+ }
// The following can be used to restrict the fields the compiler will output.
// (axic)
outputSelection: [
@@ -144,6 +156,7 @@ Regular Output
message: "Invalid keyword" // mandatory
}
]
+ // This contains all the compiled outputs. It can be limited/filtered by the compilationTarget setting.
contracts: {
"sourceFile.sol:ContractName": {
// The Ethereum Contract ABI. If empty, it is represented as an empty array.