diff --git a/projects/astherus/index.js b/projects/astherus/index.js index e3e924285ffb..de07fb304d71 100644 --- a/projects/astherus/index.js +++ b/projects/astherus/index.js @@ -1,4 +1,5 @@ const { getConfig } = require('../helper/cache') +const { sumTokens2 } = require('../helper/solana') const config = { bsc: '0x128463A60784c4D3f46c23Af3f65Ed859Ba87974', @@ -18,4 +19,11 @@ Object.keys(config).forEach(chain => { return api.sumTokens({ owner: vault, tokens }) } } -}) \ No newline at end of file +}) + +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() }) + } +}