Open-source database
Chain.Love collects all the info in the open-source database. Here is how it works.
Database structure
Database source is the main branch containing CSV files. For users' convenience, an automated script translates these files into JSON format on every push and updates json branch. Here is how main branch is structured:
providers folder contains a list of providers and their offers that exist on several chains. That helps keeping the database size small, readable and syncrhonized across chains, as including provider into the networks folder only requires utilizing the reference syntax, not recreating the entity.
Examples
For this example, let's assume we want to add a Glif wallet to Chain.Love database. Glif wallet only exists on Filecoin chain. Thus, the entity we create will be located in the following file in the main branch:
We need to populate all the columns according to the specification, so the line with Glif wallet will look in the following way:
For this example, let's assume we want to add a Metamask wallet to Chain.Love database. Metamask wallet virtually exists on every EVM-compatible chain. Thus, the entity we create will be located in the following file in the main branch:
The record there will look the following way:
Then, we refer the Metamask in every network that is EVM-compatible:
The record in each of these wallet.csv will look the following way:
Please note, that CSV structure of the file have to be maintained, so despite the fact we don't need to populate any of the columns besides slug and provider - we still need to add commas for every existing column. To learn more about the provider references, please read our GitHub Database Wiki.
For this example, let's assume we want to add Infura provider in the rpc category. Infura provides different offers depending on whether node you want to request needs to be archival or not, on which chain you are requesting services, and whether you are fitting into the certain limits or not. Also, Infura is multi-chain.
For that, let's create the following entities in the providers folder:
As one can see, there are two entities (full-archive and recent-state) for each of the 3 plans (free, pay-as-you-go, enterprise provided by Infura. In the json files as well as in the Toolbox UI these entities will be rendered later as a single group, simplifying usage.
Then, each of these plans exist on both one and sepolia chains of the Arbitrum ecosystem. Thus, the following lines needs to be added to the networks/arbitrum/rpc.csv file:
Slug needs to be unique per ecosystem, so we add either one or sepolia to the respective line to ensure it stays unique. Also, we populate the chain and provider columns to make records distinct for any automated system (such as Toolbox) trying to read it.
Slug is then used to optimize search for the inserted entities to other Web3 developers, so when adding an entry, please think about how would you search for this entity in the search engines.
How to Contribute
Adding/modifying/removing data
Fork & branch: Fork the repo and create a descriptive branch (e.g.
add-ankr-provider).Choose what to edit: Pick the right CSV (e.g.
rpc.csvin the correct network).Follow the rules: Check the Style Guide and Column Definitions for formatting and examples, then edit your entry.
Validate & commit: Make sure the CSV is correct, then commit and push.
Open a PR: Describe your changes, link related issues, optionally - provide an address for rewards. Maintainers will review and merge.
Database improvement proposals (DBIPs)
The database structure is not set in stone. As Web3 itself is a bleeding edge technology, Chain.Love's team feels like there should be a mechanism in place to evolve the database within time. Database improvement proposals are essentially the GitHub issues that drive changes in the structure of the database. Using them, one may:
Add/remove categories
Add/remove column(s)
Change column(s)
We believe, that path to success is through many developers contributing to the ecosystem and improving it for everybody, exactly the way Web3 was initially designed. For that, the DBIPs are a subject of compensations according to the Rewards program rules. Take a look, find a way to improve our database, contribute to the common good and get rewarded!
Last updated