From a08712017de7de006825646eaf40c38443559b74 Mon Sep 17 00:00:00 2001 From: nitinmittal23 Date: Fri, 4 Feb 2022 22:50:03 +0530 Subject: [PATCH 1/3] new: blocknumber and logIndex in statesync event --- root/schema.graphql | 2 ++ root/src/mappings/state-sync.ts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/root/schema.graphql b/root/schema.graphql index 44422e9..6444629 100644 --- a/root/schema.graphql +++ b/root/schema.graphql @@ -19,8 +19,10 @@ type StateSync @entity { depositorOrRootToken: String! depositedTokenOrChildToken: String! data: String! + logIndex: String! transactionHash: Bytes! timestamp: BigInt! + blockNumber: BigInt! } type StateRegistration @entity { diff --git a/root/src/mappings/state-sync.ts b/root/src/mappings/state-sync.ts index 2d11991..5b4654f 100644 --- a/root/src/mappings/state-sync.ts +++ b/root/src/mappings/state-sync.ts @@ -13,6 +13,8 @@ export function handleStateSynced(event: StateSynced): void { entity.transactionHash = event.transaction.hash entity.timestamp = event.block.timestamp + entity.blockNumber = event.block.number + entity.logIndex = event.logIndex.toString() // Attempting to create an instance of `Decoder` smart contract // to be used for decoding valid state sync data From 45d9316ae33ce9a83a70cfdb0e0c4ecdf746ae16 Mon Sep 17 00:00:00 2001 From: nitinmittal23 Date: Fri, 4 Feb 2022 22:55:08 +0530 Subject: [PATCH 2/3] chg: grafting block --- root/config/goerli.json | 2 +- root/config/mainnet.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/root/config/goerli.json b/root/config/goerli.json index c2db06f..3995a96 100644 --- a/root/config/goerli.json +++ b/root/config/goerli.json @@ -1,7 +1,7 @@ { "network": "goerli", "subgraphId": "QmPuwKiewn7sczRV6LwGPWuNtDZTscKECz6NB6V1gE57bm", - "graftingStartBlock": 5996697, + "graftingStartBlock": 2815580, "contracts": { "rootChain": { "address": "0x2890bA17EfE978480615e330ecB65333b880928e", diff --git a/root/config/mainnet.json b/root/config/mainnet.json index 7b1516d..1d01ca9 100644 --- a/root/config/mainnet.json +++ b/root/config/mainnet.json @@ -1,7 +1,7 @@ { "network": "mainnet", "subgraphId": "QmQTfDsLaqbT8VzCAE8zLDi4jjzXxDSkgw79r6VeLemv7b", - "graftingStartBlock": 13977920, + "graftingStartBlock": 10167760, "contracts": { "rootChain": { "address": "0x86E4Dc95c7FBdBf52e33D563BbDB00823894C287", From 1cc5ae202ad1b28fc72b354a39924464624c9789 Mon Sep 17 00:00:00 2001 From: nitinmittal23 Date: Fri, 4 Feb 2022 23:20:27 +0530 Subject: [PATCH 3/3] add: hosted endpoints in readme --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 49a8870..fa1becc 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,12 @@ Subgraph for Matic contracts Please take a look at [Graph protocol](https://github.com/graphprotocol/graph-node) for more information. +## Polygon hosted node endpoints + +**Root** +- Mainnet: `https://thegraph.com/hosted-service/subgraph/maticnetwork/mainnet-root-subgraphs` +- Goerli: `https://thegraph.com/hosted-service/subgraph/maticnetwork/mumbai-root-subgraphs` + ## For Mumbai hosted node endpoints - Graph node: `https://mumbai-graph.matic.today` - GraphQL endpoint: `https://api.mumbai-graph.matic.today/subgraphs/name///graphql`