solidity
solidity copied to clipboard
EthPM3-compatible metadata
We talked briefly about PR on the call today. It implements EIP-2678 and is waiting for some feedback. We decided to discuss it in more detail on the next call.
To compare the two metadata structures, I provide both in their full form and re-use items that are identical in both structures by abbreviating them in angle brackets.
current metadata:
{
version: 1,
language: "Solidity",
compiler: { version: <compilerVersion> },
sources: [ ... ],
settings: <settingsForMetadata> // plus settings.compilationTarget[sourceUnitName] = <fullyQualifiedContractNameToBeCompiled>,
output: {
abi: <abi>,
userdoc: <userdoc>,
devdoc: <devdoc>
}
}
EthPM/3 metadata:
{
manifest: "ethpm/3",
compilers: [{
name: "solidity",
version: <compilerVersion>,
settings: <settingsForMetadata>,
contractTypes: [ <contractNameToBeCompiled> ]
}],
// The sources object is mostly the same, the only difference is that this
// uses ...[sourceName].checksum = {algorithm: "keccak256", hash: <hash>} instead of ...[sourceName].keccak256 = <hash>
sources: [ ... ],
contractTypes: {
<contractNameToBeCompiled>: {
sourceID: <sourceName>,
abi: <abi>
userdoc: <userdoc>,
devdoc: <devdoc>
}
}
There was some talk about packages in the Foundry TG group. This doesn't look too complicated, but the quality of the EIP itself is debatable. I think we should decide on whether we're doing this or not, and just do it or close it.
@chriseth Do you think it still makes sense to keep this open? The changes do not look complicated and the code around has changed in the meantime so it might be better to just redo this from scratch if we decide to go with it.
And if we still want it, I think it would be better to just create an issue in its place.
Stale for a long time, might be easier to rewrite if wanted.