-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from pinax-network/feature/updated-chain-metadata
2.0.0 RC - Chains Metadata Model Upgrade
- Loading branch information
Showing
293 changed files
with
14,638 additions
and
221 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: 'npm' | ||
directory: '/' | ||
schedule: | ||
interval: 'daily' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
npm run generate | ||
git add data.json | ||
bun run generate | ||
npm run generate_v1 | ||
git add . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,53 @@ | ||
# Pinax Chains | ||
|
||
This repository is the single-source-of-truth for the metadata of chains supported by Pinax. To make it more accessible, we've published it as a private npm package ([See below](#install_from_npm)) and created a public endpoint to fetch publicly available chains metadata ([See below](#public_endpoint)). | ||
Welcome to the Pinax Chains repository. This is the definitive source for the metadata of chains supported by Pinax **_products_**. Note that we maintain a separate, private list for internal operations. | ||
|
||
You can have a look at the [Chain Type](/types/chain.types.ts) and at our [list of supported, to-be-supported, or once-supported chains](/data/chains). | ||
To enhance accessibility, we offer the metadata as an [npm package](#install_from_npm) and provide a [public API endpoint](#public_endpoint) for fetching the data. | ||
|
||
**Note**: Some chains may be listed but won't have any service supported or may have been deprecated, see each chain's metadata to ensure the chain is truly supported. | ||
You can view details about the [Chain Type](/types/chain.types.ts) and explore our [list of supported, to-be-supported, or deprecated chains](/types/pinax.types.ts). | ||
|
||
## Install from npm | ||
> **Note**: Some chains may be listed without supported services or may have been deprecated. Always check the chain's metadata to confirm its current support status. | ||
```bash | ||
npm install @pinax/chains | ||
``` | ||
## What's New | ||
|
||
## Public Endpoint | ||
With the 2.0 release, we’ve made significant improvements to enhance developer and maintainer experience. Key updates include: | ||
|
||
You can fetch the publicly available chains metadata from the following endpoint: | ||
|
||
```bash | ||
curl https://pinax.network/api/chains | ||
``` | ||
|
||
## Contributing | ||
- ✅ Support for EVM chains | ||
- ✅ Reintroduced TypeScript support | ||
- ✅ Improved management of chain indexes (priority order) | ||
- ✅ Consolidated chain utilities and service configurations across projects | ||
- ✅ Automated checks for missing chain icons | ||
- ✅ Simplified data model reflecting better relationships between chains, services, and networks | ||
- ✅ Inclusion of beta chains | ||
- ✅ Support for `unreleased` and `beta` services | ||
- ✅ Eliminated redundant flags and information | ||
- ✅ Integrated chains website into metadata | ||
- And more... | ||
|
||
If you want to contribute to the metadata of chains, please open a PR with the changes you want to make. We'll review it and merge it if it's correct. | ||
## Installation | ||
|
||
### Adding a new chain | ||
You first need to install [bun](https://bun.sh/). | ||
|
||
Adding a new chain is as simple as adding a new file to the `data/chains` directory. The file should be named after the chain's official Pinax ID and should contain the metadata of the chain. Also make sure to run the `npm run generate:type_pinaxid` and `npm run generate:data_json` commands to update the related types and index. | ||
### From npm | ||
|
||
If you're unsure about the fields you need to fill, you can have a look at the [Chain Type](/types/chain.types.ts) to learn more about the fields you need to fill. | ||
To install the package, run: | ||
|
||
### Updating an existing chain | ||
|
||
To update an existing chain, you can simply open a PR with the changes you want to make to the chain's metadata. | ||
```bash | ||
npm install @pinax/chains | ||
``` | ||
|
||
### Adding / Validating Graph IDs | ||
### Public Endpoint | ||
|
||
We use the `graph_id` field to match our chains to The Graph's. You can check the available graph IDs in the [Graphs](/types/graph.types.ts) file, which is [generated automatically](/scripts/generate/graphid_type.js) by fetching supported chains from The Graph's API. You can run `npm run generate:type_graphid` to update the graph IDs. | ||
Access the chains metadata via the public API endpoint: | ||
|
||
### Updating the Chain Type | ||
```bash | ||
curl https://pinax.network/api/chains | ||
``` | ||
|
||
If you want to add a new field to the chain type, you can simply open a PR with the changes you want to make to the chain type and make sure every chain's metadata is updated to include the new field if required. | ||
### How to use | ||
|
||
Removing a field from the chain type is not recommended, as it may break the metadata of the chains. If you want to remove a field, please open an issue to discuss it first. | ||
Please see [How to use](/docs/how_to_use.md) documentation for more information. | ||
|
||
### Removing a chain | ||
## Contributing | ||
|
||
If a chain is no longer supported, simply set the `deprecated_at` field as the date of the deprecation. This allows the different services to know when to stop supporting the chain, and enables us to keep track of the chains we've supported in the past for proper redirects and such. | ||
If you wish to contribute to the chain metadata, please open a pull request (PR) with your proposed changes. We will review and merge it if accurate. Be sure to consult the [documentation](/docs) before contributing. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.