Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for xdai network #68

Merged
merged 2 commits into from
Jun 24, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions packages/connect-thegraph/subgraph/manifest/data/xdai-staging.json
Original file line number Diff line number Diff line change
@@ -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"
}
]
}
22 changes: 22 additions & 0 deletions packages/connect-thegraph/subgraph/manifest/data/xdai.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"network": "xdai",
"description": "Development subgraph for Aragon organizations.",
0xGabi marked this conversation as resolved.
Show resolved Hide resolved
"repository": "https://github.com/aragon/connect",
"ens": "0xaafca6b0c89521752e559650206d7c925fd0e530",
"DAOFactoryDataSources": [
{
"name": "DAOFactory",
"address": "0x4037f97fcc94287257e50bd14c7da9cb4df18250",
"startBlock": "10076184"
}
],
"APMFactoryDataSources": [
{
"name": "ApmRegistryFactory",
"address": "0x812672c031210b439a5befc8f397d639e97e3738",
"startBlock": "10076185"
}
],
"RegistryDataSources": [],
"KernelDataSources": []
}
7 changes: 7 additions & 0 deletions packages/connect/src/connect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,13 @@ function getNetwork(chainId?: number): Network | null {
ensAddress: '0x98df287b6c145399aaa709692c8d308357bc085d',
}
}
if (chainId === 100) {
return {
chainId: 100,
name: 'xdai',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just as a note, I was thinking of starting to accept the chain as { chainId: number, name: string } rather than only chainId: number, to handle staging environments.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, I like that.

ensAddress: '0xaafca6b0c89521752e559650206d7c925fd0e530',
}
}
return null
}

Expand Down