sourcify
sourcify copied to clipboard
In CheckedContract's constuctor updating the sources content works diffrently from before the refactoring
check the referenced comment below
TODO: Summarize the issue in detail and move back to "Todo"
This might be fixed but might have affected older contracts. We need to check the whole repo
There used to be a loop in the CheckedContract constructor that was mistakenly rewriting the metadata.
https://github.com/ethereum/sourcify/blob/bd67c955f34698c9b6bc16d9754d933d8afc2a0f/packages/lib-sourcify/src/lib/CheckedContract.ts#L82-L91
The variable sources
is a reference to the metadata's sources. This means that potentially some saved metadata in the repo contains content and no license fields, which would cause a different metadata with a different hash to be saved in the repo.
This will not cause a problem if we recompile the contract with the existing incorrect metadata (that's missing the license
field) it will output the correct metadata without problems because the license field does not affect compilation. We just need to save the output metadata when we are doing a recompilation.
The problem this causes is that the correct metadata does not get pinned on IPFS
I guess this can be closed?
We solved this by re-verfifying all the contracts #1287
I also mentioned this issue in the docs