Skip to content

Commit

Permalink
chore: Deploy subgraph V1
Browse files Browse the repository at this point in the history
  • Loading branch information
alainncls committed May 30, 2024
1 parent f2996a8 commit 6dc6833
Show file tree
Hide file tree
Showing 29 changed files with 1,210 additions and 165 deletions.
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,13 +220,14 @@ Here are the addresses on those networks:
## Subgraphs URLs

- [Linea Goerli (Deprecated)](https://api.goldsky.com/api/public/project_clqghnrbp9nx201wtgylv8748/subgraphs/verax/subgraph-testnet/gn)
- [Linea Sepolia](https://api.studio.thegraph.com/query/67521/verax-v1-linea-sepolia/v0.0.1)
- [Linea Sepolia](https://api.studio.thegraph.com/query/67521/verax-v1-linea-sepolia/v0.0.12)
- [Linea Mainnet](https://graph-query.linea.build/subgraphs/name/Consensys/linea-attestation-registry/graphql)
- [Arbitrum Sepolia](https://api.studio.thegraph.com/query/67946/verax-arbitrum-sepolia/v0.0.2)
- [Arbitrum Mainnet](https://api.thegraph.com/subgraphs/name/cliqueofficial/verax-arbitrum)
- [Arbitrum Nova](https://api.goldsky.com/api/public/project_clr9aj9alwgwg01q7ci1rh781/subgraphs/verax-arbitrum-nova/0.0.5/gn)
- [Base Sepolia](https://api.studio.thegraph.com/query/67521/verax-v1-base-sepolia/v0.0.1)
- [Base Mainnet](https://api.studio.thegraph.com/query/67521/verax-v1-base/v0.0.1)
- [Linea Mainnet (Backup)](https://api.studio.thegraph.com/query/67521/verax-v1-linea/v0.0.1)
- [Arbitrum Sepolia](https://api.studio.thegraph.com/query/67521/verax-v1-arbitrum-sepolia/v0.0.2)
- [Arbitrum Mainnet](https://api.studio.thegraph.com/query/67521/verax-v1-arbitrum/v0.0.1)
- [Arbitrum Nova](https://api.goldsky.com/api/public/project_clwsa54350ydv01wjbq5r17v1/subgraphs/verax-v1-arbitrum-nova/0.0.4/gn)
- [Base Sepolia](https://api.studio.thegraph.com/query/67521/verax-v1-base-sepolia/v0.0.2)
- [Base Mainnet](https://api.studio.thegraph.com/query/67521/verax-v1-base/v0.0.2)

## Network Prefixes

Expand Down
22 changes: 13 additions & 9 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@verax-attestation-registry/verax-sdk",
"version": "1.7.2",
"version": "1.8.1",
"description": "Verax Attestation Registry SDK to interact with the subgraph and the contracts",
"keywords": [
"linea-attestation-registry",
Expand Down
39 changes: 12 additions & 27 deletions sdk/src/VeraxSdk.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import {
arbitrum,
arbitrumGoerli,
arbitrumNova,
arbitrumSepolia,
base,
Expand All @@ -27,6 +26,7 @@ export class VeraxSdk {
chain: linea,
mode: SDKMode.BACKEND,
subgraphUrl: "https://graph-query.linea.build/subgraphs/name/Consensys/linea-attestation-registry",
// Backup URL: subgraphUrl: "https://api.studio.thegraph.com/query/67521/verax-v1-linea/v0.0.1",
portalRegistryAddress: "0xd5d61e4ECDf6d46A63BfdC262af92544DFc19083",
moduleRegistryAddress: "0xf851513A732996F22542226341748f3C9978438f",
schemaRegistryAddress: "0x0f95dCec4c7a93F2637eb13b655F2223ea036B59",
Expand All @@ -49,11 +49,16 @@ export class VeraxSdk {
attestationRegistryAddress: "0xC765F28096F6121C2F2b82D35A4346280164428b",
};

static DEFAULT_LINEA_TESTNET_FRONTEND: Conf = {
...VeraxSdk.DEFAULT_LINEA_TESTNET,
mode: SDKMode.FRONTEND,
};

static DEFAULT_ARBITRUM_NOVA: Conf = {
chain: arbitrumNova,
mode: SDKMode.BACKEND,
subgraphUrl:
"https://api.goldsky.com/api/public/project_clr9aj9alwgwg01q7ci1rh781/subgraphs/verax-arbitrum-nova/0.0.5/gn",
"https://api.goldsky.com/api/public/project_clwsa54350ydv01wjbq5r17v1/subgraphs/verax-v1-arbitrum-nova/0.0.4/gn",
portalRegistryAddress: "0xADc8da3d3388dEe74C7134fC4AEe1cF866Da5d38",
moduleRegistryAddress: "0x46F7471cd2C1d69Cb5e62c1a34F3fCAf81304Fc3",
schemaRegistryAddress: "0x9b5BABcEbf0E8550da1eCDe5674783179B6557FB",
Expand All @@ -65,15 +70,10 @@ export class VeraxSdk {
mode: SDKMode.FRONTEND,
};

static DEFAULT_LINEA_TESTNET_FRONTEND: Conf = {
...VeraxSdk.DEFAULT_LINEA_TESTNET,
mode: SDKMode.FRONTEND,
};

static DEFAULT_LINEA_SEPOLIA: Conf = {
chain: lineaSepolia,
mode: SDKMode.BACKEND,
subgraphUrl: "https://api.studio.thegraph.com/query/67521/verax-v1-linea-sepolia/v0.0.2",
subgraphUrl: "https://api.studio.thegraph.com/query/67521/verax-v1-linea-sepolia/v0.0.12",
portalRegistryAddress: "0xF35fe79104e157703dbCC3Baa72a81A99591744D",
moduleRegistryAddress: "0x3C443B9f0c8ed3A3270De7A4815487BA3223C2Fa",
schemaRegistryAddress: "0x90b8542d7288a83EC887229A7C727989C3b56209",
Expand All @@ -85,25 +85,10 @@ export class VeraxSdk {
mode: SDKMode.FRONTEND,
};

static DEFAULT_ARBITRUM_TESTNET: Conf = {
chain: arbitrumGoerli,
mode: SDKMode.BACKEND,
subgraphUrl: "https://api.thegraph.com/subgraphs/name/cliqueofficial/verax-arbitrum-goerli",
portalRegistryAddress: "0x7d6a914C1e33C141CB4a5e0095c1075E5649aFB2",
moduleRegistryAddress: "0x58EE79284bE65b217Db408A0991314f9Ae84348A",
schemaRegistryAddress: "0x129043e80e0B4C7da61a622df0912c31D3414AA7",
attestationRegistryAddress: "0xCD839595FdA5A8111d5E03D42d9D9af60ee67B66",
};

static DEFAULT_ARBITRUM_TESTNET_FRONTEND: Conf = {
...VeraxSdk.DEFAULT_ARBITRUM_TESTNET,
mode: SDKMode.FRONTEND,
};

static DEFAULT_ARBITRUM_SEPOLIA: Conf = {
chain: arbitrumSepolia,
mode: SDKMode.BACKEND,
subgraphUrl: "https://api.studio.thegraph.com/query/67946/verax-arbitrum-sepolia/v0.0.2",
subgraphUrl: "https://api.studio.thegraph.com/query/67521/verax-v1-arbitrum-sepolia/v0.0.2",
portalRegistryAddress: "0x1ceb52584B6C45C7049dc7fDC476bC138E4beaDE",
moduleRegistryAddress: "0xEC572277d4E87a64DcfA774ED219Dd4E69E4BDc6",
schemaRegistryAddress: "0x025531b655D9EE335B8E6cc4C118b313f26ACc8F",
Expand All @@ -118,7 +103,7 @@ export class VeraxSdk {
static DEFAULT_ARBITRUM: Conf = {
chain: arbitrum,
mode: SDKMode.BACKEND,
subgraphUrl: "https://api.thegraph.com/subgraphs/name/cliqueofficial/verax-arbitrum",
subgraphUrl: "https://api.studio.thegraph.com/query/67521/verax-v1-arbitrum/v0.0.1",
portalRegistryAddress: "0x4042D0A54f997EE3a1b0F51e4813654199BFd8bD",
moduleRegistryAddress: "0x3acF4daAB6cbc01546Dd4a96c9665B398d48A4ba",
schemaRegistryAddress: "0xE96072F46EA0e42e538762dDc0aFa4ED8AE6Ec27",
Expand All @@ -133,7 +118,7 @@ export class VeraxSdk {
static DEFAULT_BASE_SEPOLIA: Conf = {
chain: baseSepolia,
mode: SDKMode.BACKEND,
subgraphUrl: "https://api.studio.thegraph.com/query/67521/verax-v1-base-sepolia/v0.0.1",
subgraphUrl: "https://api.studio.thegraph.com/query/67521/verax-v1-base-sepolia/v0.0.2",
portalRegistryAddress: "0x025531b655D9EE335B8E6cc4C118b313f26ACc8F",
moduleRegistryAddress: "0xEC572277d4E87a64DcfA774ED219Dd4E69E4BDc6",
schemaRegistryAddress: "0x66D2F3DCc970343b83a6263E20832184fa71CFe7",
Expand All @@ -148,7 +133,7 @@ export class VeraxSdk {
static DEFAULT_BASE: Conf = {
chain: base,
mode: SDKMode.BACKEND,
subgraphUrl: "https://api.studio.thegraph.com/query/67521/verax-v1-base/v0.0.1",
subgraphUrl: "https://api.studio.thegraph.com/query/67521/verax-v1-base/v0.0.2",
portalRegistryAddress: "0xcbf28432C25B400E645F0EaC05F8954e8EE7c0d6",
moduleRegistryAddress: "0xAd0C12db58098A6665CBEf48f60eB67d81d1F1ff",
schemaRegistryAddress: "0x8081dCd745f160c148Eb5be510F78628A0951c31",
Expand Down
18 changes: 0 additions & 18 deletions subgraph/.env.example

This file was deleted.

22 changes: 6 additions & 16 deletions subgraph/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,30 +14,20 @@ You can replace `XXX` by the name of the networks you want to work on in the com
- `linea-goerli`
- `linea-mainnet`

### 1. Add secrets

1. Copy the .env.example file to a .env file
2. Fill `DEPLOY_ENDPOINT_XXX` with the endpoint(s) dedicated to network(s) you want to work on
3. Fill `IPFS_ENDPOINT` with your IPFS endpoint (you can get one for free via Infura)
4. Fill `IPFS_IDENTIFIERS` with your IPFS identifiers (you can get them for free via Infura)
5. Fill `SUBGRAPH_NAME_XXX` with the name you want to give to the subgraph

Note: You need to encode your identifier and secret key to Base64, following this format: `IDENTIFIER:SECRET`.

### 2. Create the subgraph
### 1. Generate code

```bash
pnpm run create:XXX
pnpm run codegen:vY
```

### 3. Build the subgraph
### 2. Build the subgraph

```bash
pnpm run build:XXX
pnpm run build:XXX:vY
```

### 4. Deploy the subgraph
### 3. Deploy the subgraph

```bash
pnpm run deploy:XXX
pnpm run deploy:XXX:vY
```
Loading

0 comments on commit 6dc6833

Please sign in to comment.