Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add routescan explorers #78

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

IperGiove
Copy link

@IperGiove IperGiove commented Jul 3, 2024

This PR is promoted by Routescan with the aim of improving the quality of the data as much as possible in an open-source manner.

The PR just adds the links to Routescan's explorer in the json chains data.

Copy link

vercel bot commented Jul 3, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
evm-diff ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 3, 2024 9:46pm

@mds1
Copy link
Owner

mds1 commented Jul 4, 2024

The modified files are autogenerated, so this will be overwritten the next time data is updated.

Instead, we’ll want to modify script/data/input.json to add these additional explorers as inputs, and modify the getMetadata method to include them in the output data

@IperGiove
Copy link
Author

The modified files are autogenerated, so this will be overwritten the next time data is updated.

Instead, we’ll want to modify script/data/input.json to add these additional explorers as inputs, and modify the getMetadata method to include them in the output data

I know you are using this repo for the api here`:

async function getMetadata(chainId: number): Promise<Metadata> {
	const response = await fetch('https://chainid.network/chains.json');
	const data = await response.json();
	const metadata = data.find((chain: Metadata) => chain.chainId === chainId);
	if (!metadata) throw new Error(`Chain with ID ${chainId} not found.`);
	return metadata;
}

And that repo gets the data from this one.
For that reason yesterday I made a PR to update the data here: ethereum-lists/chains#5428.

However, do you mean you want to transform the script/data/feature/metadata.json into something like script/data/input.json? is that correct?

@mds1
Copy link
Owner

mds1 commented Jul 4, 2024

Ah that’s perfect, adding it upstream is preferable. Let’s give the https://github.com/ethereum-lists/chains repo some time to merge that, in which case we can close this and have it included automatically

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants