Closed yann300 closed 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/
The server returns both files
. This is the pseudocode of how the files
are processed in the plugin:
files
, locate metadata
and other sources
(code)sources
property of metadata
(code)
source
, search through its urls
url
addressing ipfs, resolve it and store the fileSourcify 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
.
Why does the current implementation resolve ipfs urls instead of using what was fetched from Sourcify?
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?