Skip to content

Commit

Permalink
feat: add solana tvl for astherus (#11271)
Browse files Browse the repository at this point in the history
* feat: add astherus

* feat: add solana tvl for astherus
  • Loading branch information
langyoung authored Aug 13, 2024
1 parent 95b5406 commit 49cfb6c
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion 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 @@ -18,4 +19,11 @@ Object.keys(config).forEach(chain => {
return api.sumTokens({ owner: vault, tokens })
}
}
})
})

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 49cfb6c

Please sign in to comment.