File tree Expand file tree Collapse file tree 1 file changed +8
-18
lines changed Expand file tree Collapse file tree 1 file changed +8
-18
lines changed Original file line number Diff line number Diff line change @@ -7,24 +7,14 @@ module.exports = {
7
7
}
8
8
9
9
async function tvl ( api ) {
10
- let { balancers } = await cachedGraphQuery ( 'jellyverse' , 'https://graph.mainnet.jellyverse.org/subgraphs/name/jelly/verse' , `{
11
- balancers {
12
- pools {
13
- address
14
- tokens {
15
- symbol
16
- address
17
- }
18
- }
10
+ let tokens = await cachedGraphQuery ( 'jellyverse' , 'https://graph.mainnet.jellyverse.org/subgraphs/name/jelly/verse' , `query q($lastId: ID){
11
+ tokens (where: {id_gt: $lastId} first: 1000) {
12
+ id
13
+ address
14
+ pool { id }
19
15
}
20
- }` )
16
+ }` , { fetchById : true } )
21
17
const vault = "0xFB43069f6d0473B85686a85F4Ce4Fc1FD8F00875"
22
- const blacklistedTokens = [ ]
23
- const tokens = balancers . map ( i => {
24
- blacklistedTokens . push ( ...i . pools . map ( j => j . address ) )
25
- return i . pools . map ( j => {
26
- return j . tokens . map ( k => k . address )
27
- } ) . flat ( )
28
- } ) . flat ( )
29
- return api . sumTokens ( { owner : vault , tokens, blacklistedTokens, } )
18
+ tokens = tokens . filter ( t => ! t . pool ) . map ( t => t . address )
19
+ return api . sumTokens ( { owner : vault , tokens } )
30
20
}
You can’t perform that action at this time.
0 commit comments