Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.

Feat: Support xDai network provider and subgraph url#119

Merged
0xGabi merged 1 commit intomasterfrom
xdai-defaults
Jul 7, 2020
Merged

Feat: Support xDai network provider and subgraph url#119
0xGabi merged 1 commit intomasterfrom
xdai-defaults

Conversation

@0xGabi
Copy link
Copy Markdown
Contributor

@0xGabi 0xGabi commented Jul 6, 2020

This PR adds support for xDai default provider and subgraph URL.

Until now users need to use the library like:

const provider = new ethers.providers.JsonRpcProvider(
  'https://xdai.poanetwork.dev',
  {
    name: 'xdai',
    chainId: 100,
    ensAddress: '0xaafca6b0c89521752e559650206d7c925fd0e530',
  }
)

const org = await connect(
  daoAddress,
  [
    'thegraph',
    { orgSubgraphUrl: 'https://api.thegraph.com/subgraphs/name/1hive/aragon-xdai' },
  ],
  { chainId: 100, readProvider: ethereum }
)

With this change we can do:

const org = await connect(ORG_ADDRESS, 'thegraph', {
  chainId: 100,
})

@codecov
Copy link
Copy Markdown

codecov Bot commented Jul 6, 2020

Codecov Report

Merging #119 into master will decrease coverage by 0.13%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #119      +/-   ##
==========================================
- Coverage   24.12%   23.98%   -0.14%     
==========================================
  Files          59       59              
  Lines        1032     1038       +6     
  Branches      167      170       +3     
==========================================
  Hits          249      249              
- Misses        783      789       +6     
Flag Coverage Δ
#unittests 23.98% <0.00%> (-0.14%) ⬇️
Impacted Files Coverage Δ
packages/connect-core/src/entities/Organization.ts 0.00% <0.00%> (ø)
packages/connect-core/src/params.ts 0.00% <0.00%> (ø)
packages/connect-thegraph/src/connector.ts 57.77% <0.00%> (-2.69%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 46e9437...500b65b. Read the comment docs.

@0xGabi 0xGabi requested a review from bpierre July 6, 2020 20:59
@0xGabi 0xGabi merged commit 03feb33 into master Jul 7, 2020
@0xGabi 0xGabi deleted the xdai-defaults branch July 7, 2020 20:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants