diff --git a/graphql-codegen.yml b/graphql-codegen.yml index 2ef233258..3072c9065 100644 --- a/graphql-codegen.yml +++ b/graphql-codegen.yml @@ -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: diff --git a/src/services/AdvancedTradingView/adapters/adapters.config.ts b/src/services/AdvancedTradingView/adapters/adapters.config.ts index 29c8cccc7..1d26cb861 100644 --- a/src/services/AdvancedTradingView/adapters/adapters.config.ts +++ b/src/services/AdvancedTradingView/adapters/adapters.config.ts @@ -12,15 +12,17 @@ import { UniswapV3SwapsBurnsAndMints, } from './uniswapV3/uniswapV3.types' +const SUBGRAPH_API_KEY = '5f28b2eb91e916650da7ffe9bd228774' + export const adapters: Adapters = { swapr: new BaseAdapter({ 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]: '', }, diff --git a/src/services/AdvancedTradingView/adapters/baseAdapter/base.adapter.test.ts b/src/services/AdvancedTradingView/adapters/baseAdapter/base.adapter.test.ts index 2fd836422..4e23cd8be 100644 --- a/src/services/AdvancedTradingView/adapters/baseAdapter/base.adapter.test.ts +++ b/src/services/AdvancedTradingView/adapters/baseAdapter/base.adapter.test.ts @@ -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 let baseAdapter: BaseAdapter @@ -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]: '', },