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 to
etherscan_standardwith an api url of
https://api.etherscan.io/api?`. Or sourcify
with the sourcify standard
Happy to submit a pr if there's interest
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