mirror of
https://github.com/alexgo-io/DefiLlama-Adapters.git
synced 2026-04-29 21:36:44 +08:00
Fix: Evaa (#14613)
This commit is contained in:
@@ -3,11 +3,18 @@ const ADDRESSES = require('../helper/coreAssets.json')
|
||||
const { call, sumTokens } = require("../helper/chain/ton");
|
||||
const evaaPoolAssets = require("./evaaPoolAssets");
|
||||
|
||||
const sleep = (ms) => new Promise(resolve => setTimeout(resolve, ms))
|
||||
|
||||
async function borrowed(api) {
|
||||
for (const poolAssets of Object.values(evaaPoolAssets)) {
|
||||
for (const { assetId, address } of poolAssets.assets) {
|
||||
const [_totalSupply, totalBorrow] = await call({ target: poolAssets.poolAddress, abi: 'getAssetTotals', params: [["int", assetId]] });
|
||||
const [_totalSupply, totalBorrow] = await call({
|
||||
target: poolAssets.poolAddress,
|
||||
abi: 'getAssetTotals',
|
||||
params: [["int", assetId]]
|
||||
});
|
||||
api.add(address, totalBorrow)
|
||||
await sleep(3000)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -19,7 +26,5 @@ async function tvl(api) {
|
||||
|
||||
module.exports = {
|
||||
methodology: 'Counts the supply of EVAA\'s asset pools as TVL.',
|
||||
ton: {
|
||||
tvl, borrowed,
|
||||
}
|
||||
ton: { tvl, borrowed }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user