You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// The available output types are as follows:
// abi - ABI
// ast - AST of all source files
// legacyAST - legacy AST of all source files
// devdoc - Developer documentation (natspec)
// userdoc - User documentation (natspec)
// metadata - Metadata
// ir - New assembly format before desugaring
// evm.assembly - New assembly format after desugaring
// evm.legacyAssembly - Old-style assembly format in JSON
// evm.bytecode.object - Bytecode object
// evm.bytecode.opcodes - Opcodes list
// evm.bytecode.sourceMap - Source mapping (useful for debugging)
// evm.bytecode.linkReferences - Link references (if unlinked object)
// evm.deployedBytecode* - Deployed bytecode (has the same options as evm.bytecode)
// evm.methodIdentifiers - The list of function hashes
// evm.gasEstimates - Function gas estimates
// ewasm.wast - eWASM S-expressions format (not supported atm)
// ewasm.wasm - eWASM binary format (not supported atm)
the ast value is missing. not sure what is problems yet.
We identified the following sections in the documentation that talk about the compiler input and output and we would probably change the VERSION in the documentation to check older compiler version for their corresponding information, but we are concerned about the docs talking about the cli and not solcjs and wonder if there are more sources we could study to answer our remaining questions:
How do we best get all imports a contract uses so i can fetch missing contract data from url's, cache them and pass them to the compiler when using solcjs?
How do I get the AST now. It seems to not be part of the compile output anymore or we have to specify it somehow - AND is it possible to get the AST without compiling using maybe another module?
Even though the documentation has some comments about the fields listed below, they don't really describe or define the fields in ways that make them clear enough and seem to assume a lot of background knowledge. What is the format and structure and purpose of the following compiler output fields - and how do i add/change/influence it/them?
use the callback mechanism to load missing sources. Note that you cannot use any async calls during the callback, so either store what is requested and call the compiler again or load in a sync way
ast: see above
the fields: Yes, it does assume some background knowledge. If you don't know what the field is about, then you can probably ignore it.
It turns out the source list is there, at least the information that is needed from the source list: sources.<sourceName>.id is the index into the old source list, i.e. the index that is used for the source references.
@todo
devdoc
,userdoc
,functionHashes
, etc... in metadata about and should they be kept?now
https://solidity.readthedocs.io/en/v0.5.1/using-the-compiler.html?highlight=outputSelection
version 0.5.0 and 0.5.1 don't have
the ast value is missing.not sure what is problems yet.We identified the following sections in the documentation that talk about the compiler input and output and we would probably change the VERSION in the documentation to check older compiler version for their corresponding information, but we are concerned about the docs talking about the
cli
and notsolcjs
and wonder if there are more sources we could study to answer our remaining questions:2 https://solidity.readthedocs.io/en/v0.5.1/abi-spec.html
Questions
In what way does this input spec apply to solcjs?
sources['XXX.sol'].urls
settings.remappings
How do we best get all imports a contract uses so i can fetch missing contract data from url's, cache them and pass them to the compiler when using solcjs?
How do I get the AST now. It seems to not be part of the compile output anymore or we have to specify it somehow - AND is it possible to get the AST without compiling using maybe another module?
Even though the documentation has some comments about the fields listed below, they don't really describe or define the fields in ways that make them clear enough and seem to assume a lot of background knowledge. What is the format and structure and purpose of the following compiler output fields - and how do i add/change/influence it/them?
compilationTarget
optimizer
(.enabled, .runs)devdoc
userdoc
remappings
sources.id
metadata
version
:1
functionHashes
ewasm.wast
ewasm.wasm
binary.bytecode.runtimeBytecode
deployedBytecode
libraries
binary.sourcemap.srcmapRuntime
sources.sourcecode.urls
sources.sourcecode.sourcelist
ast
vs.legacyAST
vs. no ast at all?metadata.useLiteralContent
ir
(new assembly format before desugaring)evm
(.assembly,.legacyAssembly.bytecode, ...)evm.linkReferences
outputSelection
seems to be very important but it's not entirely clear how to use iterrors[i].component
"general"
,"ewasm"
, etc... mean and what are all possible values?can there be other severity levels than
"error"and
"warning"`?methodIdentifiers
gasEstimates
external vs internal vs creationanswers:
<filename>.<ContractName>.evm.gasEstimates
deployedBytecode
. The source maps are calledsourceMap
and they are inside the bytecode object.sources.<sourceName>.id
is the index into the old source list, i.e. the index that is used for the source references.version 0.3.6 don't have
version 0.3.5 ~ 0.3.2 don't have
version v0.2.2 don't have
ast key is change.
https://solidity.readthedocs.io/en/v0.5.2/using-the-compiler.html#output-description
I have a question. now, output formation is an object.
The text was updated successfully, but these errors were encountered: