Update output selection

This commit is contained in:
Alex Beregszaszi 2017-02-02 14:57:07 +00:00
parent 82c0e4de1d
commit 4b5639bf63

View File

@ -90,10 +90,6 @@ should be backwards compatible if possible.
enabled: true, enabled: true,
runs: 500 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. // Addresses of the libraries. If not all libraries are given here, it can result in unlinked objects whose output data is different.
libraries: { libraries: {
// The top level key is the the name of the source file where the library is used. // The top level key is the the name of the source file where the library is used.
@ -103,30 +99,47 @@ should be backwards compatible if possible.
"MyLib": "0x123123..." "MyLib": "0x123123..."
} }
} }
// The following can be used to restrict the fields the compiler will output. // The following can be used to select desired outputs.
// (axic) // If this field is omitted, then the compiler loads and does type checking, but will not generate any outputs apart from errors.
outputSelection: [ // The first level key is the file name and the second is the contract name, where empty contract name refers to the file itself,
"abi", "evm.assembly", "evm.bytecode", ..., "why3", "ewasm.wasm" // while the star refers to all of the contracts.
] //
// The available output types are as follows:
// abi - ABI
// ast - AST of all source files
// why3 - Why3 translated output
// devdoc - Developer documentation (natspec)
// userdoc - User documentation (natspec)
// metadata - Metadata
// evm.ir - New assembly format before desugaring (not supported atm)
// evm.assembly - New assembly format after desugaring (not supported atm)
// evm.asm - Current assembly format (--asm)
// evm.asmJSON - Current assembly format in JSON (--asm-json)
// evm.opcodes - Opcodes list
// evm.methodIdentifiers - The list of function hashes
// evm.gasEstimates - Function gas estimates
// evm.bytecode - Bytecode (--bin)
// evm.deployedBytecode - Deployed bytecode (--bin-runtime)
// evm.sourceMap - Source mapping (useful for debugging)
// ewasm.wast - eWASM S-expressions format (not supported atm)
// ewasm.wasm - eWASM binary format (not supported atm)
outputSelection: { outputSelection: {
abi,asm,ast,bin,bin-runtime,clone-bin,devdoc,interface,opcodes,srcmap,srcmap-runtime,userdoc // Enable the metadata and bytecode outputs of every single contract.
"*": {
--ast AST of all source files. "*": [ "metadata", "evm.bytecode" ]
--ast-json AST of all source files in JSON format. },
--asm EVM assembly of the contracts. // Enable the abi and opcodes output of MyContract defined in file def.
--asm-json EVM assembly of the contracts in JSON format. "def": {
--opcodes Opcodes of the contracts. "MyContract": [ "abi", "evm.opcodes" ]
--bin Binary of the contracts in hex. },
--bin-runtime Binary of the runtime part of the contracts in hex. // Enable the source map output of every single contract.
--clone-bin Binary of the clone contracts in hex. "*": {
--abi ABI specification of the contracts. "*": [ "evm.sourceMap" ]
--interface Solidity interface of the contracts. },
--hashes Function signature hashes of the contracts. // Enable the AST and Why3 output of every single file.
--userdoc Natspec user documentation of all contracts. "*": {
--devdoc Natspec developer documentation of all contracts. "": [ "ast", "why3" ]
--formal Translated source suitable for formal analysis. }
// to be defined
} }
} }
} }