Skip to content

Commit f90cfa7

Browse files
committed
1 parent 21c57dd commit f90cfa7

File tree

3 files changed

+15
-14
lines changed

3 files changed

+15
-14
lines changed

projects/core-markets/index.js

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
const ADDRESSES = require('../helper/coreAssets.json')
2-
const { request, gql } = require("graphql-request");
2+
const { request, } = require("graphql-request");
33

44
const graphUrl = "https://api.studio.thegraph.com/query/62472/core-analytics-082/version/latest";
55

66
const BETA_START = 236678;
77

8-
const query = gql`
8+
const query = `
99
query stats($from: String!, $to: String!) {
1010
dailyHistories(
1111
where: { timestamp_gte: $from, timestamp_lte: $to, accountSource: "0xd6ee1fd75d11989e57B57AA6Fd75f558fBf02a5e" }
@@ -20,25 +20,18 @@ const query = gql`
2020
}
2121
`;
2222

23-
async function getTVL(toTimestamp) {
23+
async function getTVL(api) {
2424
const { dailyHistories } = await request(graphUrl, query, {
2525
from: BETA_START.toString(),
26-
to: toTimestamp.timestamp.toString(),
26+
to: api.timestamp.toString(),
2727
});
2828

2929
const total = dailyHistories.reduce((acc, cur) => acc + (Number(cur.deposit) - Number(cur.withdraw)), 0);
30-
31-
return {
32-
["blast:" + ADDRESSES.blast.USDB]: total,
33-
};
30+
api.add(ADDRESSES.blast.USDB, total)
3431
}
3532

3633
module.exports = {
3734
timetravel: false,
3835
start: BETA_START,
39-
blast: {
40-
tvl: async (timestamp) => {
41-
return getTVL(timestamp);
42-
},
43-
},
36+
blast: { tvl: getTVL },
4437
};

projects/eesee/index.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
const { sumTokensExport } = require('../helper/unwrapLPs')
2+
const ADDRESSES = require('../helper/coreAssets.json')
3+
4+
module.exports = {
5+
blast: {
6+
tvl: sumTokensExport({ owner: '0xa247CfF2a50dE0328a0A5bdD0C563Bd44b1a8af9', tokens: [ADDRESSES.blast.USDB, ]}),
7+
},
8+
}

projects/intentx.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ module.exports = {
4747
module.exports = {
4848
timetravel: false,
4949
start: BETA_START,
50-
blast: { tvl: getTVL },
50+
// blast: { tvl: getTVL },
5151
base: { tvl: getTVL },
5252
hallmarks: [[1700006400, "Open Beta Start"], [1704200400, "0.8.2 Migration"]],
5353
};

0 commit comments

Comments
 (0)