Skip to content

Commit d070986

Browse files
committed
feat: using cachedGraphQuery
1 parent 4084102 commit d070986

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

projects/frankencoin/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const { sumTokens2 } = require('../helper/unwrapLPs');
2-
const { graphQuery } = require('../helper/http');
2+
const { cachedGraphQuery } = require('../helper/cache')
33

44
// @dev: mapping of XCHF to its Bridge
55
const XCHFBridge = ["0xb4272071ecadd69d933adcd19ca99fe80664fc08", "0x7bbe8F18040aF0032f4C2435E7a76db6F1E346DF"];
@@ -8,8 +8,8 @@ async function tvl(api) {
88
const tokensAndOwners = [XCHFBridge];
99

1010
// @dev: query of positions from minting hubs via frankencoin graph (ponder)
11-
const { positionV1s } = await graphQuery('https://ponder.frankencoin.com/', '{ positionV1s { items { position collateral } } }');
12-
const { positionV2s } = await graphQuery('https://ponder.frankencoin.com/', '{ positionV2s { items { position collateral } } }');
11+
const { positionV1s } = await cachedGraphQuery('frankencoinV1', 'https://ponder.frankencoin.com', '{ positionV1s { items { position collateral } } }');
12+
const { positionV2s } = await cachedGraphQuery('frankencoinV2', 'https://ponder.frankencoin.com', '{ positionV2s { items { position collateral } } }');
1313

1414
// @dev: mapping of positions from minting hubs
1515
positionV1s?.items?.forEach(i => tokensAndOwners.push([i.collateral, i.position]));

0 commit comments

Comments
 (0)