networklist-org icon indicating copy to clipboard operation
networklist-org copied to clipboard

Contract Source Provider Url

Open trajan0x opened this issue 4 years ago • 1 comments

One thing that would be useful is to have an contractSource defined for fetching contract source. So, for etherscan, we'd define an apiconforming toetherscan_standardwith an api url ofhttps://api.etherscan.io/api?. Or sourcify` with the sourcify standard

Happy to submit a pr if there's interest

trajan0x avatar Sep 07 '21 16:09 trajan0x

Cool idea - I think it needs to start with the data and not with displaying the data so I opened: https://github.com/ethereum-lists/chains/issues/404

That said - it is only needed as a workaround currently. Ideally you do not need to go through any centralized provider - but you:

  • get the contract-bytecode (e.g. via RPC)
  • extract the meta-data hash from the bytecode
  • fetch the sources referenced in metadata

sourcify is helping this process it verifies in a way that the original hashes match

ligi avatar Sep 10 '21 15:09 ligi