antonnell / networklist-org

Home Page:networklist-org.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Use explorer field instead of infoURL

ligi opened this issue · comments

commented

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

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.

commented

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.

commented

explorers are now exposed in the aggregated chains.json

commented

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.

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

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

commented

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)

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.

commented

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

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

got it, thanks.