Skip to content

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.

@vercel
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

@mds1
Copy link
Owner

mds1 commented Dec 4, 2024

Closed by #95

@mds1 mds1 closed this Dec 4, 2024
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