Skip to content

Commit

Permalink
feat: add migrated subgraph, fix build issues
Browse files Browse the repository at this point in the history
  • Loading branch information
msvstj committed Jun 12, 2024
1 parent 8981054 commit 800071c
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 23 deletions.
35 changes: 27 additions & 8 deletions patches/@uniswap+smart-order-router+3.15.0.patch
Original file line number Diff line number Diff line change
Expand Up @@ -168,18 +168,27 @@ index 4e71f87..1412d32 100644
+//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RhdGljLXN1YmdyYXBoLXByb3ZpZGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL3Byb3ZpZGVycy92My9zdGF0aWMtc3ViZ3JhcGgtcHJvdmlkZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7O0FBQUEsNkRBQTZEO0FBQzdELGdEQUFtRDtBQUNuRCw0Q0FBa0Q7QUFDbEQsZ0RBQXdCO0FBQ3hCLG9EQUF1QjtBQUV2QixnREFBc0Q7QUFDdEQsOENBQTREO0FBQzVELHdDQUFxQztBQUVyQyxzREE0RDJCO0FBUzNCLE1BQU0sNkJBQTZCLEdBQW1CO0lBQ3BELENBQUMsa0JBQU8sQ0FBQyxPQUFPLENBQUMsRUFBRTtRQUNqQixnQ0FBdUIsQ0FBQyxrQkFBTyxDQUFDLE9BQU8sQ0FBRTtRQUN6Qyw0QkFBVztRQUNYLDZCQUFZO1FBQ1osNkJBQVk7UUFDWiw2QkFBWTtLQUNiO0lBQ0QsQ0FBQyxrQkFBTyxDQUFDLE1BQU0sQ0FBQyxFQUFFO1FBQ2hCLGdDQUF1QixDQUFDLGtCQUFPLENBQUMsTUFBTSxDQUFFO1FBQ3hDLDRCQUFXO1FBQ1gsNEJBQVc7UUFDWCw0QkFBVztRQUNYLDJCQUFVO0tBQ1g7SUFDRCxDQUFDLGtCQUFPLENBQUMsT0FBTyxDQUFDLE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FRLEVBQUU7Z0JBQy9CLE1BQU0sRUFBRTtvQkFDTixFQUFFLEVBQUUsTUFBTSxDQUFDLE9BQU87aUJBQ25CO2dCQUNELE1BQU0sRUFBRTtvQkFDTixFQUFFLEVBQUUsTUFBTSxDQUFDLE9BQU87aUJBQ25CO2dCQUNELHVEQUF1RDtnQkFDdkQsTUFBTSxFQUFFLGVBQWU7Z0JBQ3ZCLE1BQU0sRUFBRSxlQUFlO2FBQ3hCLENBQUM7UUFDSixDQUFDLENBQUM7YUFDRCxPQUFPLEVBQUU7YUFDVCxLQUFLLEVBQUUsQ0FBQztRQUVYLE9BQU8sYUFBYSxDQUFDO0lBQ3ZCLENBQUM7Q0FDRjtBQXhGRCw0REF3RkMifQ==
\ No newline at end of file
diff --git a/node_modules/@uniswap/smart-order-router/build/main/providers/v3/subgraph-provider.js b/node_modules/@uniswap/smart-order-router/build/main/providers/v3/subgraph-provider.js
index bc019f6..ee22b90 100644
index bc019f6..5aa81d6 100644
--- a/node_modules/@uniswap/smart-order-router/build/main/providers/v3/subgraph-provider.js
+++ b/node_modules/@uniswap/smart-order-router/build/main/providers/v3/subgraph-provider.js
@@ -35,6 +35,7 @@ const SUBGRAPH_URL_BY_CHAIN = {
@@ -25,6 +25,8 @@ const printV3SubgraphPool = (s) => `${s.token0.id}/${s.token1.id}/${s.feeTier}`;
exports.printV3SubgraphPool = printV3SubgraphPool;
const printV2SubgraphPool = (s) => `${s.token0.id}/${s.token1.id}`;
exports.printV2SubgraphPool = printV2SubgraphPool;
+
+const API_KEY = process.env.REACT_APP_GRAPH_API_KEY ?? '2f4a91bec2a65276da7373494a68652e'
const SUBGRAPH_URL_BY_CHAIN = {
[sdk_core_1.ChainId.MAINNET]: 'https://api.thegraph.com/subgraphs/name/uniswap/uniswap-v3',
[sdk_core_1.ChainId.OPTIMISM]: 'https://api.thegraph.com/subgraphs/name/ianlapham/optimism-post-regenesis',
@@ -35,6 +37,7 @@ const SUBGRAPH_URL_BY_CHAIN = {
[sdk_core_1.ChainId.BNB]: 'https://api.thegraph.com/subgraphs/name/ilyamk/uniswap-v3---bnb-chain',
[sdk_core_1.ChainId.AVALANCHE]: 'https://api.thegraph.com/subgraphs/name/lynnshaoyu/uniswap-v3-avax',
[sdk_core_1.ChainId.BASE]: 'https://api.studio.thegraph.com/query/48211/uniswap-v3-base/v0.0.1',
+ [sdk_core_1.ChainId.HARMONY]: 'https://api.thegraph.com/subgraphs/name/nick8319/uniswap-v3-harmony',
+ [sdk_core_1.ChainId.HARMONY]: `https://gateway-arbitrum.network.thegraph.com/api/${API_KEY}/subgraphs/id/GVkp9F6TzzC5hY4g18Ukzb6gGcYDfQrpMpcj867jsenJ`
};
const PAGE_SIZE = 1000; // 1k is max possible query size from subgraph.
class V3SubgraphProvider {
@@ -142,4 +143,4 @@ class V3SubgraphProvider {
@@ -142,4 +145,4 @@ class V3SubgraphProvider {
}
}
exports.V3SubgraphProvider = V3SubgraphProvider;
Expand Down Expand Up @@ -748,18 +757,28 @@ index 26f8306..0c9a38c 100644
+//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RhdGljLXN1YmdyYXBoLXByb3ZpZGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL3Byb3ZpZGVycy92My9zdGF0aWMtc3ViZ3JhcGgtcHJvdmlkZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsNkRBQTZEO0FBQzdELE9BQU8sRUFBRSxPQUFPLEVBQVMsTUFBTSxtQkFBbUIsQ0FBQztBQUNuRCxPQUFPLEVBQUUsU0FBUyxFQUFFLElBQUksRUFBRSxNQUFNLGlCQUFpQixDQUFDO0FBQ2xELE9BQU8sSUFBSSxNQUFNLE1BQU0sQ0FBQztBQUN4QixPQUFPLENBQUMsTUFBTSxRQUFRLENBQUM7QUFFdkIsT0FBTyxFQUFFLGdCQUFnQixFQUFFLE1BQU0sb0JBQW9C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sQ0FBQztZQUVoQyxNQUFNLGVBQWUsR0FBRyxJQUFJLENBQUMsUUFBUSxDQUFDLFNBQVMsQ0FBQyxDQUFDO1lBRWpELE9BQU87Z0JBQ0wsRUFBRSxFQUFFLFdBQVc7Z0JBQ2YsT0FBTyxFQUFFLGdCQUFnQixDQUFDLEdBQUcsQ0FBQztnQkFDOUIsU0FBUyxFQUFFLFNBQVMsQ0FBQyxRQUFRLEVBQUU7Z0JBQy9CLE1BQU0sRUFBRTtvQkFDTixFQUFFLEVBQUUsTUFBTSxDQUFDLE9BQU87aUJBQ25CO2dCQUNELE1BQU0sRUFBRTtvQkFDTixFQUFFLEVBQUUsTUFBTSxDQUFDLE9BQU87aUJBQ25CO2dCQUNELHVEQUF1RDtnQkFDdkQsTUFBTSxFQUFFLGVBQWU7Z0JBQ3ZCLE1BQU0sRUFBRSxlQUFlO2FBQ3hCLENBQUM7UUFDSixDQUFDLENBQUM7YUFDRCxPQUFPLEVBQUU7YUFDVCxLQUFLLEVBQUUsQ0FBQztRQUVYLE9BQU8sYUFBYSxDQUFDO0lBQ3ZCLENBQUM7Q0FDRiJ9
\ No newline at end of file
diff --git a/node_modules/@uniswap/smart-order-router/build/module/providers/v3/subgraph-provider.js b/node_modules/@uniswap/smart-order-router/build/module/providers/v3/subgraph-provider.js
index 9820ba5..6128ee4 100644
index 9820ba5..9f8c823 100644
--- a/node_modules/@uniswap/smart-order-router/build/module/providers/v3/subgraph-provider.js
+++ b/node_modules/@uniswap/smart-order-router/build/module/providers/v3/subgraph-provider.js
@@ -16,6 +16,7 @@ const SUBGRAPH_URL_BY_CHAIN = {
@@ -6,6 +6,9 @@ import _ from 'lodash';
import { log } from '../../util';
export const printV3SubgraphPool = (s) => `${s.token0.id}/${s.token1.id}/${s.feeTier}`;
export const printV2SubgraphPool = (s) => `${s.token0.id}/${s.token1.id}`;
+
+const API_KEY = process.env.REACT_APP_GRAPH_API_KEY ?? '2f4a91bec2a65276da7373494a68652e'
+
const SUBGRAPH_URL_BY_CHAIN = {
[ChainId.MAINNET]: 'https://api.thegraph.com/subgraphs/name/uniswap/uniswap-v3',
[ChainId.OPTIMISM]: 'https://api.thegraph.com/subgraphs/name/ianlapham/optimism-post-regenesis',
@@ -16,6 +19,7 @@ const SUBGRAPH_URL_BY_CHAIN = {
[ChainId.BNB]: 'https://api.thegraph.com/subgraphs/name/ilyamk/uniswap-v3---bnb-chain',
[ChainId.AVALANCHE]: 'https://api.thegraph.com/subgraphs/name/lynnshaoyu/uniswap-v3-avax',
[ChainId.BASE]: 'https://api.studio.thegraph.com/query/48211/uniswap-v3-base/v0.0.1',
+ [ChainId.HARMONY]: 'https://api.thegraph.com/subgraphs/name/nick8319/uniswap-v3-harmony',
+ [ChainId.HARMONY]: `https://gateway-arbitrum.network.thegraph.com/api/${API_KEY}/subgraphs/id/GVkp9F6TzzC5hY4g18Ukzb6gGcYDfQrpMpcj867jsenJ`,
};
const PAGE_SIZE = 1000; // 1k is max possible query size from subgraph.
export class V3SubgraphProvider {
@@ -129,4 +130,4 @@ export class V3SubgraphProvider {
@@ -129,4 +133,4 @@ export class V3SubgraphProvider {
return poolsSanitized;
}
}
Expand Down
Loading

0 comments on commit 800071c

Please sign in to comment.