Skip to content
This repository has been archived by the owner on Nov 13, 2024. It is now read-only.

Commit

Permalink
init JSON structure
Browse files Browse the repository at this point in the history
  • Loading branch information
DenisCarriere committed Oct 12, 2024
1 parent 2c96c2b commit 904a201
Show file tree
Hide file tree
Showing 30 changed files with 55,851 additions and 72 deletions.
64 changes: 64 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,69 @@
# The Graph supported networks

This repository contains a list of networks supported by The Graph. The list is used by The Graph to determine which networks are supported by the service.

Data Structure of the repository:

- `chains/`: Contains the chain definitions.
- `blocks/`: Contains the Block protobuf defintions.
- `icons/`: Contains the icons of the chains.
- `providers/`: Contains the provider definitions for The Graph services (ex: RPC, Firehose, Substreams, ...).

## How to add a new chain?

```json
{
"id": "ethereum",
"name": "Ethereum Mainnet",
"icon": "ethereum",
"block": "ethereum",
"chainId": 1,
"networkId": 1
}
```

## How to add a new provider?

```json
{
"name": "StreamingFast",
"url": "https://www.streamingfast.io",
"rpc": [],
"firehose": [
{
"ethereum": "https://mainnet.eth.streamingfast.io:443"
}
],
"substreams": [
{
"ethereum": "https://mainnet.eth.streamingfast.io:443"
}
]
}
```

## How to add a new block?

```json
{
"type": "sf.solana.type.v1.Block",
"url": "buf.build/streamingfast/firehose-solana"
}
```

## How to add a new icon?

```json
[
{
"url": "ipfs://QmdwQDr6vmBtXmK2TmknkEuZNoaDqTasFdZdu3DRw8b2wt",
"width": 1000,
"height": 1628,
"format": "png"
}
]
```

## References

- [Chain Requirements (Edge & Node)](https://thegraphfoundation.notion.site/Chain-Requirements-Edge-Node-1d7e961a7235459e852a647dcf55c6b9)
Expand Down
28 changes: 0 additions & 28 deletions __tests__/missing-chains.spec.ts

This file was deleted.

7 changes: 7 additions & 0 deletions __tests__/typespec.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { expect, test, it } from "bun:test";

test("typespec chains", async () => {
it("typespec does not match", async () => {
expect(true).toBeTrue();
});
});
4 changes: 4 additions & 0 deletions _data/blocks/antelope.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"type": "sf.antelope.type.v1.Block",
"url": "buf.build/pinax/firehose-antelope"
}
4 changes: 4 additions & 0 deletions _data/blocks/bitcoin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"type": "sf.bitcoin.type.v1.Block",
"url": "buf.build/streamingfast/firehose-bitcoin"
}
4 changes: 4 additions & 0 deletions _data/blocks/cosmos.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"type": "sf.cosmos.type.v2.Block",
"url": "buf.build/streamingfast/firehose-cosmos"
}
4 changes: 4 additions & 0 deletions _data/blocks/ethereum.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"type": "sf.ethereum.type.v2.Block",
"url": "buf.build/streamingfast/firehose-ethereum"
}
4 changes: 4 additions & 0 deletions _data/blocks/solana.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"type": "sf.solana.type.v1.Block",
"url": "buf.build/streamingfast/firehose-solana"
}
Loading

0 comments on commit 904a201

Please sign in to comment.