From a77f35dafa109bf0bdd218b7493534a18b9a16a2 Mon Sep 17 00:00:00 2001 From: 0xGabi Date: Sun, 21 Jun 2020 19:59:55 -0300 Subject: [PATCH 1/2] Add support for xdai network --- .../subgraph/manifest/data/xdai-staging.json | 26 +++++++++++++++++++ .../subgraph/manifest/data/xdai.json | 22 ++++++++++++++++ packages/connect/src/connect.ts | 7 +++++ 3 files changed, 55 insertions(+) create mode 100644 packages/connect-thegraph/subgraph/manifest/data/xdai-staging.json create mode 100644 packages/connect-thegraph/subgraph/manifest/data/xdai.json diff --git a/packages/connect-thegraph/subgraph/manifest/data/xdai-staging.json b/packages/connect-thegraph/subgraph/manifest/data/xdai-staging.json new file mode 100644 index 00000000..3e10777c --- /dev/null +++ b/packages/connect-thegraph/subgraph/manifest/data/xdai-staging.json @@ -0,0 +1,26 @@ +{ + "network": "xdai", + "description": "Development subgraph for Aragon organizations.", + "repository": "https://github.com/aragon/connect", + "ens": "0xaafca6b0c89521752e559650206d7c925fd0e530", + "DAOFactoryDataSources": [], + "RegistryDataSources": [ + { + "name": "aragonpm.eth", + "address": "0x3c9fdcf51c3447f629fc61f6aaaf2ac3ea852040", + "startBlock": "10076177" + }, + { + "name": "1hive.aragonpm.eth", + "address": "0x812672c031210b439a5befc8f397d639e97e3738", + "startBlock": "10076193" + } + ], + "KernelDataSources": [ + { + "name": "beehive", + "address": "0x6a8b8891c5f6de1fcf1ab889e7a06f6b60431641", + "startBlock": "10546308" + } + ] +} diff --git a/packages/connect-thegraph/subgraph/manifest/data/xdai.json b/packages/connect-thegraph/subgraph/manifest/data/xdai.json new file mode 100644 index 00000000..f274adb6 --- /dev/null +++ b/packages/connect-thegraph/subgraph/manifest/data/xdai.json @@ -0,0 +1,22 @@ +{ + "network": "xdai", + "description": "Development subgraph for Aragon organizations.", + "repository": "https://github.com/aragon/connect", + "ens": "0xaafca6b0c89521752e559650206d7c925fd0e530", + "DAOFactoryDataSources": [ + { + "name": "DAOFactory", + "address": "0x4037f97fcc94287257e50bd14c7da9cb4df18250", + "startBlock": "10076184" + } + ], + "APMFactoryDataSources": [ + { + "name": "ApmRegistryFactory", + "address": "0x812672c031210b439a5befc8f397d639e97e3738", + "startBlock": "10076185" + } + ], + "RegistryDataSources": [], + "KernelDataSources": [] +} diff --git a/packages/connect/src/connect.ts b/packages/connect/src/connect.ts index d68c12af..70211cda 100644 --- a/packages/connect/src/connect.ts +++ b/packages/connect/src/connect.ts @@ -77,6 +77,13 @@ function getNetwork(chainId?: number): Network | null { ensAddress: '0x98df287b6c145399aaa709692c8d308357bc085d', } } + if (chainId === 100) { + return { + chainId: 100, + name: 'xdai', + ensAddress: '0xaafca6b0c89521752e559650206d7c925fd0e530', + } + } return null } From 0db3b497c006b9c05c126cdcc625b71a10f2da50 Mon Sep 17 00:00:00 2001 From: Gabriel Garcia Date: Tue, 23 Jun 2020 21:41:01 -0300 Subject: [PATCH 2/2] Apply suggestions from code review Co-authored-by: Brett Sun --- packages/connect-thegraph/subgraph/manifest/data/xdai.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/connect-thegraph/subgraph/manifest/data/xdai.json b/packages/connect-thegraph/subgraph/manifest/data/xdai.json index f274adb6..50dc3b7a 100644 --- a/packages/connect-thegraph/subgraph/manifest/data/xdai.json +++ b/packages/connect-thegraph/subgraph/manifest/data/xdai.json @@ -1,6 +1,6 @@ { "network": "xdai", - "description": "Development subgraph for Aragon organizations.", + "description": "Subgraph for Aragon organizations.", "repository": "https://github.com/aragon/connect", "ens": "0xaafca6b0c89521752e559650206d7c925fd0e530", "DAOFactoryDataSources": [