Skip to content

Commit

Permalink
Update subgraphs urls (#1925)
Browse files Browse the repository at this point in the history
* update subgraph api links

* update missing subgraph urls
  • Loading branch information
Diogomartf authored Jul 10, 2024
1 parent 4c4b537 commit d3cc0a1
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion graphql-codegen.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
overwrite: true
schema: 'https://api.thegraph.com/subgraphs/name/dxgraphs/swapr-mainnet-v2'
schema: 'https://gateway-arbitrum.network.thegraph.com/api/5f28b2eb91e916650da7ffe9bd228774/subgraphs/id/DQApa5vhVyx1sajkrF8zEFmLJTYyyMyw8WdiYt5hw9Fn'
documents: 'src/**/*.{gql,graphql}'
generates:
src/graphql/generated/schema.ts:
Expand Down
8 changes: 5 additions & 3 deletions src/services/AdvancedTradingView/adapters/adapters.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,17 @@ import {
UniswapV3SwapsBurnsAndMints,
} from './uniswapV3/uniswapV3.types'

const SUBGRAPH_API_KEY = '5f28b2eb91e916650da7ffe9bd228774'

export const adapters: Adapters<AppState> = {
swapr: new BaseAdapter<AppState, PairSwapsBurnsAndMints, PairSwaps, PairBurnsAndMints>({
key: AdapterKey.SWAPR,
adapterSupportedChains: [ChainId.MAINNET, ChainId.ARBITRUM_ONE, ChainId.GNOSIS],
platform: UniswapV2RoutablePlatform.SWAPR,
subgraphUrls: {
[ChainId.MAINNET]: 'https://api.thegraph.com/subgraphs/name/dxgraphs/swapr-mainnet-v2',
[ChainId.ARBITRUM_ONE]: 'https://api.thegraph.com/subgraphs/name/dxgraphs/swapr-arbitrum-one-v3',
[ChainId.GNOSIS]: 'https://api.thegraph.com/subgraphs/name/dxgraphs/swapr-xdai-v2',
[ChainId.MAINNET]: `https://gateway-arbitrum.network.thegraph.com/api/${SUBGRAPH_API_KEY}/subgraphs/id/DQApa5vhVyx1sajkrF8zEFmLJTYyyMyw8WdiYt5hw9Fn`,
[ChainId.ARBITRUM_ONE]: `https://gateway-arbitrum.network.thegraph.com/api/${SUBGRAPH_API_KEY}/subgraphs/id/H2EYoeTL5qDNeUeFecReCBvEq6BPCx4EnEDoAv7UTyL5`,
[ChainId.GNOSIS]: `https://gateway-arbitrum.network.thegraph.com/api/${SUBGRAPH_API_KEY}/subgraphs/id/EWoa3JwNntAWtaLsLixTU25smp4R5tzGvs9rFXx9NHKZ`,
[ChainId.POLYGON]: '',
[ChainId.OPTIMISM_MAINNET]: '',
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ const USDT_TOKEN = new Token(ChainId.MAINNET, '0xdAC17F958D2ee523a2206206994597C

jest.mock('graphql-request')

const SUBGRAPH_API_KEY = '5f28b2eb91e916650da7ffe9bd228774'

describe('BaseAdapter', () => {
let store: Store<BaseAppState>
let baseAdapter: BaseAdapter<BaseAppState, PairSwapsBurnsAndMints, PairSwaps, PairBurnsAndMints>
Expand All @@ -31,9 +33,9 @@ describe('BaseAdapter', () => {
adapterSupportedChains: [ChainId.MAINNET, ChainId.ARBITRUM_ONE, ChainId.GNOSIS],
platform: UniswapV2RoutablePlatform.SWAPR,
subgraphUrls: {
[ChainId.MAINNET]: 'https://api.thegraph.com/subgraphs/name/dxgraphs/swapr-mainnet-v2',
[ChainId.ARBITRUM_ONE]: 'https://api.thegraph.com/subgraphs/name/dxgraphs/swapr-arbitrum-one-v3',
[ChainId.GNOSIS]: 'https://api.thegraph.com/subgraphs/name/dxgraphs/swapr-xdai-v2',
[ChainId.MAINNET]: `https://gateway-arbitrum.network.thegraph.com/api/${SUBGRAPH_API_KEY}/subgraphs/id/DQApa5vhVyx1sajkrF8zEFmLJTYyyMyw8WdiYt5hw9Fn`,
[ChainId.ARBITRUM_ONE]: `https://gateway-arbitrum.network.thegraph.com/api/${SUBGRAPH_API_KEY}/subgraphs/id/H2EYoeTL5qDNeUeFecReCBvEq6BPCx4EnEDoAv7UTyL5`,
[ChainId.GNOSIS]: `https://gateway-arbitrum.network.thegraph.com/api/${SUBGRAPH_API_KEY}/subgraphs/id/EWoa3JwNntAWtaLsLixTU25smp4R5tzGvs9rFXx9NHKZ`,
[ChainId.POLYGON]: '',
[ChainId.OPTIMISM_MAINNET]: '',
},
Expand Down

0 comments on commit d3cc0a1

Please sign in to comment.