Skip to content

Commit

Permalink
fix jellyverse
Browse files Browse the repository at this point in the history
  • Loading branch information
g1nt0ki authored and tlatkdgus1 committed Nov 25, 2024
1 parent e02b69e commit bc72ba5
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions projects/jellyverse/index.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
const { onChainTvl } = require('../helper/balancer')

const config = {
vault: "0xFB43069f6d0473B85686a85F4Ce4Fc1FD8F00875",
startingBlock: 81_247_457,
};
const { cachedGraphQuery } = require('../helper/cache')

module.exports = {
sei: {
tvl: onChainTvl(config.vault, config.startingBlock, {
preLogTokens: [
'0x3894085Ef7Ff0f0aeDf52E2A2704928d1Ec074F1',
'0xB75D0B03c06A926e488e2659DF1A861F860bD3d1',
'0x5f0E07dFeE5832Faa00c63F2D33A0D79150E8598',
'0x5Cf6826140C1C56Ff49C808A1A75407Cd1DF9423',
]
}),
tvl,
}
}

async function tvl(api) {
let { tokens } = await cachedGraphQuery('jellyverse', 'https://graph.mainnet.jellyverse.org/subgraphs/name/jelly/verse', `{
tokens {
address
symbol
pool { id }
}
}`)
const vault = "0xFB43069f6d0473B85686a85F4Ce4Fc1FD8F00875"
tokens = tokens.filter(t => !t.pool).map(t => t.address)
return api.sumTokens({ owner: vault, tokens })
}

0 comments on commit bc72ba5

Please sign in to comment.