mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Update settings section
This commit is contained in:
parent
6e2cc081ec
commit
82c0e4de1d
@ -80,17 +80,29 @@ should be backwards compatible if possible.
|
|||||||
"content": "contract mortal is owned { function kill() { if (msg.sender == owner) selfdestruct(owner); } }"
|
"content": "contract mortal is owned { function kill() { if (msg.sender == owner) selfdestruct(owner); } }"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// Optional
|
||||||
settings:
|
settings:
|
||||||
{
|
{
|
||||||
remappings: [":g/dir"], // just as it used to be
|
// Optional: Sorted list of remappings
|
||||||
// (axic) what is remapping doing exactly?
|
remappings: [ ":g/dir" ],
|
||||||
optimizer: {enabled: true, runs: 500},
|
// Optional: Optimizer settings (enabled defaults to false)
|
||||||
// if given, only compiles this contract, can also be an array. If only a contract name is given, tries to find it if unique.
|
optimizer: {
|
||||||
compilationTarget: "myFile.sol:MyContract",
|
enabled: true,
|
||||||
// addresses of the libraries. If not all libraries are given here, it can result in unlinked objects whose output data is different
|
runs: 500
|
||||||
libraries: {
|
|
||||||
"def:MyLib": "0x123123..."
|
|
||||||
},
|
},
|
||||||
|
// 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.
|
// The following can be used to restrict the fields the compiler will output.
|
||||||
// (axic)
|
// (axic)
|
||||||
outputSelection: [
|
outputSelection: [
|
||||||
@ -144,6 +156,7 @@ Regular Output
|
|||||||
message: "Invalid keyword" // mandatory
|
message: "Invalid keyword" // mandatory
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
// This contains all the compiled outputs. It can be limited/filtered by the compilationTarget setting.
|
||||||
contracts: {
|
contracts: {
|
||||||
"sourceFile.sol:ContractName": {
|
"sourceFile.sol:ContractName": {
|
||||||
// The Ethereum Contract ABI. If empty, it is represented as an empty array.
|
// The Ethereum Contract ABI. If empty, it is represented as an empty array.
|
||||||
|
Loading…
Reference in New Issue
Block a user