From ed47a18b62eb4f2e197fbcdda42a1f96b2843fb5 Mon Sep 17 00:00:00 2001 From: 0xngmi <0xngmi@protonmail.com> Date: Fri, 10 May 2024 19:07:33 +0100 Subject: [PATCH] add diva vault --- projects/diva/index.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/projects/diva/index.js b/projects/diva/index.js index 31d7d6eb969..7554ff1bd58 100644 --- a/projects/diva/index.js +++ b/projects/diva/index.js @@ -1,15 +1,23 @@ const ADDRESSES = require('../helper/coreAssets.json') const { sumTokensExport } = require('../helper/unwrapLPs') +const sdk = require("@defillama/sdk") module.exports = { methodology: 'ETH and stETH in vaults', ethereum: { - tvl: sumTokensExport({ owners: [ + tvl: sdk.util.sumChainTvls([sumTokensExport({ owners: [ "0x1ce8aafb51e79f6bdc0ef2ebd6fd34b00620f6db", "0x16770d642e882e1769ce4ac8612b8bc0601506fc" ], tokens: [ ADDRESSES.ethereum.WETH, ADDRESSES.ethereum.STETH - ]}), + ]}), async (api) => { + return { + [ADDRESSES.ethereum.WETH]: await api.call({ + target: "0x6c1edce139291af5b84fb1e496c9747f83e876c9", + abi: "uint256:totalAssets" + }) + } + }]), } }; \ No newline at end of file