antonnell / networklist-org

Home Page:networklist-org.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Contract Source Provider Url

trajan0x opened this issue · 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

commented

Cool idea - I think it needs to start with the data and not with displaying the data so I opened: ethereum-lists/chains#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