antonnell / networklist-org

networklist-org.vercel.app
GNU General Public License v3.0
648 stars 509 forks source link

Use explorer field instead of infoURL #12

Open ligi opened 3 years ago

ligi commented 3 years ago

after https://github.com/ethereum-lists/chains/issues/59 - ethereum-list/chains now supports a explorer field. Currently this repo uses the infoURL for the explorer which causes issues like https://github.com/ethereum-lists/chains/issues/210

antonnell commented 3 years ago

Hey Ligi,

I notice that https://chainid.network/chains.json doesn't have the explorers field. I use that as my source of information, so could that be updated? If not, then I can work something else out.

ligi commented 3 years ago

ah right - it is not exposed there - will install ruby (currently uses jekyll to generate this file) to get this going. Btw.: I think the fallback to infoURL is suboptimal as it can lead to broken URLs. InfoURL might not point to a blockexplorer.

ligi commented 3 years ago

explorers are now exposed in the aggregated chains.json

ligi commented 3 years ago

trying to push this a bit - anything ethereum-lists/chains can do to have this faster? People still using blockExplorers in infoURLs and changing it here would change that I think.

antonnell commented 3 years ago

@ligi Would you prefer that I don't use the infoURL as a fallback for when there are no explorers provided?

antonnell commented 3 years ago

It is now using the first explorer url in the explorers object if it is available. Otherwise, uses infoURL. We can remove the fallback to infoURL when more people have explorers defined. Looks like only 5 chains have it defined so far? https://chainid.network/chains.json

ligi commented 3 years ago

Great news - thanks! Explorer definitions slowly get added - but it's a slow process. Yea we could leave it like this for some period - but at some point I think it would be good to remove that fallback. Maybe a warning can also be a nice forcing function to get more adoption for the explorer definition. Would also help inform users about possible side-effects of this workaround (e.g. URL not being an explorer and so seeing 404s from this)

ilovers commented 3 years ago

It is now using the first explorer url in the explorers object if it is available. Otherwise, uses infoURL. @antonnell I have added explorers field for okexchain a few days ago, but it is still using infoURL as explorer url, when i use chainlist.org to add network to Metamask. Please help me check why, thanks.

ligi commented 3 years ago

chainlist.org does not pull in the data live - but with every release - last release was 8 days ago.

ilovers commented 3 years ago

chainlist.org does not pull in the data live - but with every release - last release was 8 days ago.

got it, thanks.