diff --git a/.github/workflows/subgraph.yml b/.github/workflows/subgraph.yml index b10c5b8b..a4777d62 100644 --- a/.github/workflows/subgraph.yml +++ b/.github/workflows/subgraph.yml @@ -52,8 +52,11 @@ jobs: - name: Install dependencies run: pnpm install --frozen-lockfile - - name: Build the subgraph - run: pnpm run build:linea-goerli + - name: Build the subgraph V1 + run: pnpm run build:linea-sepolia:v1 + + - name: Build the subgraph V2 + run: pnpm run build:linea-sepolia:v2 - name: Run the unit tests run: pnpm run test diff --git a/README.md b/README.md index 549b5398..f54674e2 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index da8cc3e6..19b33ea4 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -554,8 +554,8 @@ importers: subgraph: devDependencies: '@graphprotocol/graph-cli': - specifier: 0.71.0 - version: 0.71.0(@types/node@20.12.12)(node-fetch@2.7.0)(typescript@4.9.5) + specifier: 0.73.0 + version: 0.73.0(@types/node@20.12.12)(node-fetch@2.7.0)(typescript@4.9.5) '@graphprotocol/graph-ts': specifier: 0.31.0 version: 0.31.0 @@ -3199,8 +3199,8 @@ packages: tslib: 2.6.2 dev: false - /@graphprotocol/graph-cli@0.71.0(@types/node@20.12.12)(node-fetch@2.7.0)(typescript@4.9.5): - resolution: {integrity: sha512-ITcSBHuXPuaoRs7FzNtqD0tCOIy4JGsM3j4IQNA2yZgXgr/TmmHG7KTB/c3B5Zlnsr9foXrU71T6ixGmwJ4PKw==} + /@graphprotocol/graph-cli@0.73.0(@types/node@20.12.12)(node-fetch@2.7.0)(typescript@4.9.5): + resolution: {integrity: sha512-g+EapDRvxhRjMccnUJE8gBRGDIF6mXqtv8g0tzzixVClw/BezBni8QXtXMHs4Gg0G2UnerJJLp5ZQgZqtHWnmg==} engines: {node: '>=18'} hasBin: true dependencies: @@ -3224,6 +3224,7 @@ packages: ipfs-http-client: 55.0.0(node-fetch@2.7.0) jayson: 4.0.0 js-yaml: 3.14.1 + open: 8.4.2 prettier: 3.0.3 semver: 7.6.2 sync-request: 6.1.0 @@ -3895,7 +3896,7 @@ packages: tslib: ^2.4.0 dependencies: '@graphql-mesh/store': 0.98.4(@graphql-mesh/cross-helpers@0.4.2)(@graphql-mesh/types@0.98.4)(@graphql-mesh/utils@0.98.4)(@graphql-tools/utils@10.2.0)(graphql@16.8.1)(tslib@2.6.2) - '@graphql-mesh/types': 0.98.4(@graphql-mesh/store@0.95.8)(@graphql-tools/utils@10.2.0)(graphql@16.8.1)(tslib@2.6.2) + '@graphql-mesh/types': 0.98.4(@graphql-mesh/store@0.98.4)(@graphql-tools/utils@10.2.0)(graphql@16.8.1)(tslib@2.6.2) '@graphql-mesh/utils': 0.98.4(@graphql-mesh/cross-helpers@0.4.2)(@graphql-mesh/types@0.98.4)(@graphql-tools/utils@10.2.0)(graphql@16.8.1)(tslib@2.6.2) '@graphql-tools/delegate': 10.0.10(graphql@16.8.1) '@graphql-tools/schema': 10.0.3(graphql@16.8.1) @@ -9021,7 +9022,7 @@ packages: /@types/concat-stream@1.6.1: resolution: {integrity: sha512-eHE4cQPoj6ngxBZMvVf6Hw7Mh4jMW4U9lpGmS5GBPB9RYxlFg+CHaVN7ErNY4W9XfLIEn20b4VDYaIrbq0q4uA==} dependencies: - '@types/node': 8.10.66 + '@types/node': 20.12.12 dev: true /@types/configstore@2.1.1: @@ -9031,7 +9032,7 @@ packages: /@types/connect@3.4.38: resolution: {integrity: sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==} dependencies: - '@types/node': 12.20.55 + '@types/node': 20.12.12 dev: true /@types/cookie@0.4.1: @@ -9085,7 +9086,7 @@ packages: /@types/form-data@0.0.33: resolution: {integrity: sha512-8BSvG1kGm83cyJITQMZSulnl6QV8jqAGreJsc5tPu1Jq0vTSOiY/k24Wx82JRpWwZSqrala6sd5rWi6aNXvqcw==} dependencies: - '@types/node': 8.10.66 + '@types/node': 20.12.12 dev: true /@types/get-port@3.2.0: @@ -9359,7 +9360,7 @@ packages: /@types/ws@7.4.7: resolution: {integrity: sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==} dependencies: - '@types/node': 12.20.55 + '@types/node': 20.12.12 dev: true /@types/ws@8.5.10: @@ -17566,6 +17567,7 @@ packages: /glob@5.0.15: resolution: {integrity: sha512-c9IPMazfRITpmAAKi22dK1VKxGDX9ehhqfABDriL/lzO92xcUKEJPQHrVA/2YHSNFB4iFlykVmWvwo48nr3OxA==} + deprecated: Glob versions prior to v9 are no longer supported dependencies: inflight: 1.0.6 inherits: 2.0.4 @@ -17576,6 +17578,7 @@ packages: /glob@7.1.7: resolution: {integrity: sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==} + deprecated: Glob versions prior to v9 are no longer supported dependencies: fs.realpath: 1.0.0 inflight: 1.0.6 @@ -18376,6 +18379,7 @@ packages: /iconv-lite@0.6.3: resolution: {integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==} engines: {node: '>=0.10.0'} + requiresBuild: true dependencies: safer-buffer: 2.1.2 diff --git a/sdk/package.json b/sdk/package.json index 476a7da2..c01d95fd 100644 --- a/sdk/package.json +++ b/sdk/package.json @@ -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", diff --git a/sdk/src/VeraxSdk.ts b/sdk/src/VeraxSdk.ts index c7ed9974..4e36a2eb 100644 --- a/sdk/src/VeraxSdk.ts +++ b/sdk/src/VeraxSdk.ts @@ -1,6 +1,5 @@ import { arbitrum, - arbitrumGoerli, arbitrumNova, arbitrumSepolia, base, @@ -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", @@ -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", @@ -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", @@ -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", @@ -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", @@ -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", @@ -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", diff --git a/subgraph/.env.example b/subgraph/.env.example deleted file mode 100644 index e893d202..00000000 --- a/subgraph/.env.example +++ /dev/null @@ -1,18 +0,0 @@ -DEPLOY_ENDPOINT_ARBITRUM_GOERLI= -DEPLOY_ENDPOINT_ARBITRUM_MAINNET= -DEPLOY_ENDPOINT_ARBITRUM_NOVA= -DEPLOY_ENDPOINT_ARBITRUM_SEPOLIA= -DEPLOY_ENDPOINT_LINEA_GOERLI= -DEPLOY_ENDPOINT_LINEA_SEPOLIA= -DEPLOY_ENDPOINT_LINEA_MAINNET= - -IPFS_ENDPOINT= -IPFS_IDENTIFIERS= - -SUBGRAPH_NAME_ARBITRUM_GOERLI= -SUBGRAPH_NAME_ARBITRUM_MAINNET= -SUBGRAPH_NAME_ARBITRUM_NOVA= -SUBGRAPH_NAME_ARBITRUM_SEPOLIA= -SUBGRAPH_NAME_LINEA_GOERLI= -SUBGRAPH_NAME_LINEA_SEPOLIA= -SUBGRAPH_NAME_LINEA_MAINNET= diff --git a/subgraph/README.md b/subgraph/README.md index 7bfd5135..a92fb1e8 100644 --- a/subgraph/README.md +++ b/subgraph/README.md @@ -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 ``` diff --git a/subgraph/package.json b/subgraph/package.json index 304dd86e..69747e01 100644 --- a/subgraph/package.json +++ b/subgraph/package.json @@ -15,47 +15,42 @@ "license": "MIT", "author": "Consensys", "scripts": { - "build:linea-mainnet": "cp subgraph.linea-mainnet.yaml subgraph.yaml && pnpm run codegen:linea-mainnet && graph build --network linea", - "build:linea-goerli": "cp subgraph.linea-goerli.yaml subgraph.yaml && pnpm run codegen:linea-goerli && graph build --network linea-goerli", - "build:linea-sepolia": "cp subgraph.linea-sepolia.yaml subgraph.yaml && pnpm run codegen:linea-sepolia && graph build --network linea-sepolia", - "build:base-sepolia": "cp subgraph.base-sepolia.yaml subgraph.yaml && pnpm run codegen:base-sepolia && graph build --network base-sepolia", - "build:base": "cp subgraph.base.yaml subgraph.yaml && pnpm run codegen:base && graph build --network base", - "build:arbitrum-goerli": "cp subgraph.arbitrum-goerli.yaml subgraph.yaml && pnpm run codegen:arbitrum-goerli && graph build --network arbitrum-goerli", - "build:arbitrum-sepolia": "cp subgraph.arbitrum-sepolia.yaml subgraph.yaml && pnpm run codegen:arbitrum-sepolia && graph build --network arbitrum-sepolia", - "build:arbitrum-mainnet": "cp subgraph.arbitrum-mainnet.yaml subgraph.yaml && pnpm run codegen:arbitrum-mainnet && graph build --network arbitrum-mainnet", - "build:arbitrum-nova": "cp subgraph.arbitrum-nova.yaml subgraph.yaml && pnpm run codegen:arbitrum-nova && graph build --network arbitrum-nova", - "codegen:linea-mainnet": "cp subgraph.linea-mainnet.yaml subgraph.yaml && graph codegen", - "codegen:linea-goerli": "cp subgraph.linea-goerli.yaml subgraph.yaml && graph codegen", - "codegen:linea-sepolia": "cp subgraph.linea-sepolia.yaml subgraph.yaml && graph codegen", - "codegen:base-sepolia": "cp subgraph.base-sepolia.yaml subgraph.yaml && graph codegen", - "codegen:base": "cp subgraph.base.yaml subgraph.yaml && graph codegen", - "codegen:arbitrum-goerli": "cp subgraph.arbitrum-goerli.yaml subgraph.yaml && graph codegen", - "codegen:arbitrum-sepolia": "cp subgraph.arbitrum-sepolia.yaml subgraph.yaml && graph codegen", - "codegen:arbitrum-mainnet": "cp subgraph.arbitrum-mainnet.yaml subgraph.yaml && graph codegen", - "codegen:arbitrum-nova": "cp subgraph.arbitrum-nova.yaml subgraph.yaml && graph codegen", - "create:linea-mainnet": "source .env && graph create --node $DEPLOY_ENDPOINT_LINEA_MAINNET $SUBGRAPH_NAME_LINEA_MAINNET", - "create:linea-goerli": "source .env && graph create --node $DEPLOY_ENDPOINT_LINEA_GOERLI $SUBGRAPH_NAME_LINEA_GOERLI", - "create:linea-sepolia": "source .env && graph create --node $DEPLOY_ENDPOINT_LINEA_SEPOLIA $SUBGRAPH_NAME_LINEA_SEPOLIA", - "create:base-sepolia": "source .env && graph create --node $DEPLOY_ENDPOINT_BASE_SEPOLIA $SUBGRAPH_NAME_BASE_SEPOLIA", - "create:base": "source .env && graph create --node $DEPLOY_ENDPOINT_BASE $SUBGRAPH_NAME_BASE", - "create:arbitrum-goerli": "source .env && graph create --node $DEPLOY_ENDPOINT_ARBITRUM_GOERLI Consensys/verax-arbitrum-goerli", - "create:arbitrum-sepolia": "source .env && graph create --node $DEPLOY_ENDPOINT_ARBITRUM_SEPOLIA $SUBGRAPH_NAME_ARBITRUM_SEPOLIA", - "create:arbitrum-one": "source .env && graph create --node $DEPLOY_ENDPOINT_ARBITRUM_GOERLI Consensys/verax-arbitrum", - "deploy:linea-mainnet": "source .env && cp subgraph.linea-mainnet.yaml subgraph.yaml && graph deploy --studio $SUBGRAPH_NAME_LINEA_MAINNET", - "deploy:linea-goerli": "source .env && cp subgraph.linea-goerli.yaml subgraph.yaml && graph deploy --studio $SUBGRAPH_NAME_LINEA_GOERLI", - "deploy:linea-sepolia": "source .env && cp subgraph.linea-sepolia.yaml subgraph.yaml && graph deploy --studio $SUBGRAPH_NAME_LINEA_SEPOLIA", - "deploy:base-sepolia": "source .env && cp subgraph.base-sepolia.yaml subgraph.yaml && graph deploy --studio $SUBGRAPH_NAME_BASE_SEPOLIA", - "deploy:base": "source .env && cp subgraph.base.yaml subgraph.yaml && graph deploy --studio $SUBGRAPH_NAME_BASE", - "deploy:arbitrum-goerli": "source .env && cp subgraph.arbitrum-goerli.yaml subgraph.yaml && graph deploy --network arbitrum-goerli --node $DEPLOY_ENDPOINT_ARBITRUM_GOERLI --headers \"{\\\"Authorization\\\": \\\"Basic $IPFS_IDENTIFIERS\\\"}\" --ipfs $IPFS_ENDPOINT --version-label v0.0.5 Consensys/verax-arbitrum-goerli", - "deploy:arbitrum-sepolia": "source .env && cp subgraph.arbitrum-sepolia.yaml subgraph.yaml && pnpm run build:arbitrum-sepolia && graph deploy --studio $SUBGRAPH_NAME_ARBITRUM_SEPOLIA", - "deploy:arbitrum-mainnet": "source .env && cp subgraph.arbitrum-mainnet.yaml subgraph.yaml && pnpm run build:arbitrum-mainnet && graph deploy --network arbitrum-mainnet --node $DEPLOY_ENDPOINT_ARBITRUM_MAINNET --headers \"{\\\"Authorization\\\": \\\"Basic $IPFS_IDENTIFIERS\\\"}\" --ipfs $IPFS_ENDPOINT --version-label v0.0.5 Consensys/verax-arbitrum", - "deploy:arbitrum-nova": "source .env && cp subgraph.arbitrum-nova.yaml subgraph.yaml && pnpm run build:arbitrum-nova && goldsky subgraph deploy 'verax-arbitrum-nova/0.0.5'", - "test": "pnpm run codegen:linea-goerli && graph test", + "build:arbitrum-nova:v1": "pnpm run codegen:v1 && graph build subgraph-v1.arbitrum-nova.yaml", + "build:arbitrum-nova:v2": "pnpm run codegen:v2 && graph build subgraph.arbitrum-nova.yaml", + "build:arbitrum-one:v1": "pnpm run codegen:v1 && graph build subgraph-v1.arbitrum-one.yaml", + "build:arbitrum-one:v2": "pnpm run codegen:v2 && graph build subgraph.arbitrum-one.yaml", + "build:arbitrum-sepolia:v1": "pnpm run codegen:v1 && graph build subgraph-v1.arbitrum-sepolia.yaml", + "build:arbitrum-sepolia:v2": "pnpm run codegen:v2 && graph build subgraph.arbitrum-sepolia.yaml", + "build:base-mainnet:v1": "pnpm run codegen:v1 && graph build subgraph-v1.base-mainnet.yaml", + "build:base-mainnet:v2": "pnpm run codegen:v2 && graph build subgraph.base-mainnet.yaml", + "build:base-sepolia:v1": "pnpm run codegen:v1 && graph build subgraph-v1.base-sepolia.yaml", + "build:base-sepolia:v2": "pnpm run codegen:v2 && graph build subgraph.base-sepolia.yaml", + "build:linea-mainnet:v1": "pnpm run codegen:v1 && graph build subgraph-v1.linea-mainnet.yaml", + "build:linea-mainnet:v2": "pnpm run codegen:v2 && graph build subgraph.linea-mainnet.yaml", + "build:linea-sepolia:v1": "pnpm run codegen:v1 && graph build subgraph-v1.linea-sepolia.yaml", + "build:linea-sepolia:v2": "pnpm run codegen:v2 && graph build subgraph.linea-sepolia.yaml", + "codegen:v1": "graph codegen subgraph-v1.linea-sepolia.yaml", + "codegen:v2": "graph codegen subgraph.linea-sepolia.yaml", + "deploy:arbitrum-nova:v1": "cp schema-v1.graphql build/schema.graphql && goldsky subgraph deploy verax-v1-arbitrum-nova/0.0.4 && graph clean", + "deploy:arbitrum-nova:v2": "cp schema-v2.graphql build/schema.graphql && goldsky subgraph deploy verax-v2-arbitrum-nova/0.0.1 && graph clean", + "deploy:arbitrum-one:v1": "graph deploy --version-label v0.0.1 --studio verax-v1-arbitrum subgraph-v1.arbitrum-nova.yaml", + "deploy:arbitrum-one:v2": "graph deploy --version-label v0.0.1 --studio verax-v2-arbitrum subgraph.arbitrum-nova.yaml", + "deploy:arbitrum-sepolia:v1": "graph deploy --version-label v0.0.2 --studio verax-v1-arbitrum-sepolia subgraph-v1.base-sepolia.yaml", + "deploy:arbitrum-sepolia:v2": "graph deploy --version-label v0.0.1 --studio verax-v2-arbitrum-sepolia subgraph.base-sepolia.yaml", + "deploy:base-mainnet:v1": "graph deploy --version-label v0.0.2 --studio verax-v1-base subgraph-v1.base-mainnet.yaml", + "deploy:base-mainnet:v2": "graph deploy --version-label v0.0.2 --studio verax-v2-base subgraph.base-mainnet.yaml", + "deploy:base-sepolia:v1": "graph deploy --version-label v0.0.2 --studio verax-v1-base-sepolia subgraph-v1.base-sepolia.yaml", + "deploy:base-sepolia:v2": "graph deploy --version-label v0.0.2 --studio verax-v2-base-sepolia subgraph.base-sepolia.yaml", + "deploy:linea-mainnet:v1": "graph deploy --version-label v0.0.1 --studio verax-v1-linea subgraph-v1.linea-mainnet.yaml", + "deploy:linea-mainnet:v2": "graph deploy --version-label v0.0.1 --studio verax-v2-linea subgraph.linea-mainnet.yaml", + "deploy:linea-sepolia:v1": "graph deploy --version-label v0.0.1 --studio verax-v1-linea-sepolia subgraph-v1.linea-sepolia.yaml", + "deploy:linea-sepolia:v2": "graph deploy --version-label v0.0.1 --studio verax-v2-linea-sepolia subgraph.linea-sepolia.yaml", + "test": "cp schema-v2.graphql schema.graphql && cp subgraph.linea-sepolia.yaml subgraph.yaml && pnpm run codegen:v2 && graph test && rm -Rf schema.graphql", "test:coverage": "graph test -c", "test:docker": "graph test -d" }, "devDependencies": { - "@graphprotocol/graph-cli": "0.71.0", + "@graphprotocol/graph-cli": "0.73.0", "@graphprotocol/graph-ts": "0.31.0", "assemblyscript": "0.19.10", "matchstick-as": "0.6.0" diff --git a/subgraph/schema-v1.graphql b/subgraph/schema-v1.graphql new file mode 100644 index 00000000..3f2f98f5 --- /dev/null +++ b/subgraph/schema-v1.graphql @@ -0,0 +1,62 @@ +type Attestation @entity { + id: ID! + schemaId: Bytes! + replacedBy: Bytes! + attester: Bytes! + portal: Bytes! + attestedDate: BigInt! + expirationDate: BigInt! + revocationDate: BigInt! + version: BigInt! + revoked: Boolean! + subject: Bytes! + encodedSubject: Bytes! + attestationData: Bytes! + schemaString: String + decodedData: [String!] +} + +type Module @entity { + id: ID! + moduleAddress: Bytes! + name: String! + description: String! +} + +type Portal @entity { + id: ID! + ownerAddress: Bytes! + modules: [Bytes!] + isRevocable: Boolean! + name: String! + description: String! + ownerName: String! + attestationCounter: Int +} + +type Schema @entity { + id: ID! + name: String! + description: String! + context: String! + schema: String! + attestationCounter: Int +} + +type Counter @entity { + id: ID! + attestations: Int + modules: Int + portals: Int + schemas: Int +} + +type Issuer @entity { + id: ID! +} + +type RegistryVersion @entity { + id: ID! + versionNumber: Int + timestamp: BigInt +} diff --git a/subgraph/schema.graphql b/subgraph/schema-v2.graphql similarity index 100% rename from subgraph/schema.graphql rename to subgraph/schema-v2.graphql diff --git a/subgraph/src/attestation-registry-v1.ts b/subgraph/src/attestation-registry-v1.ts new file mode 100644 index 00000000..7548d5af --- /dev/null +++ b/subgraph/src/attestation-registry-v1.ts @@ -0,0 +1,211 @@ +import { + AttestationRegistered as AttestationRegisteredEvent, + AttestationRegistry, + AttestationReplaced, + AttestationRevoked, + VersionUpdated, +} from "../generated/AttestationRegistry/AttestationRegistry"; +import { Attestation, Counter, Portal, RegistryVersion, Schema } from "../generated/schema"; +import { BigInt, ByteArray, Bytes, ethereum } from "@graphprotocol/graph-ts"; + +export function handleAttestationRegistered(event: AttestationRegisteredEvent): void { + const attestationRegistryContract = AttestationRegistry.bind(event.address); + const attestationData = attestationRegistryContract.getAttestation(event.params.attestationId); + const attestation = new Attestation(event.params.attestationId.toHex()); + + incrementAttestationCount(attestationData.portal.toHexString(), attestationData.schemaId.toHex()); + + attestation.schemaId = attestationData.schemaId; + attestation.replacedBy = attestationData.replacedBy; + attestation.attester = attestationData.attester; + attestation.portal = attestationData.portal; + attestation.attestedDate = attestationData.attestedDate; + attestation.expirationDate = attestationData.expirationDate; + attestation.revocationDate = attestationData.revocationDate; + attestation.version = BigInt.fromI32(attestationData.version); + attestation.revoked = attestationData.revoked; + attestation.encodedSubject = attestationData.subject; + attestation.attestationData = attestationData.attestationData; + + // If the subject looks like an encoded address, decode it to an address + const tempSubject = ethereum.decode("address", attestationData.subject); + attestation.subject = tempSubject ? tempSubject.toAddress() : attestationData.subject; + + // Get matching Schema + const schema = Schema.load(attestationData.schemaId.toHex()); + + if (schema) { + // Remove the first and last characters of the schema string (the parentheses) if they exist + let tempSchema = schema.schema; + tempSchema = tempSchema.startsWith("(") ? tempSchema.substring(1) : tempSchema; + tempSchema = tempSchema.endsWith(")") ? tempSchema.substring(0, tempSchema.length - 1) : tempSchema; + + // Split Schema into a "type fieldName" array + const splitSchema = tempSchema.split(","); + + // Keep only the Schema's types + const schemaTypes = splitSchema.map((item) => item.trim().split(" ")[0]); + + // Join the types in a single coma-separated string + const schemaString = schemaTypes.toString(); + + // Add this Schema string to the Attestation Entity + attestation.schemaString = schemaString; + + const encodedData = attestationData.attestationData; + + // Initiate the decoded data in case it's not decoded at all + attestation.decodedData = ["NOT DECODED"]; + + // Decode the encoded attestation data + let decoded = ethereum.decode("(" + schemaString + ")", Bytes.fromUint8Array(encodedData)); + + // If the decoding function didn't give anything, re-try with the encoded data as a tuple + if (!decoded) { + // Change attestation encoded data into an encoded Tuple + const tuplePrefix = ByteArray.fromHexString("0x0000000000000000000000000000000000000000000000000000000000000020"); + const encodedDataAsTuple = new Uint8Array(tuplePrefix.length + encodedData.length); + encodedDataAsTuple.set(tuplePrefix, 0); + encodedDataAsTuple.set(encodedData, tuplePrefix.length); + + // Decode the tuple + decoded = ethereum.decode("(" + schemaString + ")", Bytes.fromUint8Array(encodedDataAsTuple)); + } + + // If the decode function went through, save it as an Array of Strings + if (decoded) { + // Make the decoded data into a Tuple + const tupleValue = decoded.toTuple(); + + // Convert every field of the Tuple into a String + const tempStringArray: string[] = tupleToStringArray(tupleValue); + + // Add this decoded Array to the Attestation Entity + attestation.decodedData = + tempStringArray.toString().length < 2000 + ? tempStringArray + : [tempStringArray.toString().substring(0, 2000) + " ... TRUNCATED ..."]; + } + } + + attestation.save(); +} + +export function handleAttestationRevoked(event: AttestationRevoked): void { + const attestationRegistryContract = AttestationRegistry.bind(event.address); + const attestationData = attestationRegistryContract.getAttestation(event.params.attestationId); + const attestation = Attestation.load(event.params.attestationId.toHex()); + + if (attestation) { + attestation.revoked = true; + attestation.revocationDate = attestationData.revocationDate; + attestation.save(); + } +} + +export function handleAttestationReplaced(event: AttestationReplaced): void { + const attestation = Attestation.load(event.params.attestationId.toHex()); + + if (attestation) { + attestation.replacedBy = event.params.replacedBy; + attestation.save(); + } +} + +export function handleVersionUpdated(event: VersionUpdated): void { + let registryVersion = RegistryVersion.load("registry-version"); + + if (!registryVersion) { + registryVersion = new RegistryVersion("registry-version"); + } + + registryVersion.versionNumber = event.params.version; + registryVersion.timestamp = event.block.timestamp; + + registryVersion.save(); +} + +function tupleToStringArray(tuple: ethereum.Tuple): string[] { + const tempStringArray: string[] = []; + + for (let i = 0; i < tuple.length; i++) { + tempStringArray.push(valueToString(tuple[i])); + } + + return tempStringArray; +} + +function valueToString(value: ethereum.Value): string { + switch (value.kind) { + case ethereum.ValueKind.ADDRESS: + return value.toAddress().toHexString(); + case ethereum.ValueKind.FIXED_BYTES: + return value.toBytes().toHex(); + case ethereum.ValueKind.BYTES: + return value.toBytes().toHex(); + case ethereum.ValueKind.INT: + return value.toBigInt().toHexString(); + case ethereum.ValueKind.UINT: + return value.toBigInt().toHexString(); + case ethereum.ValueKind.BOOL: + return value.toBoolean().toString(); + case ethereum.ValueKind.STRING: + return value.toString(); + case ethereum.ValueKind.FIXED_ARRAY: + return value + .toArray() + .map((item) => valueToString(item)) + .toString(); + case ethereum.ValueKind.ARRAY: + return value + .toArray() + .map((item) => valueToString(item)) + .toString(); + case ethereum.ValueKind.TUPLE: + return tupleToStringArray(value.toTuple()).toString(); + default: + return "UNKNOWN TYPE"; + } +} + +function incrementAttestationCount(portalAddress: string, schemaId: string): void { + let counter = Counter.load("counter"); + + if (!counter) { + counter = new Counter("counter"); + } + + if (!counter.attestations) { + counter.attestations = 1; + } else { + counter.attestations += 1; + } + + counter.save(); + + // Increment attestation counter for corresponding portal + const portal = Portal.load(portalAddress); + + if (portal) { + if (!portal.attestationCounter) { + portal.attestationCounter = 1; + } else { + portal.attestationCounter += 1; + } + + portal.save(); + } + + // Increment attestation counter for corresponding schema + const schema = Schema.load(schemaId); + + if (schema) { + if (!schema.attestationCounter) { + schema.attestationCounter = 1; + } else { + schema.attestationCounter += 1; + } + + schema.save(); + } +} diff --git a/subgraph/src/module-registry-v1.ts b/subgraph/src/module-registry-v1.ts new file mode 100644 index 00000000..612dd9f6 --- /dev/null +++ b/subgraph/src/module-registry-v1.ts @@ -0,0 +1,30 @@ +import { ModuleRegistered as ModuleRegisteredEvent } from "../generated/ModuleRegistry/ModuleRegistry"; +import { Counter, Module } from "../generated/schema"; + +export function handleModuleRegistered(event: ModuleRegisteredEvent): void { + const module = new Module(event.params.moduleAddress.toHexString()); + + incrementModulesCount(); + + module.moduleAddress = event.params.moduleAddress; + module.name = event.params.name; + module.description = event.params.description; + + module.save(); +} + +function incrementModulesCount(): void { + let counter = Counter.load("counter"); + + if (!counter) { + counter = new Counter("counter"); + } + + if (!counter.modules) { + counter.modules = 1; + } else { + counter.modules += 1; + } + + counter.save(); +} diff --git a/subgraph/src/portal-registry-v1.ts b/subgraph/src/portal-registry-v1.ts new file mode 100644 index 00000000..445bbd72 --- /dev/null +++ b/subgraph/src/portal-registry-v1.ts @@ -0,0 +1,57 @@ +import { Bytes, store } from "@graphprotocol/graph-ts"; +import { + IssuerAdded, + IssuerRemoved, + PortalRegistered as PortalRegisteredEvent, + PortalRegistry, +} from "../generated/PortalRegistry/PortalRegistry"; +import { Counter, Issuer, Portal } from "../generated/schema"; + +export function handlePortalRegistered(event: PortalRegisteredEvent): void { + const contract = PortalRegistry.bind(event.address); + const portalData = contract.getPortalByAddress(event.params.portalAddress); + const portal = new Portal(event.params.portalAddress.toHexString()); + + incrementPortalsCount(); + + portal.name = event.params.name; + portal.description = event.params.description; + portal.ownerAddress = portalData.ownerAddress; + portal.modules = changetype(portalData.modules); + portal.isRevocable = portalData.isRevocable; + portal.ownerName = portalData.ownerName; + portal.attestationCounter = 0; + + portal.save(); +} + +export function handleIssuerAdded(event: IssuerAdded): void { + const issuer = new Issuer(event.params.issuerAddress.toHexString()); + issuer.save(); +} + +export function handleIssuerRemoved(event: IssuerRemoved): void { + const issuerId = event.params.issuerAddress.toHexString(); + const issuer = Issuer.load(issuerId); + + if (issuer != null) { + // Delete the Issuer entity + store.remove("Issuer", issuerId); + } +} + +function incrementPortalsCount(): void { + let counter = Counter.load("counter"); + + if (!counter) { + counter = new Counter("counter"); + } + + if (!counter.portals) { + counter.portals = 1; + } else { + counter.portals += 1; + } + + counter.save(); +} diff --git a/subgraph/src/schema-registry-v1.ts b/subgraph/src/schema-registry-v1.ts new file mode 100644 index 00000000..6b93c4b4 --- /dev/null +++ b/subgraph/src/schema-registry-v1.ts @@ -0,0 +1,48 @@ +import { + SchemaContextUpdated, + SchemaCreated as SchemaCreatedEvent, + SchemaRegistry, +} from "../generated/SchemaRegistry/SchemaRegistry"; +import { Counter, Schema } from "../generated/schema"; + +export function handleSchemaCreated(event: SchemaCreatedEvent): void { + const schema = new Schema(event.params.id.toHexString()); + + incrementSchemasCount(); + + schema.name = event.params.name; + schema.description = event.params.description; + schema.context = event.params.context; + schema.schema = event.params.schemaString; + schema.attestationCounter = 0; + + schema.save(); +} + +export function handleSchemaContextUpdated(event: SchemaContextUpdated): void { + const schemaRegistryContract = SchemaRegistry.bind(event.address); + const newContext = schemaRegistryContract.getSchema(event.params.id).context; + // Get matching Schema + const schema = Schema.load(event.params.id.toHexString()); + + if (schema !== null) { + schema.context = newContext; + schema.save(); + } +} + +function incrementSchemasCount(): void { + let counter = Counter.load("counter"); + + if (!counter) { + counter = new Counter("counter"); + } + + if (!counter.schemas) { + counter.schemas = 1; + } else { + counter.schemas += 1; + } + + counter.save(); +} diff --git a/subgraph/subgraph.arbitrum-goerli.yaml b/subgraph/subgraph-v1.arbitrum-nova.yaml similarity index 76% rename from subgraph/subgraph.arbitrum-goerli.yaml rename to subgraph/subgraph-v1.arbitrum-nova.yaml index 5cb4c8cf..d6ace465 100644 --- a/subgraph/subgraph.arbitrum-goerli.yaml +++ b/subgraph/subgraph-v1.arbitrum-nova.yaml @@ -1,14 +1,14 @@ specVersion: 0.0.5 schema: - file: ./schema.graphql + file: ./schema-v1.graphql dataSources: - kind: ethereum name: AttestationRegistry - network: arbitrum-goerli + network: arbitrum-nova source: abi: AttestationRegistry - address: "0xCD839595FdA5A8111d5E03D42d9D9af60ee67B66" - startBlock: 54335728 + address: "0xB9Cf26ED827Eb4A7079e8dedB0ea93D932A2e3e8" + startBlock: 38935000 mapping: kind: ethereum/events apiVersion: 0.0.7 @@ -27,14 +27,14 @@ dataSources: handler: handleAttestationReplaced - event: VersionUpdated(uint16) handler: handleVersionUpdated - file: ./src/attestation-registry.ts + file: ./src/attestation-registry-v1.ts - kind: ethereum name: ModuleRegistry - network: arbitrum-goerli + network: arbitrum-nova source: abi: ModuleRegistry - address: "0x58EE79284bE65b217Db408A0991314f9Ae84348A" - startBlock: 54335866 + address: "0x46F7471cd2C1d69Cb5e62c1a34F3fCAf81304Fc3" + startBlock: 38935000 mapping: kind: ethereum/events apiVersion: 0.0.7 @@ -47,14 +47,14 @@ dataSources: eventHandlers: - event: ModuleRegistered(string,string,address) handler: handleModuleRegistered - file: ./src/module-registry.ts + file: ./src/module-registry-v1.ts - kind: ethereum name: PortalRegistry - network: arbitrum-goerli + network: arbitrum-nova source: abi: PortalRegistry - address: "0x7d6a914C1e33C141CB4a5e0095c1075E5649aFB2" - startBlock: 54335949 + address: "0xADc8da3d3388dEe74C7134fC4AEe1cF866Da5d38" + startBlock: 38935000 mapping: kind: ethereum/events apiVersion: 0.0.7 @@ -67,20 +67,18 @@ dataSources: eventHandlers: - event: PortalRegistered(string,string,address) handler: handlePortalRegistered - - event: PortalRevoked(address) - handler: handlePortalRevoked - event: IssuerAdded(address) handler: handleIssuerAdded - event: IssuerRemoved(address) handler: handleIssuerRemoved - file: ./src/portal-registry.ts + file: ./src/portal-registry-v1.ts - kind: ethereum name: SchemaRegistry - network: arbitrum-goerli + network: arbitrum-nova source: abi: SchemaRegistry - address: "0x129043e80e0B4C7da61a622df0912c31D3414AA7" - startBlock: 54337444 + address: "0x9b5BABcEbf0E8550da1eCDe5674783179B6557FB" + startBlock: 38935000 mapping: kind: ethereum/events apiVersion: 0.0.7 @@ -95,4 +93,4 @@ dataSources: handler: handleSchemaCreated - event: SchemaContextUpdated(indexed bytes32) handler: handleSchemaContextUpdated - file: ./src/schema-registry.ts + file: ./src/schema-registry-v1.ts diff --git a/subgraph/subgraph-v1.arbitrum-one.yaml b/subgraph/subgraph-v1.arbitrum-one.yaml new file mode 100644 index 00000000..b99e5fa0 --- /dev/null +++ b/subgraph/subgraph-v1.arbitrum-one.yaml @@ -0,0 +1,96 @@ +specVersion: 0.0.5 +schema: + file: ./schema-v1.graphql +dataSources: + - kind: ethereum + name: AttestationRegistry + network: arbitrum-one + source: + abi: AttestationRegistry + address: "0x335E9719e8eFE2a19A92E07BC4836160fC31cd7C" + startBlock: 149974789 + mapping: + kind: ethereum/events + apiVersion: 0.0.7 + language: wasm/assemblyscript + entities: + - Attestation + abis: + - name: AttestationRegistry + file: ./abis/AttestationRegistry.json + eventHandlers: + - event: AttestationRegistered(indexed bytes32) + handler: handleAttestationRegistered + - event: AttestationRevoked(bytes32) + handler: handleAttestationRevoked + - event: AttestationReplaced(bytes32,bytes32) + handler: handleAttestationReplaced + - event: VersionUpdated(uint16) + handler: handleVersionUpdated + file: ./src/attestation-registry-v1.ts + - kind: ethereum + name: ModuleRegistry + network: arbitrum-one + source: + abi: ModuleRegistry + address: "0x3acF4daAB6cbc01546Dd4a96c9665B398d48A4ba" + startBlock: 149974868 + mapping: + kind: ethereum/events + apiVersion: 0.0.7 + language: wasm/assemblyscript + entities: + - Module + abis: + - name: ModuleRegistry + file: ./abis/ModuleRegistry.json + eventHandlers: + - event: ModuleRegistered(string,string,address) + handler: handleModuleRegistered + file: ./src/module-registry-v1.ts + - kind: ethereum + name: PortalRegistry + network: arbitrum-one + source: + abi: PortalRegistry + address: "0x4042D0A54f997EE3a1b0F51e4813654199BFd8bD" + startBlock: 149974944 + mapping: + kind: ethereum/events + apiVersion: 0.0.7 + language: wasm/assemblyscript + entities: + - Portal + abis: + - name: PortalRegistry + file: ./abis/PortalRegistry.json + eventHandlers: + - event: PortalRegistered(string,string,address) + handler: handlePortalRegistered + - event: IssuerAdded(address) + handler: handleIssuerAdded + - event: IssuerRemoved(address) + handler: handleIssuerRemoved + file: ./src/portal-registry-v1.ts + - kind: ethereum + name: SchemaRegistry + network: arbitrum-one + source: + abi: SchemaRegistry + address: "0xE96072F46EA0e42e538762dDc0aFa4ED8AE6Ec27" + startBlock: 149975041 + mapping: + kind: ethereum/events + apiVersion: 0.0.7 + language: wasm/assemblyscript + entities: + - Schema + abis: + - name: SchemaRegistry + file: ./abis/SchemaRegistry.json + eventHandlers: + - event: SchemaCreated(indexed bytes32,string,string,string,string) + handler: handleSchemaCreated + - event: SchemaContextUpdated(indexed bytes32) + handler: handleSchemaContextUpdated + file: ./src/schema-registry-v1.ts diff --git a/subgraph/subgraph-v1.arbitrum-sepolia.yaml b/subgraph/subgraph-v1.arbitrum-sepolia.yaml new file mode 100644 index 00000000..b69890bd --- /dev/null +++ b/subgraph/subgraph-v1.arbitrum-sepolia.yaml @@ -0,0 +1,96 @@ +specVersion: 0.0.5 +schema: + file: ./schema-v1.graphql +dataSources: + - kind: ethereum + name: AttestationRegistry + network: arbitrum-sepolia + source: + abi: AttestationRegistry + address: "0xee5e23492bf49C1F4CF0676b3bF49d78A6dD61c5" + startBlock: 22791116 + mapping: + kind: ethereum/events + apiVersion: 0.0.7 + language: wasm/assemblyscript + entities: + - Attestation + abis: + - name: AttestationRegistry + file: ./abis/AttestationRegistry.json + eventHandlers: + - event: AttestationRegistered(indexed bytes32) + handler: handleAttestationRegistered + - event: AttestationRevoked(bytes32) + handler: handleAttestationRevoked + - event: AttestationReplaced(bytes32,bytes32) + handler: handleAttestationReplaced + - event: VersionUpdated(uint16) + handler: handleVersionUpdated + file: ./src/attestation-registry-v1.ts + - kind: ethereum + name: ModuleRegistry + network: arbitrum-sepolia + source: + abi: ModuleRegistry + address: "0xEC572277d4E87a64DcfA774ED219Dd4E69E4BDc6" + startBlock: 22791116 + mapping: + kind: ethereum/events + apiVersion: 0.0.7 + language: wasm/assemblyscript + entities: + - Module + abis: + - name: ModuleRegistry + file: ./abis/ModuleRegistry.json + eventHandlers: + - event: ModuleRegistered(string,string,address) + handler: handleModuleRegistered + file: ./src/module-registry-v1.ts + - kind: ethereum + name: PortalRegistry + network: arbitrum-sepolia + source: + abi: PortalRegistry + address: "0x1ceb52584B6C45C7049dc7fDC476bC138E4beaDE" + startBlock: 22791116 + mapping: + kind: ethereum/events + apiVersion: 0.0.7 + language: wasm/assemblyscript + entities: + - Portal + abis: + - name: PortalRegistry + file: ./abis/PortalRegistry.json + eventHandlers: + - event: PortalRegistered(string,string,address) + handler: handlePortalRegistered + - event: IssuerAdded(address) + handler: handleIssuerAdded + - event: IssuerRemoved(address) + handler: handleIssuerRemoved + file: ./src/portal-registry-v1.ts + - kind: ethereum + name: SchemaRegistry + network: arbitrum-sepolia + source: + abi: SchemaRegistry + address: "0x025531b655D9EE335B8E6cc4C118b313f26ACc8F" + startBlock: 22791116 + mapping: + kind: ethereum/events + apiVersion: 0.0.7 + language: wasm/assemblyscript + entities: + - Schema + abis: + - name: SchemaRegistry + file: ./abis/SchemaRegistry.json + eventHandlers: + - event: SchemaCreated(indexed bytes32,string,string,string,string) + handler: handleSchemaCreated + - event: SchemaContextUpdated(indexed bytes32) + handler: handleSchemaContextUpdated + file: ./src/schema-registry-v1.ts diff --git a/subgraph/subgraph-v1.base-mainnet.yaml b/subgraph/subgraph-v1.base-mainnet.yaml new file mode 100644 index 00000000..42ed118b --- /dev/null +++ b/subgraph/subgraph-v1.base-mainnet.yaml @@ -0,0 +1,96 @@ +specVersion: 0.0.5 +schema: + file: ./schema-v1.graphql +dataSources: + - kind: ethereum + name: AttestationRegistry + network: base + source: + abi: AttestationRegistry + address: "0xA0080DBd35711faD39258E45d9A5D798852b05D4" + startBlock: 13666866 + mapping: + kind: ethereum/events + apiVersion: 0.0.7 + language: wasm/assemblyscript + entities: + - Attestation + abis: + - name: AttestationRegistry + file: ./abis/AttestationRegistry.json + eventHandlers: + - event: AttestationRegistered(indexed bytes32) + handler: handleAttestationRegistered + - event: AttestationRevoked(bytes32) + handler: handleAttestationRevoked + - event: AttestationReplaced(bytes32,bytes32) + handler: handleAttestationReplaced + - event: VersionUpdated(uint16) + handler: handleVersionUpdated + file: ./src/attestation-registry-v1.ts + - kind: ethereum + name: ModuleRegistry + network: base + source: + abi: ModuleRegistry + address: "0xAd0C12db58098A6665CBEf48f60eB67d81d1F1ff" + startBlock: 13666866 + mapping: + kind: ethereum/events + apiVersion: 0.0.7 + language: wasm/assemblyscript + entities: + - Module + abis: + - name: ModuleRegistry + file: ./abis/ModuleRegistry.json + eventHandlers: + - event: ModuleRegistered(string,string,address) + handler: handleModuleRegistered + file: ./src/module-registry-v1.ts + - kind: ethereum + name: PortalRegistry + network: base + source: + abi: PortalRegistry + address: "0xcbf28432C25B400E645F0EaC05F8954e8EE7c0d6" + startBlock: 13666866 + mapping: + kind: ethereum/events + apiVersion: 0.0.7 + language: wasm/assemblyscript + entities: + - Portal + abis: + - name: PortalRegistry + file: ./abis/PortalRegistry.json + eventHandlers: + - event: PortalRegistered(string,string,address) + handler: handlePortalRegistered + - event: IssuerAdded(address) + handler: handleIssuerAdded + - event: IssuerRemoved(address) + handler: handleIssuerRemoved + file: ./src/portal-registry-v1.ts + - kind: ethereum + name: SchemaRegistry + network: base + source: + abi: SchemaRegistry + address: "0x8081dCd745f160c148Eb5be510F78628A0951c31" + startBlock: 13666866 + mapping: + kind: ethereum/events + apiVersion: 0.0.7 + language: wasm/assemblyscript + entities: + - Schema + abis: + - name: SchemaRegistry + file: ./abis/SchemaRegistry.json + eventHandlers: + - event: SchemaCreated(indexed bytes32,string,string,string,string) + handler: handleSchemaCreated + - event: SchemaContextUpdated(indexed bytes32) + handler: handleSchemaContextUpdated + file: ./src/schema-registry-v1.ts diff --git a/subgraph/subgraph-v1.base-sepolia.yaml b/subgraph/subgraph-v1.base-sepolia.yaml new file mode 100644 index 00000000..1c497d7a --- /dev/null +++ b/subgraph/subgraph-v1.base-sepolia.yaml @@ -0,0 +1,96 @@ +specVersion: 0.0.5 +schema: + file: ./schema-v1.graphql +dataSources: + - kind: ethereum + name: AttestationRegistry + network: base-sepolia + source: + abi: AttestationRegistry + address: "0x374B686137eC0DB442a8d833451f8C12cD4B5De4" + startBlock: 9174253 + mapping: + kind: ethereum/events + apiVersion: 0.0.7 + language: wasm/assemblyscript + entities: + - Attestation + abis: + - name: AttestationRegistry + file: ./abis/AttestationRegistry.json + eventHandlers: + - event: AttestationRegistered(indexed bytes32) + handler: handleAttestationRegistered + - event: AttestationRevoked(bytes32) + handler: handleAttestationRevoked + - event: AttestationReplaced(bytes32,bytes32) + handler: handleAttestationReplaced + - event: VersionUpdated(uint16) + handler: handleVersionUpdated + file: ./src/attestation-registry-v1.ts + - kind: ethereum + name: ModuleRegistry + network: base-sepolia + source: + abi: ModuleRegistry + address: "0xEC572277d4E87a64DcfA774ED219Dd4E69E4BDc6" + startBlock: 9174253 + mapping: + kind: ethereum/events + apiVersion: 0.0.7 + language: wasm/assemblyscript + entities: + - Module + abis: + - name: ModuleRegistry + file: ./abis/ModuleRegistry.json + eventHandlers: + - event: ModuleRegistered(string,string,address) + handler: handleModuleRegistered + file: ./src/module-registry-v1.ts + - kind: ethereum + name: PortalRegistry + network: base-sepolia + source: + abi: PortalRegistry + address: "0x025531b655D9EE335B8E6cc4C118b313f26ACc8F" + startBlock: 9174253 + mapping: + kind: ethereum/events + apiVersion: 0.0.7 + language: wasm/assemblyscript + entities: + - Portal + abis: + - name: PortalRegistry + file: ./abis/PortalRegistry.json + eventHandlers: + - event: PortalRegistered(string,string,address) + handler: handlePortalRegistered + - event: IssuerAdded(address) + handler: handleIssuerAdded + - event: IssuerRemoved(address) + handler: handleIssuerRemoved + file: ./src/portal-registry-v1.ts + - kind: ethereum + name: SchemaRegistry + network: base-sepolia + source: + abi: SchemaRegistry + address: "0x66D2F3DCc970343b83a6263E20832184fa71CFe7" + startBlock: 9174253 + mapping: + kind: ethereum/events + apiVersion: 0.0.7 + language: wasm/assemblyscript + entities: + - Schema + abis: + - name: SchemaRegistry + file: ./abis/SchemaRegistry.json + eventHandlers: + - event: SchemaCreated(indexed bytes32,string,string,string,string) + handler: handleSchemaCreated + - event: SchemaContextUpdated(indexed bytes32) + handler: handleSchemaContextUpdated + file: ./src/schema-registry-v1.ts diff --git a/subgraph/subgraph-v1.linea-goerli.yaml b/subgraph/subgraph-v1.linea-goerli.yaml new file mode 100644 index 00000000..2ad50b7d --- /dev/null +++ b/subgraph/subgraph-v1.linea-goerli.yaml @@ -0,0 +1,96 @@ +specVersion: 0.0.5 +schema: + file: ./schema-v1.graphql +dataSources: + - kind: ethereum + name: AttestationRegistry + network: linea-goerli + source: + abi: AttestationRegistry + address: "0xC765F28096F6121C2F2b82D35A4346280164428b" + startBlock: 1454659 + mapping: + kind: ethereum/events + apiVersion: 0.0.7 + language: wasm/assemblyscript + entities: + - Attestation + abis: + - name: AttestationRegistry + file: ./abis/AttestationRegistry.json + eventHandlers: + - event: AttestationRegistered(indexed bytes32) + handler: handleAttestationRegistered + - event: AttestationRevoked(bytes32) + handler: handleAttestationRevoked + - event: AttestationReplaced(bytes32,bytes32) + handler: handleAttestationReplaced + - event: VersionUpdated(uint16) + handler: handleVersionUpdated + file: ./src/attestation-registry-v1.ts + - kind: ethereum + name: ModuleRegistry + network: linea-goerli + source: + abi: ModuleRegistry + address: "0x1a20b2CFA134686306436D2c9f778D7eC6c43A43" + startBlock: 1454663 + mapping: + kind: ethereum/events + apiVersion: 0.0.7 + language: wasm/assemblyscript + entities: + - Module + abis: + - name: ModuleRegistry + file: ./abis/ModuleRegistry.json + eventHandlers: + - event: ModuleRegistered(string,string,address) + handler: handleModuleRegistered + file: ./src/module-registry-v1.ts + - kind: ethereum + name: PortalRegistry + network: linea-goerli + source: + abi: PortalRegistry + address: "0x506f88a5Ca8D5F001f2909b029738A40042e42a6" + startBlock: 1454667 + mapping: + kind: ethereum/events + apiVersion: 0.0.7 + language: wasm/assemblyscript + entities: + - Portal + abis: + - name: PortalRegistry + file: ./abis/PortalRegistry.json + eventHandlers: + - event: PortalRegistered(string,string,address) + handler: handlePortalRegistered + - event: IssuerAdded(address) + handler: handleIssuerAdded + - event: IssuerRemoved(address) + handler: handleIssuerRemoved + file: ./src/portal-registry-v1.ts + - kind: ethereum + name: SchemaRegistry + network: linea-goerli + source: + abi: SchemaRegistry + address: "0xB2c4Da1f8F08A0CA25862509E5431289BE2b598B" + startBlock: 1454671 + mapping: + kind: ethereum/events + apiVersion: 0.0.7 + language: wasm/assemblyscript + entities: + - Schema + abis: + - name: SchemaRegistry + file: ./abis/SchemaRegistry.json + eventHandlers: + - event: SchemaCreated(indexed bytes32,string,string,string,string) + handler: handleSchemaCreated + - event: SchemaContextUpdated(indexed bytes32) + handler: handleSchemaContextUpdated + file: ./src/schema-registry-v1.ts diff --git a/subgraph/subgraph-v1.linea-mainnet.yaml b/subgraph/subgraph-v1.linea-mainnet.yaml new file mode 100644 index 00000000..b85acc14 --- /dev/null +++ b/subgraph/subgraph-v1.linea-mainnet.yaml @@ -0,0 +1,96 @@ +specVersion: 0.0.5 +schema: + file: ./schema-v1.graphql +dataSources: + - kind: ethereum + name: AttestationRegistry + network: linea + source: + abi: AttestationRegistry + address: "0x3de3893aa4Cdea029e84e75223a152FD08315138" + startBlock: 346695 + mapping: + kind: ethereum/events + apiVersion: 0.0.7 + language: wasm/assemblyscript + entities: + - Attestation + abis: + - name: AttestationRegistry + file: ./abis/AttestationRegistry.json + eventHandlers: + - event: AttestationRegistered(indexed bytes32) + handler: handleAttestationRegistered + - event: AttestationRevoked(bytes32) + handler: handleAttestationRevoked + - event: AttestationReplaced(bytes32,bytes32) + handler: handleAttestationReplaced + - event: VersionUpdated(uint16) + handler: handleVersionUpdated + file: ./src/attestation-registry-v1.ts + - kind: ethereum + name: ModuleRegistry + network: linea + source: + abi: ModuleRegistry + address: "0xf851513A732996F22542226341748f3C9978438f" + startBlock: 346699 + mapping: + kind: ethereum/events + apiVersion: 0.0.7 + language: wasm/assemblyscript + entities: + - Module + abis: + - name: ModuleRegistry + file: ./abis/ModuleRegistry.json + eventHandlers: + - event: ModuleRegistered(string,string,address) + handler: handleModuleRegistered + file: ./src/module-registry-v1.ts + - kind: ethereum + name: PortalRegistry + network: linea + source: + abi: PortalRegistry + address: "0xd5d61e4ECDf6d46A63BfdC262af92544DFc19083" + startBlock: 346703 + mapping: + kind: ethereum/events + apiVersion: 0.0.7 + language: wasm/assemblyscript + entities: + - Portal + abis: + - name: PortalRegistry + file: ./abis/PortalRegistry.json + eventHandlers: + - event: PortalRegistered(string,string,address) + handler: handlePortalRegistered + - event: IssuerAdded(address) + handler: handleIssuerAdded + - event: IssuerRemoved(address) + handler: handleIssuerRemoved + file: ./src/portal-registry-v1.ts + - kind: ethereum + name: SchemaRegistry + network: linea + source: + abi: SchemaRegistry + address: "0x0f95dCec4c7a93F2637eb13b655F2223ea036B59" + startBlock: 346707 + mapping: + kind: ethereum/events + apiVersion: 0.0.7 + language: wasm/assemblyscript + entities: + - Schema + abis: + - name: SchemaRegistry + file: ./abis/SchemaRegistry.json + eventHandlers: + - event: SchemaCreated(indexed bytes32,string,string,string,string) + handler: handleSchemaCreated + - event: SchemaContextUpdated(indexed bytes32) + handler: handleSchemaContextUpdated + file: ./src/schema-registry-v1.ts diff --git a/subgraph/subgraph-v1.linea-sepolia.yaml b/subgraph/subgraph-v1.linea-sepolia.yaml new file mode 100644 index 00000000..a3398b0f --- /dev/null +++ b/subgraph/subgraph-v1.linea-sepolia.yaml @@ -0,0 +1,96 @@ +specVersion: 0.0.5 +schema: + file: ./schema-v1.graphql +dataSources: + - kind: ethereum + name: AttestationRegistry + network: linea-sepolia + source: + abi: AttestationRegistry + address: "0xDaf3C3632327343f7df0Baad2dc9144fa4e1001F" + startBlock: 487966 + mapping: + kind: ethereum/events + apiVersion: 0.0.7 + language: wasm/assemblyscript + entities: + - Attestation + abis: + - name: AttestationRegistry + file: ./abis/AttestationRegistry.json + eventHandlers: + - event: AttestationRegistered(indexed bytes32) + handler: handleAttestationRegistered + - event: AttestationRevoked(bytes32) + handler: handleAttestationRevoked + - event: AttestationReplaced(bytes32,bytes32) + handler: handleAttestationReplaced + - event: VersionUpdated(uint16) + handler: handleVersionUpdated + file: ./src/attestation-registry-v1.ts + - kind: ethereum + name: ModuleRegistry + network: linea-sepolia + source: + abi: ModuleRegistry + address: "0x3C443B9f0c8ed3A3270De7A4815487BA3223C2Fa" + startBlock: 487966 + mapping: + kind: ethereum/events + apiVersion: 0.0.7 + language: wasm/assemblyscript + entities: + - Module + abis: + - name: ModuleRegistry + file: ./abis/ModuleRegistry.json + eventHandlers: + - event: ModuleRegistered(string,string,address) + handler: handleModuleRegistered + file: ./src/module-registry-v1.ts + - kind: ethereum + name: PortalRegistry + network: linea-sepolia + source: + abi: PortalRegistry + address: "0xF35fe79104e157703dbCC3Baa72a81A99591744D" + startBlock: 487966 + mapping: + kind: ethereum/events + apiVersion: 0.0.7 + language: wasm/assemblyscript + entities: + - Portal + abis: + - name: PortalRegistry + file: ./abis/PortalRegistry.json + eventHandlers: + - event: PortalRegistered(string,string,address) + handler: handlePortalRegistered + - event: IssuerAdded(address) + handler: handleIssuerAdded + - event: IssuerRemoved(address) + handler: handleIssuerRemoved + file: ./src/portal-registry-v1.ts + - kind: ethereum + name: SchemaRegistry + network: linea-sepolia + source: + abi: SchemaRegistry + address: "0x90b8542d7288a83EC887229A7C727989C3b56209" + startBlock: 487966 + mapping: + kind: ethereum/events + apiVersion: 0.0.7 + language: wasm/assemblyscript + entities: + - Schema + abis: + - name: SchemaRegistry + file: ./abis/SchemaRegistry.json + eventHandlers: + - event: SchemaCreated(indexed bytes32,string,string,string,string) + handler: handleSchemaCreated + - event: SchemaContextUpdated(indexed bytes32) + handler: handleSchemaContextUpdated + file: ./src/schema-registry-v1.ts diff --git a/subgraph/subgraph.arbitrum-nova.yaml b/subgraph/subgraph.arbitrum-nova.yaml index 615b0e27..364ff99e 100644 --- a/subgraph/subgraph.arbitrum-nova.yaml +++ b/subgraph/subgraph.arbitrum-nova.yaml @@ -1,6 +1,6 @@ specVersion: 0.0.5 schema: - file: ./schema.graphql + file: ./schema-v2.graphql dataSources: - kind: ethereum name: AttestationRegistry @@ -21,6 +21,12 @@ dataSources: eventHandlers: - event: AttestationRegistered(indexed bytes32) handler: handleAttestationRegistered + - event: AttestationRevoked(bytes32) + handler: handleAttestationRevoked + - event: AttestationReplaced(bytes32,bytes32) + handler: handleAttestationReplaced + - event: VersionUpdated(uint16) + handler: handleVersionUpdated file: ./src/attestation-registry.ts - kind: ethereum name: ModuleRegistry @@ -61,6 +67,12 @@ dataSources: eventHandlers: - event: PortalRegistered(string,string,address) handler: handlePortalRegistered + - event: PortalRevoked(address) + handler: handlePortalRevoked + - event: IssuerAdded(address) + handler: handleIssuerAdded + - event: IssuerRemoved(address) + handler: handleIssuerRemoved file: ./src/portal-registry.ts - kind: ethereum name: SchemaRegistry @@ -74,7 +86,7 @@ dataSources: apiVersion: 0.0.7 language: wasm/assemblyscript entities: - - Portal + - Schema abis: - name: SchemaRegistry file: ./abis/SchemaRegistry.json diff --git a/subgraph/subgraph.arbitrum-mainnet.yaml b/subgraph/subgraph.arbitrum-one.yaml similarity index 95% rename from subgraph/subgraph.arbitrum-mainnet.yaml rename to subgraph/subgraph.arbitrum-one.yaml index 3a24c675..c62e79e4 100644 --- a/subgraph/subgraph.arbitrum-mainnet.yaml +++ b/subgraph/subgraph.arbitrum-one.yaml @@ -1,6 +1,6 @@ specVersion: 0.0.5 schema: - file: ./schema.graphql + file: ./schema-v2.graphql dataSources: - kind: ethereum name: AttestationRegistry @@ -67,8 +67,6 @@ dataSources: eventHandlers: - event: PortalRegistered(string,string,address) handler: handlePortalRegistered - - event: PortalRevoked(address) - handler: handlePortalRevoked - event: IssuerAdded(address) handler: handleIssuerAdded - event: IssuerRemoved(address) @@ -86,7 +84,7 @@ dataSources: apiVersion: 0.0.7 language: wasm/assemblyscript entities: - - Portal + - Schema abis: - name: SchemaRegistry file: ./abis/SchemaRegistry.json diff --git a/subgraph/subgraph.arbitrum-sepolia.yaml b/subgraph/subgraph.arbitrum-sepolia.yaml index 88b3c479..2e99dc6d 100644 --- a/subgraph/subgraph.arbitrum-sepolia.yaml +++ b/subgraph/subgraph.arbitrum-sepolia.yaml @@ -1,10 +1,10 @@ specVersion: 0.0.5 schema: - file: ./schema.graphql + file: ./schema-v2.graphql dataSources: - kind: ethereum name: AttestationRegistry - network: arbotrum-sepolia + network: arbitrum-sepolia source: abi: AttestationRegistry address: "0xee5e23492bf49C1F4CF0676b3bF49d78A6dD61c5" @@ -21,10 +21,16 @@ dataSources: eventHandlers: - event: AttestationRegistered(indexed bytes32) handler: handleAttestationRegistered + - event: AttestationRevoked(bytes32) + handler: handleAttestationRevoked + - event: AttestationReplaced(bytes32,bytes32) + handler: handleAttestationReplaced + - event: VersionUpdated(uint16) + handler: handleVersionUpdated file: ./src/attestation-registry.ts - kind: ethereum name: ModuleRegistry - network: arbotrum-sepolia + network: arbitrum-sepolia source: abi: ModuleRegistry address: "0xEC572277d4E87a64DcfA774ED219Dd4E69E4BDc6" @@ -44,7 +50,7 @@ dataSources: file: ./src/module-registry.ts - kind: ethereum name: PortalRegistry - network: arbotrum-sepolia + network: arbitrum-sepolia source: abi: PortalRegistry address: "0x1ceb52584B6C45C7049dc7fDC476bC138E4beaDE" @@ -61,10 +67,14 @@ dataSources: eventHandlers: - event: PortalRegistered(string,string,address) handler: handlePortalRegistered + - event: IssuerAdded(address) + handler: handleIssuerAdded + - event: IssuerRemoved(address) + handler: handleIssuerRemoved file: ./src/portal-registry.ts - kind: ethereum name: SchemaRegistry - network: arbotrum-sepolia + network: arbitrum-sepolia source: abi: SchemaRegistry address: "0x025531b655D9EE335B8E6cc4C118b313f26ACc8F" @@ -74,7 +84,7 @@ dataSources: apiVersion: 0.0.7 language: wasm/assemblyscript entities: - - Portal + - Schema abis: - name: SchemaRegistry file: ./abis/SchemaRegistry.json diff --git a/subgraph/subgraph.base.yaml b/subgraph/subgraph.base-mainnet.yaml similarity index 95% rename from subgraph/subgraph.base.yaml rename to subgraph/subgraph.base-mainnet.yaml index f8a60a1d..f6c7fb8a 100644 --- a/subgraph/subgraph.base.yaml +++ b/subgraph/subgraph.base-mainnet.yaml @@ -1,6 +1,6 @@ specVersion: 0.0.5 schema: - file: ./schema.graphql + file: ./schema-v2.graphql dataSources: - kind: ethereum name: AttestationRegistry @@ -67,8 +67,6 @@ dataSources: eventHandlers: - event: PortalRegistered(string,string,address) handler: handlePortalRegistered - - event: PortalRevoked(address) - handler: handlePortalRevoked - event: IssuerAdded(address) handler: handleIssuerAdded - event: IssuerRemoved(address) @@ -86,7 +84,7 @@ dataSources: apiVersion: 0.0.7 language: wasm/assemblyscript entities: - - Portal + - Schema abis: - name: SchemaRegistry file: ./abis/SchemaRegistry.json diff --git a/subgraph/subgraph.base-sepolia.yaml b/subgraph/subgraph.base-sepolia.yaml index 7a7878d7..509d686e 100644 --- a/subgraph/subgraph.base-sepolia.yaml +++ b/subgraph/subgraph.base-sepolia.yaml @@ -1,6 +1,6 @@ specVersion: 0.0.5 schema: - file: ./schema.graphql + file: ./schema-v2.graphql dataSources: - kind: ethereum name: AttestationRegistry @@ -67,8 +67,6 @@ dataSources: eventHandlers: - event: PortalRegistered(string,string,address) handler: handlePortalRegistered - - event: PortalRevoked(address) - handler: handlePortalRevoked - event: IssuerAdded(address) handler: handleIssuerAdded - event: IssuerRemoved(address) @@ -86,7 +84,7 @@ dataSources: apiVersion: 0.0.7 language: wasm/assemblyscript entities: - - Portal + - Schema abis: - name: SchemaRegistry file: ./abis/SchemaRegistry.json diff --git a/subgraph/subgraph.linea-goerli.yaml b/subgraph/subgraph.linea-goerli.yaml index a2ced337..dd4c0cb0 100644 --- a/subgraph/subgraph.linea-goerli.yaml +++ b/subgraph/subgraph.linea-goerli.yaml @@ -1,6 +1,6 @@ specVersion: 0.0.5 schema: - file: ./schema.graphql + file: ./schema-v2.graphql dataSources: - kind: ethereum name: AttestationRegistry @@ -67,8 +67,6 @@ dataSources: eventHandlers: - event: PortalRegistered(string,string,address) handler: handlePortalRegistered - - event: PortalRevoked(address) - handler: handlePortalRevoked - event: IssuerAdded(address) handler: handleIssuerAdded - event: IssuerRemoved(address) @@ -86,7 +84,7 @@ dataSources: apiVersion: 0.0.7 language: wasm/assemblyscript entities: - - Portal + - Schema abis: - name: SchemaRegistry file: ./abis/SchemaRegistry.json diff --git a/subgraph/subgraph.linea-mainnet.yaml b/subgraph/subgraph.linea-mainnet.yaml index 80b66adc..ba2b1d2d 100644 --- a/subgraph/subgraph.linea-mainnet.yaml +++ b/subgraph/subgraph.linea-mainnet.yaml @@ -1,6 +1,6 @@ specVersion: 0.0.5 schema: - file: ./schema.graphql + file: ./schema-v2.graphql dataSources: - kind: ethereum name: AttestationRegistry @@ -67,8 +67,6 @@ dataSources: eventHandlers: - event: PortalRegistered(string,string,address) handler: handlePortalRegistered - - event: PortalRevoked(address) - handler: handlePortalRevoked - event: IssuerAdded(address) handler: handleIssuerAdded - event: IssuerRemoved(address) @@ -86,7 +84,7 @@ dataSources: apiVersion: 0.0.7 language: wasm/assemblyscript entities: - - Portal + - Schema abis: - name: SchemaRegistry file: ./abis/SchemaRegistry.json diff --git a/subgraph/subgraph.linea-sepolia.yaml b/subgraph/subgraph.linea-sepolia.yaml index 4c21d5b7..b4f63d74 100644 --- a/subgraph/subgraph.linea-sepolia.yaml +++ b/subgraph/subgraph.linea-sepolia.yaml @@ -1,6 +1,6 @@ specVersion: 0.0.5 schema: - file: ./schema.graphql + file: ./schema-v2.graphql dataSources: - kind: ethereum name: AttestationRegistry @@ -67,8 +67,6 @@ dataSources: eventHandlers: - event: PortalRegistered(string,string,address) handler: handlePortalRegistered - - event: PortalRevoked(address) - handler: handlePortalRevoked - event: IssuerAdded(address) handler: handleIssuerAdded - event: IssuerRemoved(address) @@ -86,7 +84,7 @@ dataSources: apiVersion: 0.0.7 language: wasm/assemblyscript entities: - - Portal + - Schema abis: - name: SchemaRegistry file: ./abis/SchemaRegistry.json