sushi 5.0.0 → 5.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/_cjs/chain/id.js +3 -1
- package/_cjs/chain/id.js.map +1 -1
- package/_cjs/config/subgraph/get-subgraph-url.js +1 -1
- package/_cjs/config/subgraph/get-subgraph-url.js.map +1 -1
- package/_esm/chain/id.js +1 -0
- package/_esm/chain/id.js.map +1 -1
- package/_esm/config/subgraph/get-subgraph-url.js +1 -1
- package/_esm/config/subgraph/get-subgraph-url.js.map +1 -1
- package/_types/chain/id.d.ts +1 -0
- package/_types/chain/id.d.ts.map +1 -1
- package/_types/config/subgraph/get-subgraph-url.d.ts +2 -1
- package/_types/config/subgraph/get-subgraph-url.d.ts.map +1 -1
- package/_types/config/subgraph/subgraphs/bentobox.d.ts +2 -2
- package/_types/config/subgraph/subgraphs/bentobox.d.ts.map +1 -1
- package/_types/config/subgraph/subgraphs/blocks.d.ts +3 -2
- package/_types/config/subgraph/subgraphs/blocks.d.ts.map +1 -1
- package/_types/config/subgraph/subgraphs/furo.d.ts +2 -2
- package/_types/config/subgraph/subgraphs/furo.d.ts.map +1 -1
- package/_types/config/subgraph/subgraphs/master-chef-v1.d.ts +3 -2
- package/_types/config/subgraph/subgraphs/master-chef-v1.d.ts.map +1 -1
- package/_types/config/subgraph/subgraphs/master-chef-v2.d.ts +3 -2
- package/_types/config/subgraph/subgraphs/master-chef-v2.d.ts.map +1 -1
- package/_types/config/subgraph/subgraphs/mini-chef.d.ts +2 -2
- package/_types/config/subgraph/subgraphs/mini-chef.d.ts.map +1 -1
- package/_types/config/subgraph/subgraphs/sushi-bar.d.ts +3 -2
- package/_types/config/subgraph/subgraphs/sushi-bar.d.ts.map +1 -1
- package/_types/config/subgraph/subgraphs/sushiswap-v2.d.ts +2 -2
- package/_types/config/subgraph/subgraphs/sushiswap-v2.d.ts.map +1 -1
- package/_types/config/subgraph/subgraphs/sushiswap-v3.d.ts +2 -2
- package/_types/config/subgraph/subgraphs/sushiswap-v3.d.ts.map +1 -1
- package/chain/id.ts +3 -0
- package/config/subgraph/get-subgraph-url.ts +9 -6
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# sushi
|
|
2
2
|
|
|
3
|
+
## 5.0.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#85](https://github.com/sushi-labs/sushi/pull/85) [`1fbfa93`](https://github.com/sushi-labs/sushi/commit/1fbfa93dfecb5cb57b90ac8691fefd1f519c0673) Thanks [@LufyCZ](https://github.com/LufyCZ)! - Add isChainId
|
|
8
|
+
|
|
9
|
+
## 5.0.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#82](https://github.com/sushi-labs/sushi/pull/82) [`8d39a1a`](https://github.com/sushi-labs/sushi/commit/8d39a1a2b9b6574ed51cd054018627e8b4ecd69e) Thanks [@LufyCZ](https://github.com/LufyCZ)! - GetSubgraphUrl Type Fix
|
|
14
|
+
|
|
3
15
|
## 5.0.0
|
|
4
16
|
|
|
5
17
|
### Major Changes
|
package/_cjs/chain/id.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ChainId = void 0;
|
|
3
|
+
exports.isChainId = exports.ChainId = void 0;
|
|
4
4
|
const id_js_1 = require("./evm/id.js");
|
|
5
5
|
const id_js_2 = require("./non-evm/aptos/id.js");
|
|
6
6
|
const id_js_3 = require("./non-evm/tron/id.js");
|
|
@@ -9,4 +9,6 @@ exports.ChainId = {
|
|
|
9
9
|
...id_js_2.AptosChainId,
|
|
10
10
|
...id_js_3.TronChainId,
|
|
11
11
|
};
|
|
12
|
+
const isChainId = (chainId) => Object.values(exports.ChainId).includes(chainId);
|
|
13
|
+
exports.isChainId = isChainId;
|
|
12
14
|
//# sourceMappingURL=id.js.map
|
package/_cjs/chain/id.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"id.js","sourceRoot":"","sources":["../../chain/id.ts"],"names":[],"mappings":";;;AAAA,uCAAwC;AACxC,iDAAoD;AACpD,gDAAkD;AAErC,QAAA,OAAO,GAAG;IACrB,GAAG,kBAAU;IACb,GAAG,oBAAY;IACf,GAAG,mBAAW;CACN,CAAA"}
|
|
1
|
+
{"version":3,"file":"id.js","sourceRoot":"","sources":["../../chain/id.ts"],"names":[],"mappings":";;;AAAA,uCAAwC;AACxC,iDAAoD;AACpD,gDAAkD;AAErC,QAAA,OAAO,GAAG;IACrB,GAAG,kBAAU;IACb,GAAG,oBAAY;IACf,GAAG,mBAAW;CACN,CAAA;AAIH,MAAM,SAAS,GAAG,CAAC,OAAe,EAAsB,EAAE,CAC/D,MAAM,CAAC,MAAM,CAAC,eAAO,CAAC,CAAC,QAAQ,CAAC,OAAkB,CAAC,CAAA;AADxC,QAAA,SAAS,aAC+B"}
|
|
@@ -24,7 +24,7 @@ function getSubgraphUrlWrapperWrapper(subgraphs) {
|
|
|
24
24
|
if (isIn(chainId, subgraphs.otherUrls)) {
|
|
25
25
|
return subgraphs.otherUrls[chainId];
|
|
26
26
|
}
|
|
27
|
-
|
|
27
|
+
return undefined;
|
|
28
28
|
}
|
|
29
29
|
return getSubgraphUrl;
|
|
30
30
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-subgraph-url.js","sourceRoot":"","sources":["../../../config/subgraph/get-subgraph-url.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"get-subgraph-url.js","sourceRoot":"","sources":["../../../config/subgraph/get-subgraph-url.ts"],"names":[],"mappings":";;AA6FyC,6DAAqB;AAE9D,oCAcC;AA5GD,yCAGmB;AAqBnB,SAAS,IAAI,CAAmB,GAAgB,EAAE,GAAM;IACtD,OAAO,GAAG,IAAI,GAA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AC,OAAgB,CAAC,GAAG;YACzB,IAAI,EAAE,IAAI;YACV,EAAE,EAAE,OAAO,CAAC,OAAgB,CAAC;SAC9B,CAAA;IACH,CAAC;IAED,OAAO,MAA2C,CAAA;AACpD,CAAC"}
|
package/_esm/chain/id.js
CHANGED
package/_esm/chain/id.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"id.js","sourceRoot":"","sources":["../../chain/id.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAElD,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,GAAG,UAAU;IACb,GAAG,YAAY;IACf,GAAG,WAAW;CACN,CAAA"}
|
|
1
|
+
{"version":3,"file":"id.js","sourceRoot":"","sources":["../../chain/id.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAElD,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,GAAG,UAAU;IACb,GAAG,YAAY;IACf,GAAG,WAAW;CACN,CAAA;AAIV,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,OAAe,EAAsB,EAAE,CAC/D,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,OAAkB,CAAC,CAAA"}
|
|
@@ -26,7 +26,7 @@ function getSubgraphUrlWrapperWrapper(subgraphs) {
|
|
|
26
26
|
if (isIn(chainId, subgraphs.otherUrls)) {
|
|
27
27
|
return subgraphs.otherUrls[chainId];
|
|
28
28
|
}
|
|
29
|
-
|
|
29
|
+
return undefined;
|
|
30
30
|
}
|
|
31
31
|
return getSubgraphUrl;
|
|
32
32
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-subgraph-url.js","sourceRoot":"","sources":["../../../config/subgraph/get-subgraph-url.ts"],"names":[],"mappings":"AACA,OAAO,EACL,kCAAkC,EAClC,gCAAgC,GACjC,MAAM,YAAY,CAAA;
|
|
1
|
+
{"version":3,"file":"get-subgraph-url.js","sourceRoot":"","sources":["../../../config/subgraph/get-subgraph-url.ts"],"names":[],"mappings":"AACA,OAAO,EACL,kCAAkC,EAClC,gCAAgC,GACjC,MAAM,YAAY,CAAA;AAqBnB,SAAS,IAAI,CAAmB,GAAgB,EAAE,GAAM;IACtD,OAAO,GAAG,IAAI,GAAG,CAAA;AACnB,CAAC;AASD,2EAA2E;AAC3E,SAAS,4BAA4B,CAGnC,SAGD;IACC,0CAA0C;IAC1C,+FAA+F;IAC/F,SAAS,qBAAqB;QAM5B,gCAAgC;QAChC,SAAS,cAAc,CACrB,OAAqB;QACrB,iFAAiF;QACjF,GAAG,IAAyD;YAE5D,MAAM,CAAC,MAAM,CAAC,GAAG,IAAI,CAAA;YAErB,IAAI,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,gBAAgB,CAAC,EAAE,CAAC;gBAC9C,MAAM,OAAO,GAAG,MAAgC,CAAA;gBAEhD,MAAM,KAAK,GAAG,SAAS,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAA;gBAEjD,IAAI,KAAK,CAAC,IAAI,KAAK,cAAc,EAAE,CAAC;oBAClC,OAAO,GAAG,kCAAkC,CAC1C,OAAO,CAAC,gBAAgB,CACzB,IAAI,SAAS,CAAC,gBAAgB,CAAC,OAAO,CAAC,EAAE,CAAA;gBAC5C,CAAC;gBAED,IAAI,KAAK,CAAC,IAAI,KAAK,YAAY,EAAE,CAAC;oBAChC,OAAO,GAAG,gCAAgC,CACxC,OAAO,CAAC,gBAAgB,CACzB,IAAI,SAAS,CAAC,gBAAgB,CAAC,OAAO,CAAC,EAAE,CAAA;gBAC5C,CAAC;gBAED,MAAM,IAAI,KAAK,CAAC,uBAAuB,KAAK,CAAC,IAAI,EAAE,CAAC,CAAA;YACtD,CAAC;YAED,IAAI,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,SAAS,CAAC,EAAE,CAAC;gBACvC,OAAO,SAAS,CAAC,SAAS,CAAC,OAAO,CAAC,CAAA;YACrC,CAAC;YAED,OAAO,SAAwD,CAAA;QACjE,CAAC;QAED,OAAO,cAAc,CAAA;IACvB,CAAC;IAED,OAAO,qBAAqB,CAAA;AAC9B,CAAC;AAED,OAAO,EAAE,4BAA4B,IAAI,qBAAqB,EAAE,CAAA;AAEhE,MAAM,UAAU,YAAY,CAC1B,OAA8B,EAC9B,IAAgC;IAEhC,MAAM,MAAM,GAA+C,EAAE,CAAA;IAE7D,KAAK,MAAM,OAAO,IAAI,OAAO,EAAE,CAAC;QAC9B,MAAM,CAAC,OAAgB,CAAC,GAAG;YACzB,IAAI,EAAE,IAAI;YACV,EAAE,EAAE,OAAO,CAAC,OAAgB,CAAC;SAC9B,CAAA;IACH,CAAC;IAED,OAAO,MAA2C,CAAA;AACpD,CAAC"}
|
package/_types/chain/id.d.ts
CHANGED
package/_types/chain/id.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"id.d.ts","sourceRoot":"","sources":["../../chain/id.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAIV,CAAA;AAEV,MAAM,MAAM,OAAO,GAAG,CAAC,OAAO,OAAO,CAAC,CAAC,MAAM,OAAO,OAAO,CAAC,CAAA"}
|
|
1
|
+
{"version":3,"file":"id.d.ts","sourceRoot":"","sources":["../../chain/id.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAIV,CAAA;AAEV,MAAM,MAAM,OAAO,GAAG,CAAC,OAAO,OAAO,CAAC,CAAC,MAAM,OAAO,OAAO,CAAC,CAAA;AAE5D,eAAO,MAAM,SAAS,YAAa,MAAM,KAAG,OAAO,IAAI,OACF,CAAA"}
|
|
@@ -6,6 +6,7 @@ type DecentralizedKey<IncludeKey extends boolean> = IncludeKey extends true ? {
|
|
|
6
6
|
};
|
|
7
7
|
type Config<IncludeKey extends boolean> = DecentralizedKey<IncludeKey>;
|
|
8
8
|
type Rest<IncludeKey extends boolean> = IncludeKey extends true ? [config: Config<IncludeKey>] : [config?: Config<IncludeKey>];
|
|
9
|
+
type Result<PASSED_CHAIN extends ChainId, SUPPORTED_CHAINS extends ChainId> = PASSED_CHAIN extends SUPPORTED_CHAINS ? string : string | undefined;
|
|
9
10
|
type DecentralizedEntry = {
|
|
10
11
|
type: 'subgraphId' | 'deploymentId';
|
|
11
12
|
id: string;
|
|
@@ -14,7 +15,7 @@ type _COMPLETENESS = 'COMPLETE' | 'PARTIAL';
|
|
|
14
15
|
declare function getSubgraphUrlWrapperWrapper<DECENTRALIZED extends ChainId, OTHER extends ChainId>(subgraphs: {
|
|
15
16
|
decentralizedIds: Record<DECENTRALIZED, DecentralizedEntry>;
|
|
16
17
|
otherUrls: Record<OTHER, string>;
|
|
17
|
-
}): <CHAINS extends COMPLETENESS extends "COMPLETE" ? DECENTRALIZED | OTHER : ChainId, COMPLETENESS extends _COMPLETENESS>() => <PASSED_CHAIN extends CHAINS
|
|
18
|
+
}): <CHAINS extends COMPLETENESS extends "COMPLETE" ? DECENTRALIZED | OTHER : ChainId, COMPLETENESS extends _COMPLETENESS>() => <PASSED_CHAIN extends CHAINS>(chainId: PASSED_CHAIN, ...rest: Rest<[PASSED_CHAIN] extends [OTHER] ? false : true>) => Result<PASSED_CHAIN, DECENTRALIZED | OTHER>;
|
|
18
19
|
export { getSubgraphUrlWrapperWrapper as getSubgraphUrlWrapper };
|
|
19
20
|
export declare function wrapAsIdType<CHAIN extends ChainId>(entries: Record<CHAIN, string>, type: DecentralizedEntry['type']): Record<CHAIN, DecentralizedEntry>;
|
|
20
21
|
//# sourceMappingURL=get-subgraph-url.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-subgraph-url.d.ts","sourceRoot":"","sources":["../../../config/subgraph/get-subgraph-url.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAMnD,KAAK,gBAAgB,CAAC,UAAU,SAAS,OAAO,IAAI,UAAU,SAAS,IAAI,GACvE;IACE,gBAAgB,EAAE,MAAM,CAAA;CACzB,GACD;IACE,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAC1B,CAAA;AAEL,KAAK,MAAM,CAAC,UAAU,SAAS,OAAO,IAAI,gBAAgB,CAAC,UAAU,CAAC,CAAA;AAEtE,KAAK,IAAI,CAAC,UAAU,SAAS,OAAO,IAAI,UAAU,SAAS,IAAI,GAC3D,CAAC,MAAM,EAAE,MAAM,CAAC,UAAU,CAAC,CAAC,GAC5B,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC,CAAC,CAAA;
|
|
1
|
+
{"version":3,"file":"get-subgraph-url.d.ts","sourceRoot":"","sources":["../../../config/subgraph/get-subgraph-url.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAMnD,KAAK,gBAAgB,CAAC,UAAU,SAAS,OAAO,IAAI,UAAU,SAAS,IAAI,GACvE;IACE,gBAAgB,EAAE,MAAM,CAAA;CACzB,GACD;IACE,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAC1B,CAAA;AAEL,KAAK,MAAM,CAAC,UAAU,SAAS,OAAO,IAAI,gBAAgB,CAAC,UAAU,CAAC,CAAA;AAEtE,KAAK,IAAI,CAAC,UAAU,SAAS,OAAO,IAAI,UAAU,SAAS,IAAI,GAC3D,CAAC,MAAM,EAAE,MAAM,CAAC,UAAU,CAA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
|
1
|
+
export declare const getBentoBoxSubgraphUrl: <PASSED_CHAIN extends 1 | 10 | 56 | 100 | 122 | 128 | 137 | 199 | 250 | 288 | 1088 | 1284 | 1285 | 2222 | 42161 | 42170 | 42220 | 43114 | 43288 | 56288 | 1666600000>(chainId: PASSED_CHAIN, ...rest: ([PASSED_CHAIN] extends [199] ? false : true) extends infer T ? T extends ([PASSED_CHAIN] extends [199] ? false : true) ? T extends true ? [config: T extends infer T_1 ? T_1 extends T ? T_1 extends true ? {
|
|
2
2
|
decentralizedKey: string;
|
|
3
3
|
} : {
|
|
4
4
|
decentralizedKey?: string;
|
|
@@ -6,5 +6,5 @@ export declare const getBentoBoxSubgraphUrl: <PASSED_CHAIN extends 1 | 10 | 56 |
|
|
|
6
6
|
decentralizedKey: string;
|
|
7
7
|
} : {
|
|
8
8
|
decentralizedKey?: string;
|
|
9
|
-
}] : never : never) => string;
|
|
9
|
+
}] : never : never) => PASSED_CHAIN extends 1 | 10 | 56 | 100 | 137 | 199 | 250 | 1284 | 1285 | 42161 | 42220 | 43114 | 1666600000 ? string : string | undefined;
|
|
10
10
|
//# sourceMappingURL=bentobox.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bentobox.d.ts","sourceRoot":"","sources":["../../../../config/subgraph/subgraphs/bentobox.ts"],"names":[],"mappings":"AAwBA,eAAO,MAAM,sBAAsB;;;;;;;;
|
|
1
|
+
{"version":3,"file":"bentobox.d.ts","sourceRoot":"","sources":["../../../../config/subgraph/subgraphs/bentobox.ts"],"names":[],"mappings":"AAwBA,eAAO,MAAM,sBAAsB;;;;;;;;gKAGH,CAAA"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { EvmChainId } from '../../../chain/index.js';
|
|
2
|
+
export declare const getBlocksSubgraphUrl: <PASSED_CHAIN extends EvmChainId>(chainId: PASSED_CHAIN, ...rest: ([PASSED_CHAIN] extends [30 | 108 | 199 | 314 | 1088 | 1116 | 2222 | 7000 | 11235 | 42170 | 56288 | 81457 | 2046399126] ? false : true) extends infer T ? T extends ([PASSED_CHAIN] extends [30 | 108 | 199 | 314 | 1088 | 1116 | 2222 | 7000 | 11235 | 42170 | 56288 | 81457 | 2046399126] ? false : true) ? T extends true ? [config: T extends infer T_1 ? T_1 extends T ? T_1 extends true ? {
|
|
2
3
|
decentralizedKey: string;
|
|
3
4
|
} : {
|
|
4
5
|
decentralizedKey?: string;
|
|
@@ -6,5 +7,5 @@ export declare const getBlocksSubgraphUrl: <PASSED_CHAIN extends 1 | 10 | 30 | 5
|
|
|
6
7
|
decentralizedKey: string;
|
|
7
8
|
} : {
|
|
8
9
|
decentralizedKey?: string;
|
|
9
|
-
}] : never : never) => string;
|
|
10
|
+
}] : never : never) => PASSED_CHAIN extends 1 | 10 | 30 | 56 | 100 | 108 | 122 | 137 | 146 | 199 | 250 | 288 | 314 | 1088 | 1101 | 1116 | 1284 | 1285 | 2222 | 7000 | 8453 | 11235 | 42161 | 42170 | 42220 | 43111 | 43114 | 56288 | 59144 | 81457 | 534352 | 1666600000 | 2046399126 ? string : string | undefined;
|
|
10
11
|
//# sourceMappingURL=blocks.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blocks.d.ts","sourceRoot":"","sources":["../../../../config/subgraph/subgraphs/blocks.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"blocks.d.ts","sourceRoot":"","sources":["../../../../config/subgraph/subgraphs/blocks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AAyDpD,eAAO,MAAM,oBAAoB;;;;;;;;mTAGN,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const getFuroSubgraphUrl: <PASSED_CHAIN extends 1 | 10 | 56 | 100 | 108 | 137 | 199 | 250 | 1116 | 1284 | 1285 | 11235 | 42161 | 43114 | 1666600000>(chainId: PASSED_CHAIN, ...rest: (PASSED_CHAIN extends
|
|
1
|
+
export declare const getFuroSubgraphUrl: <PASSED_CHAIN extends 1 | 10 | 56 | 100 | 108 | 137 | 199 | 250 | 1116 | 1284 | 1285 | 11235 | 42161 | 43114 | 1666600000>(chainId: PASSED_CHAIN, ...rest: ([PASSED_CHAIN] extends [108 | 199 | 1116 | 11235] ? false : true) extends infer T ? T extends ([PASSED_CHAIN] extends [108 | 199 | 1116 | 11235] ? false : true) ? T extends true ? [config: T extends infer T_1 ? T_1 extends T ? T_1 extends true ? {
|
|
2
2
|
decentralizedKey: string;
|
|
3
3
|
} : {
|
|
4
4
|
decentralizedKey?: string;
|
|
@@ -6,5 +6,5 @@ export declare const getFuroSubgraphUrl: <PASSED_CHAIN extends 1 | 10 | 56 | 100
|
|
|
6
6
|
decentralizedKey: string;
|
|
7
7
|
} : {
|
|
8
8
|
decentralizedKey?: string;
|
|
9
|
-
}] : never : never) => string;
|
|
9
|
+
}] : never : never) => PASSED_CHAIN extends 1 | 10 | 56 | 100 | 108 | 137 | 199 | 250 | 1116 | 1284 | 1285 | 11235 | 42161 | 43114 | 1666600000 ? string : string | undefined;
|
|
10
10
|
//# sourceMappingURL=furo.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"furo.d.ts","sourceRoot":"","sources":["../../../../config/subgraph/subgraphs/furo.ts"],"names":[],"mappings":"AA+BA,eAAO,MAAM,kBAAkB;;;;;;;;
|
|
1
|
+
{"version":3,"file":"furo.d.ts","sourceRoot":"","sources":["../../../../config/subgraph/subgraphs/furo.ts"],"names":[],"mappings":"AA+BA,eAAO,MAAM,kBAAkB;;;;;;;;6KAGF,CAAA"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { ChainId } from '../../../chain/id.js';
|
|
2
|
+
export declare const getMasterChefV1SubgraphUrl: <PASSED_CHAIN extends ChainId>(chainId: PASSED_CHAIN, ...rest: ([PASSED_CHAIN] extends [never] ? false : true) extends infer T ? T extends ([PASSED_CHAIN] extends [never] ? false : true) ? T extends true ? [config: T extends infer T_1 ? T_1 extends T ? T_1 extends true ? {
|
|
2
3
|
decentralizedKey: string;
|
|
3
4
|
} : {
|
|
4
5
|
decentralizedKey?: string;
|
|
@@ -6,5 +7,5 @@ export declare const getMasterChefV1SubgraphUrl: <PASSED_CHAIN extends 1>(chainI
|
|
|
6
7
|
decentralizedKey: string;
|
|
7
8
|
} : {
|
|
8
9
|
decentralizedKey?: string;
|
|
9
|
-
}] : never : never) => string;
|
|
10
|
+
}] : never : never) => PASSED_CHAIN extends 1 ? string : string | undefined;
|
|
10
11
|
//# sourceMappingURL=master-chef-v1.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"master-chef-v1.d.ts","sourceRoot":"","sources":["../../../../config/subgraph/subgraphs/master-chef-v1.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"master-chef-v1.d.ts","sourceRoot":"","sources":["../../../../config/subgraph/subgraphs/master-chef-v1.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAG9C,eAAO,MAAM,0BAA0B;;;;;;;;2EAQnC,CAAA"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { ChainId } from '../../../chain/id.js';
|
|
2
|
+
export declare const getMasterChefV2SubgraphUrl: <PASSED_CHAIN extends ChainId>(chainId: PASSED_CHAIN, ...rest: ([PASSED_CHAIN] extends [never] ? false : true) extends infer T ? T extends ([PASSED_CHAIN] extends [never] ? false : true) ? T extends true ? [config: T extends infer T_1 ? T_1 extends T ? T_1 extends true ? {
|
|
2
3
|
decentralizedKey: string;
|
|
3
4
|
} : {
|
|
4
5
|
decentralizedKey?: string;
|
|
@@ -6,5 +7,5 @@ export declare const getMasterChefV2SubgraphUrl: <PASSED_CHAIN extends 1>(chainI
|
|
|
6
7
|
decentralizedKey: string;
|
|
7
8
|
} : {
|
|
8
9
|
decentralizedKey?: string;
|
|
9
|
-
}] : never : never) => string;
|
|
10
|
+
}] : never : never) => PASSED_CHAIN extends 1 ? string : string | undefined;
|
|
10
11
|
//# sourceMappingURL=master-chef-v2.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"master-chef-v2.d.ts","sourceRoot":"","sources":["../../../../config/subgraph/subgraphs/master-chef-v2.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"master-chef-v2.d.ts","sourceRoot":"","sources":["../../../../config/subgraph/subgraphs/master-chef-v2.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAG9C,eAAO,MAAM,0BAA0B;;;;;;;;2EAQnC,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const getMiniChefSubgraphUrl: <PASSED_CHAIN extends 10 | 56 | 100 | 122 | 137 | 199 | 250 | 288 | 1088 | 1284 | 1285 | 2222 | 42161 | 42170 | 42220 | 43114>(chainId: PASSED_CHAIN, ...rest: (PASSED_CHAIN extends
|
|
1
|
+
export declare const getMiniChefSubgraphUrl: <PASSED_CHAIN extends 10 | 56 | 100 | 122 | 137 | 199 | 250 | 288 | 1088 | 1284 | 1285 | 2222 | 42161 | 42170 | 42220 | 43114>(chainId: PASSED_CHAIN, ...rest: ([PASSED_CHAIN] extends [199 | 1088 | 2222 | 42170] ? false : true) extends infer T ? T extends ([PASSED_CHAIN] extends [199 | 1088 | 2222 | 42170] ? false : true) ? T extends true ? [config: T extends infer T_1 ? T_1 extends T ? T_1 extends true ? {
|
|
2
2
|
decentralizedKey: string;
|
|
3
3
|
} : {
|
|
4
4
|
decentralizedKey?: string;
|
|
@@ -6,5 +6,5 @@ export declare const getMiniChefSubgraphUrl: <PASSED_CHAIN extends 10 | 56 | 100
|
|
|
6
6
|
decentralizedKey: string;
|
|
7
7
|
} : {
|
|
8
8
|
decentralizedKey?: string;
|
|
9
|
-
}] : never : never) => string;
|
|
9
|
+
}] : never : never) => PASSED_CHAIN extends 10 | 56 | 100 | 122 | 137 | 199 | 250 | 288 | 1088 | 1284 | 1285 | 2222 | 42161 | 42170 | 42220 | 43114 ? string : string | undefined;
|
|
10
10
|
//# sourceMappingURL=mini-chef.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mini-chef.d.ts","sourceRoot":"","sources":["../../../../config/subgraph/subgraphs/mini-chef.ts"],"names":[],"mappings":"AA4BA,eAAO,MAAM,sBAAsB;;;;;;;;
|
|
1
|
+
{"version":3,"file":"mini-chef.d.ts","sourceRoot":"","sources":["../../../../config/subgraph/subgraphs/mini-chef.ts"],"names":[],"mappings":"AA4BA,eAAO,MAAM,sBAAsB;;;;;;;;iLAGF,CAAA"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { ChainId } from '../../../chain/id.js';
|
|
2
|
+
export declare const getSushiBarSubgraphUrl: <PASSED_CHAIN extends ChainId>(chainId: PASSED_CHAIN, ...rest: ([PASSED_CHAIN] extends [never] ? false : true) extends infer T ? T extends ([PASSED_CHAIN] extends [never] ? false : true) ? T extends true ? [config: T extends infer T_1 ? T_1 extends T ? T_1 extends true ? {
|
|
2
3
|
decentralizedKey: string;
|
|
3
4
|
} : {
|
|
4
5
|
decentralizedKey?: string;
|
|
@@ -6,5 +7,5 @@ export declare const getSushiBarSubgraphUrl: <PASSED_CHAIN extends 1>(chainId: P
|
|
|
6
7
|
decentralizedKey: string;
|
|
7
8
|
} : {
|
|
8
9
|
decentralizedKey?: string;
|
|
9
|
-
}] : never : never) => string;
|
|
10
|
+
}] : never : never) => PASSED_CHAIN extends 1 ? string : string | undefined;
|
|
10
11
|
//# sourceMappingURL=sushi-bar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sushi-bar.d.ts","sourceRoot":"","sources":["../../../../config/subgraph/subgraphs/sushi-bar.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sushi-bar.d.ts","sourceRoot":"","sources":["../../../../config/subgraph/subgraphs/sushi-bar.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAG9C,eAAO,MAAM,sBAAsB;;;;;;;;2EAQ/B,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const getSushiSwapV2SubgraphUrl: <PASSED_CHAIN extends 1 | 10 | 30 | 56 | 100 | 108 | 122 | 137 | 146 | 199 | 250 | 288 | 314 | 1088 | 1101 | 1116 | 1284 | 1285 | 2222 | 7000 | 8453 | 11235 | 42161 | 42170 | 42220 | 43111 | 43114 | 56288 | 59144 | 81457 | 534352 | 11155111 | 1666600000 | 2046399126>(chainId: PASSED_CHAIN, ...rest: (PASSED_CHAIN extends
|
|
1
|
+
export declare const getSushiSwapV2SubgraphUrl: <PASSED_CHAIN extends 1 | 10 | 30 | 56 | 100 | 108 | 122 | 137 | 146 | 199 | 250 | 288 | 314 | 1088 | 1101 | 1116 | 1284 | 1285 | 2222 | 7000 | 8453 | 11235 | 42161 | 42170 | 42220 | 43111 | 43114 | 56288 | 59144 | 81457 | 534352 | 11155111 | 1666600000 | 2046399126>(chainId: PASSED_CHAIN, ...rest: ([PASSED_CHAIN] extends [30 | 108 | 199 | 314 | 1088 | 1116 | 2222 | 7000 | 11235 | 42170 | 56288 | 81457 | 11155111 | 2046399126] ? false : true) extends infer T ? T extends ([PASSED_CHAIN] extends [30 | 108 | 199 | 314 | 1088 | 1116 | 2222 | 7000 | 11235 | 42170 | 56288 | 81457 | 11155111 | 2046399126] ? false : true) ? T extends true ? [config: T extends infer T_1 ? T_1 extends T ? T_1 extends true ? {
|
|
2
2
|
decentralizedKey: string;
|
|
3
3
|
} : {
|
|
4
4
|
decentralizedKey?: string;
|
|
@@ -6,5 +6,5 @@ export declare const getSushiSwapV2SubgraphUrl: <PASSED_CHAIN extends 1 | 10 | 3
|
|
|
6
6
|
decentralizedKey: string;
|
|
7
7
|
} : {
|
|
8
8
|
decentralizedKey?: string;
|
|
9
|
-
}] : never : never) => string;
|
|
9
|
+
}] : never : never) => PASSED_CHAIN extends 1 | 10 | 30 | 56 | 100 | 108 | 122 | 137 | 146 | 199 | 250 | 288 | 314 | 1088 | 1101 | 1116 | 1284 | 1285 | 2222 | 7000 | 8453 | 11235 | 42161 | 42170 | 42220 | 43111 | 43114 | 56288 | 59144 | 81457 | 534352 | 11155111 | 1666600000 | 2046399126 ? string : string | undefined;
|
|
10
10
|
//# sourceMappingURL=sushiswap-v2.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sushiswap-v2.d.ts","sourceRoot":"","sources":["../../../../config/subgraph/subgraphs/sushiswap-v2.ts"],"names":[],"mappings":"AAyDA,eAAO,MAAM,yBAAyB;;;;;;;;
|
|
1
|
+
{"version":3,"file":"sushiswap-v2.d.ts","sourceRoot":"","sources":["../../../../config/subgraph/subgraphs/sushiswap-v2.ts"],"names":[],"mappings":"AAyDA,eAAO,MAAM,yBAAyB;;;;;;;;8TAMF,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const getSushiSwapV3SubgraphUrl: <PASSED_CHAIN extends 1 | 10 | 30 | 56 | 100 | 108 | 122 | 137 | 146 | 199 | 250 | 288 | 314 | 1088 | 1101 | 1116 | 1285 | 2222 | 7000 | 8453 | 11235 | 42161 | 42170 | 43111 | 43114 | 59144 | 81457 | 534352 | 2046399126>(chainId: PASSED_CHAIN, ...rest: (PASSED_CHAIN extends
|
|
1
|
+
export declare const getSushiSwapV3SubgraphUrl: <PASSED_CHAIN extends 1 | 10 | 30 | 56 | 100 | 108 | 122 | 137 | 146 | 199 | 250 | 288 | 314 | 1088 | 1101 | 1116 | 1285 | 2222 | 7000 | 8453 | 11235 | 42161 | 42170 | 43111 | 43114 | 59144 | 81457 | 534352 | 2046399126>(chainId: PASSED_CHAIN, ...rest: ([PASSED_CHAIN] extends [30 | 108 | 199 | 314 | 1088 | 1116 | 2222 | 7000 | 11235 | 42170 | 81457 | 2046399126] ? false : true) extends infer T ? T extends ([PASSED_CHAIN] extends [30 | 108 | 199 | 314 | 1088 | 1116 | 2222 | 7000 | 11235 | 42170 | 81457 | 2046399126] ? false : true) ? T extends true ? [config: T extends infer T_1 ? T_1 extends T ? T_1 extends true ? {
|
|
2
2
|
decentralizedKey: string;
|
|
3
3
|
} : {
|
|
4
4
|
decentralizedKey?: string;
|
|
@@ -6,5 +6,5 @@ export declare const getSushiSwapV3SubgraphUrl: <PASSED_CHAIN extends 1 | 10 | 3
|
|
|
6
6
|
decentralizedKey: string;
|
|
7
7
|
} : {
|
|
8
8
|
decentralizedKey?: string;
|
|
9
|
-
}] : never : never) => string;
|
|
9
|
+
}] : never : never) => PASSED_CHAIN extends 1 | 10 | 30 | 56 | 100 | 108 | 122 | 137 | 146 | 199 | 250 | 288 | 314 | 1088 | 1101 | 1116 | 1285 | 2222 | 7000 | 8453 | 11235 | 42161 | 42170 | 43111 | 43114 | 59144 | 81457 | 534352 | 2046399126 ? string : string | undefined;
|
|
10
10
|
//# sourceMappingURL=sushiswap-v3.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sushiswap-v3.d.ts","sourceRoot":"","sources":["../../../../config/subgraph/subgraphs/sushiswap-v3.ts"],"names":[],"mappings":"AAoDA,eAAO,MAAM,yBAAyB
|
|
1
|
+
{"version":3,"file":"sushiswap-v3.d.ts","sourceRoot":"","sources":["../../../../config/subgraph/subgraphs/sushiswap-v3.ts"],"names":[],"mappings":"AAoDA,eAAO,MAAM,yBAAyB;;;;;;;;+QAMF,CAAA"}
|
package/chain/id.ts
CHANGED
|
@@ -18,6 +18,11 @@ type Rest<IncludeKey extends boolean> = IncludeKey extends true
|
|
|
18
18
|
? [config: Config<IncludeKey>]
|
|
19
19
|
: [config?: Config<IncludeKey>]
|
|
20
20
|
|
|
21
|
+
type Result<
|
|
22
|
+
PASSED_CHAIN extends ChainId,
|
|
23
|
+
SUPPORTED_CHAINS extends ChainId,
|
|
24
|
+
> = PASSED_CHAIN extends SUPPORTED_CHAINS ? string : string | undefined
|
|
25
|
+
|
|
21
26
|
function isIn<T extends object>(key: PropertyKey, obj: T): key is keyof T {
|
|
22
27
|
return key in obj
|
|
23
28
|
}
|
|
@@ -46,13 +51,11 @@ function getSubgraphUrlWrapperWrapper<
|
|
|
46
51
|
COMPLETENESS extends _COMPLETENESS,
|
|
47
52
|
>() {
|
|
48
53
|
// Handles the actual url lookup
|
|
49
|
-
function getSubgraphUrl<
|
|
50
|
-
PASSED_CHAIN extends CHAINS & (DECENTRALIZED | OTHER),
|
|
51
|
-
>(
|
|
54
|
+
function getSubgraphUrl<PASSED_CHAIN extends CHAINS>(
|
|
52
55
|
chainId: PASSED_CHAIN,
|
|
53
56
|
// Require the decentralized key only if the subgraph is on decentralized network
|
|
54
|
-
...rest: Rest<PASSED_CHAIN extends
|
|
55
|
-
) {
|
|
57
|
+
...rest: Rest<[PASSED_CHAIN] extends [OTHER] ? false : true>
|
|
58
|
+
): Result<PASSED_CHAIN, DECENTRALIZED | OTHER> {
|
|
56
59
|
const [config] = rest
|
|
57
60
|
|
|
58
61
|
if (isIn(chainId, subgraphs.decentralizedIds)) {
|
|
@@ -79,7 +82,7 @@ function getSubgraphUrlWrapperWrapper<
|
|
|
79
82
|
return subgraphs.otherUrls[chainId]
|
|
80
83
|
}
|
|
81
84
|
|
|
82
|
-
|
|
85
|
+
return undefined as Result<PASSED_CHAIN, DECENTRALIZED | OTHER>
|
|
83
86
|
}
|
|
84
87
|
|
|
85
88
|
return getSubgraphUrl
|