sourcifyeth / remix-sourcify

Remix plugin for source verify project
21 stars 12 forks source link

Fetching the eth 2.0 deposit contract only fetch the metadata #44

Closed yann300 closed 3 years ago

yann300 commented 3 years ago

I tried today to fetch the Eth 2.0 deposit contract (0x00000000219ab540356cbb839cbe05303d7705fa) from the fetch section of the plugin. The metadata.json got imported in the remix file explorer but not the actual source code ( and it looks like the metadata also contain the source code...)

shouldn't the source code be also pushed to Remix?

edisinovcic commented 3 years ago

@FabijanC please take a look why only metadata.json is returned.

From what can be seen here there is both metadata and source files. https://repo.sourcify.dev/contracts/full_match/1/0x00000000219ab540356cBB839Cbe05303d7705Fa/

FabijanC commented 3 years ago

The server returns both files. This is the pseudocode of how the files are processed in the plugin:

Sourcify backend allows metadata.sources not to specify urls, but directly provide content. If only content is provided, there is no urls property under metadata.sources[i], and the iteration through urls fails because it's undefined.

Question

Why does the current implementation resolve ipfs urls instead of using what was fetched from Sourcify?