solidity icon indicating copy to clipboard operation
solidity copied to clipboard

EthPM3-compatible metadata

Open chriseth opened this issue 5 years ago • 4 comments
trafficstars

chriseth avatar Jun 25 '20 12:06 chriseth

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.

cameel avatar Apr 21 '21 12:04 cameel

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>
 }
}

chriseth avatar Apr 28 '21 13:04 chriseth

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.

leonardoalt avatar Apr 04 '22 08:04 leonardoalt

@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.

cameel avatar Jul 27 '22 13:07 cameel

Stale for a long time, might be easier to rewrite if wanted.

leonardoalt avatar Aug 11 '22 21:08 leonardoalt