Skip to content

Commit

Permalink
feat: add solana tvl for astherus
Browse files Browse the repository at this point in the history
  • Loading branch information
langyoung authored and bryan-y-20230331 committed Aug 13, 2024
1 parent 47b1a09 commit 1a87c44
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions projects/astherus/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const { getConfig } = require('../helper/cache')
const { sumTokens2 } = require('../helper/solana')

const config = {
bsc: '0x128463A60784c4D3f46c23Af3f65Ed859Ba87974',
Expand All @@ -19,3 +20,10 @@ Object.keys(config).forEach(chain => {
}
}
})

module.exports['solana'] = {
tvl: async function (...rest) {
const { data: tokens } = await getConfig(`astherus/solana`, `https://astherus.finance/bapi/futures/v1/public/future/web3/ae-deposit-asset?network=SOL`)
return sumTokens2({ tokenAccounts: tokens.map(({ tokenVault }) => [tokenVault]).flat() })
}
}

0 comments on commit 1a87c44

Please sign in to comment.