Skip to content

Conversation

@0xsign
Copy link
Contributor

@0xsign 0xsign commented Feb 1, 2023

Add endpoint to return Chain RPC data by slug or chain id.

This allows users to dynamically pull and use the list of public RPC for a specific chain.

I wanted to update pages/chain/[chain].js but we can't return a JSON page from getStaticProps. We could also simply upload the json file in /public but we'd need a cron to update them on a regular basis so that's why I added this endpoint.

Note: we'll need to enable CORS access if we want people to access this API endpoint from the outside.

ex:

GET https://chainid.network/api/chain/1
GET https://chainid.network/api/chain/eth

@0xsign 0xsign requested a review from realdealshaman February 1, 2023 14:00
@vercel
Copy link

vercel bot commented Feb 1, 2023

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

Name Status Preview Comments Updated
chainlist ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Feb 1, 2023 at 2:02PM (UTC)

@cloudflare-workers-and-pages
Copy link

Deploying chainlist with  Cloudflare Pages  Cloudflare Pages

Latest commit: cbd963c
Status:⚡️  Build in progress...

View logs

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