Fixes for the JSON IO documentation#2097
Conversation
| // The bytecode as a hex string. | ||
| object: "00fe", | ||
| // Opcodes list (string) | ||
| opcodes: "", |
There was a problem hiding this comment.
It makes more sense here, given it is against bytecode or deployedBytecode.
docs/using-the-compiler.rst
Outdated
| // The list of function hashes | ||
| methodIdentifiers: { | ||
| "5c19a95c": "delegate(address)", | ||
| "delegate(address)": "5c19a95c", |
There was a problem hiding this comment.
It doesn't matter which order this is in, but this order matches that of gasEstimates.
| // See https://github.com/ethereum/wiki/wiki/Ethereum-Contract-ABI | ||
| abi: [], | ||
| // See the Metadata Output documentation (serialised JSON string) | ||
| metadata: "{...}", |
There was a problem hiding this comment.
We need to figure out what to do with the metadata. Maybe it makes sense to have:
metadataString(serialised)metadata(object)
We'll know better when doing verification.
docs/using-the-compiler.rst
Outdated
| methodIdentifiers: { | ||
| "5c19a95c": "delegate(address)", | ||
| "delegate(address)": "5c19a95c", | ||
| "heavyLifting()": "438dca88" |
There was a problem hiding this comment.
Need to remove this, since it is "internal" below.
17b3002 to
59b0bfe
Compare
| // The bytecode as a hex string. | ||
| object: "00fe", | ||
| // Opcodes list (string) | ||
| opcodes: "", |
| userdoc: {}, | ||
| // Developer documentation (natspec) | ||
| devdoc: {}, | ||
| // EVM-related outputs |
There was a problem hiding this comment.
(two lines below): The idea was that the IR is not too EVM specific, but perhaps we can keep it here and later add an additional one higher up. In that IR we might want to use some functions which are not part of the IR itself but will be added when we know the target machine.
There was a problem hiding this comment.
Since the new IR is still not part of the compiler and indeed it seems to be different, it would make sense moving it out of of the evm object.
docs/using-the-compiler.rst
Outdated
| // evm.bytecode - Bytecode | ||
| // evm.bytecode.opcodes - Opcodes list | ||
| // evm.bytecode.sourceMap - Source mapping (useful for debugging) | ||
| // evm.deployedBytecode - Deployed bytecode |
There was a problem hiding this comment.
Can you mention that deployedBytecode and bytecode have the same structure?
| // evm.methodIdentifiers - The list of function hashes | ||
| // evm.gasEstimates - Function gas estimates | ||
| // evm.bytecode - Bytecode | ||
| // evm.bytecode.opcodes - Opcodes list |
There was a problem hiding this comment.
Please add evm.bytecode.object.
Further, how does the output selector look like if I only want to have the object but not the list of opcodes? Note that the list of opcodes is useless most of the time since it does not work once you have data like the metadata hash.
There was a problem hiding this comment.
Probably it makes more sense to only have evm.bytecode which turns on object, opcodes, sourceMaps and linkRerefences.
There was a problem hiding this comment.
Sorry, I don't understand your comment.
a2c0c6a to
a3c4171
Compare
a3c4171 to
c22ba03
Compare
|
@chriseth can we merge this? |
No description provided.