From ca60efcf45734913dc7e15a3b8fd140314a0fd6d Mon Sep 17 00:00:00 2001 From: 0xngmi <0xngmi@protonmail.com> Date: Fri, 10 May 2024 18:18:23 +0100 Subject: [PATCH] separate weth --- projects/etherfi-liquid/index.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/projects/etherfi-liquid/index.js b/projects/etherfi-liquid/index.js index cf3396e3258..6eaed15280f 100644 --- a/projects/etherfi-liquid/index.js +++ b/projects/etherfi-liquid/index.js @@ -4,7 +4,13 @@ async function tvl(api) { abi: "uint256:totalAssets", target: '0xea1a6307d9b18f8d1cbf1c3dd6aad8416c06a221', }); - api.add(ADDRESSES.ethereum.EETH, balETH); + const wethBal = await api.call({ + target: ADDRESSES.ethereum.WETH, + abi: "erc20:balanceOf", + params: ['0xea1a6307d9b18f8d1cbf1c3dd6aad8416c06a221'], + }); + api.add(ADDRESSES.ethereum.EETH, balETH-wethBal); + api.add(ADDRESSES.ethereum.WETH, wethBal) const balUSD = await api.call({ abi: "uint256:totalSupply", target: '0x08c6f91e2b681faf5e17227f2a44c307b3c1364c',