Skip to content

Commit

Permalink
Keller Sprinkler Information added (CL)
Browse files Browse the repository at this point in the history
  • Loading branch information
0xArata committed May 10, 2024
1 parent 269ec14 commit f7fef2c
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 1 deletion.
40 changes: 40 additions & 0 deletions projects/keller-CL/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
const { default: axios } = require('axios')

async function tvl(api) {
const data = await axios.get('https://api.steer.finance/getSmartPools?chainId=534352&dexName=equilibre')
const pools = data.data;
const vaults = Object.values(pools.pools).flatMap(pool => pool.map(obj => obj.vaultAddress));
const bals = await api.multiCall({
abi: "function getTotalAmounts() view returns (uint256 total0, uint256 total1)",
calls: vaults,
permitFailure: true,
})
const token0s = await api.multiCall({
abi: "address:token0",
calls: vaults,
permitFailure: true,
})
const token1s = await api.multiCall({
abi: "address:token1",
calls: vaults,
permitFailure: true,
})
bals.forEach((bal, i) => {
const token0 = token0s[i]
const token1 = token1s[i]
if (!bal || !token0 || !token1) return // skip failures
api.add(token0, bal.total0)
api.add(token1, bal.total1)
})
return api.getBalances()

}

module.exports = {
misrepresentedTokens: true,
methodology: 'TVL shows the sum of all the assets deposited in the vaults provided by our ALM partners.',
scroll: {
tvl,
},
}

2 changes: 1 addition & 1 deletion projects/keller/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const { getUniTVL } = require('../helper/cache/uniswap.js')
const { staking } = require('../helper/staking.js')
const { staking } = require('../helper/staking.js');

module.exports = {
misrepresentedTokens: true,
Expand Down

0 comments on commit f7fef2c

Please sign in to comment.