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

Use explorer field instead of infoURL

Open ligi opened this issue 3 years ago • 10 comments

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

ligi avatar Apr 12 '21 07:04 ligi

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.

antonnell avatar Apr 12 '21 08:04 antonnell

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 avatar Apr 12 '21 08:04 ligi

explorers are now exposed in the aggregated chains.json

ligi avatar Apr 12 '21 08:04 ligi

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 avatar Apr 30 '21 08:04 ligi

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

antonnell avatar May 06 '21 08:05 antonnell

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

antonnell avatar May 06 '21 08:05 antonnell

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)

ligi avatar May 11 '21 14:05 ligi

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.

ilovers avatar May 14 '21 04:05 ilovers

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

ligi avatar May 14 '21 04:05 ligi

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

got it, thanks.

ilovers avatar May 14 '21 06:05 ilovers