From 094756a4d983ea8813a09c568c2f9a8b1a1ed004 Mon Sep 17 00:00:00 2001 From: hydropump3 Date: Thu, 9 May 2024 14:22:50 -0400 Subject: [PATCH 1/2] feat: add new managers --- projects/helper/coreAssets.json | 3 ++- projects/juice-finance/index.js | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/projects/helper/coreAssets.json b/projects/helper/coreAssets.json index 2975bccf25c5..39937d36cabe 100644 --- a/projects/helper/coreAssets.json +++ b/projects/helper/coreAssets.json @@ -1648,7 +1648,8 @@ "fwWETH": "0x66714db8f3397c767d0a602458b5b4e3c0fe7dd1", "fwUSDB": "0x866f2c06b83df2ed7ca9c2d044940e7cd55a06d6", "WETH": "0x4300000000000000000000000000000000000004", - "ezETH": "0x2416092f143378750bb29b79eD961ab195CcEea5" + "ezETH": "0x2416092f143378750bb29b79eD961ab195CcEea5", + "weETH": "0x04C0599Ae5A44757c0af6F9eC3b93da8976c150A" }, "chz": { "WCHZ": "0x721ef6871f1c4efe730dce047d40d1743b886946" diff --git a/projects/juice-finance/index.js b/projects/juice-finance/index.js index c6e890532775..f1d0aba32983 100644 --- a/projects/juice-finance/index.js +++ b/projects/juice-finance/index.js @@ -15,6 +15,10 @@ const WETH_COLLATERAL_MANAGER = "0x23eBa06981B5c2a6f1a985BdCE41BD64D18e6dFA"; const EZETH_COLLATERAL_MANAGER = "0xc81A630806d1aF3fd7509187E1AfC501Fd46e818"; const MUNCHABLE_WETH_COLLATERAL_MANAGER = "0x32b6C6322939263029A5CF37F14A59ab0A9E277c"; +const WEETH_COLLATERAL_MANAGER = + "0x7E4aFeBe294345d72dE6bB8405C871D7BB6c53d1"; +const USDB_COLLATERAL_MANAGER = + "0xC877B52c628Dba77fC55F1DDb140747155C9b39D"; const wethCollateralManagers = [ COLLATERAL_MANAGER, @@ -49,6 +53,8 @@ async function tvl(api) { resolveLP: true, tokensAndOwners: [ [EZETH, EZETH_COLLATERAL_MANAGER], + [ADDRESSES.blast.weETH, WEETH_COLLATERAL_MANAGER], + [ADDRESSES.blast.USDB, USDB_COLLATERAL_MANAGER], ...wethCollateralManagers, ], }); From a78e3abc8640908635898d61ea4cd2796d7eb857 Mon Sep 17 00:00:00 2001 From: hydropump3 Date: Mon, 13 May 2024 18:34:47 -0400 Subject: [PATCH 2/2] feat: add staked LP to tvl --- projects/juice-finance/index.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/projects/juice-finance/index.js b/projects/juice-finance/index.js index f1d0aba32983..ea92ee9dbc7b 100644 --- a/projects/juice-finance/index.js +++ b/projects/juice-finance/index.js @@ -28,6 +28,13 @@ const wethCollateralManagers = [ ].map((a) => [ADDRESSES.blast.WETH, a]); async function tvl(api) { + + const thrusterV2LPs = [['0x4E4B4A3111d128628c427E78a2abAd1635fE6542', '0x4Ca392f74A4C86F5E521f1d8E915b36ed425B331']]; + const stakedLPCalls = thrusterV2LPs.map(lp => ({ params: [lp[1], lp[0]] })); + const v2Bals = await api.multiCall({ abi: 'function staked(address, address) view returns (uint256)', calls: stakedLPCalls, target: '0xc3ecadb7a5fab07c72af6bcfbd588b7818c4a40e' }); + const v2Tokens = thrusterV2LPs.map(lp => lp[0]); + api.add(v2Tokens, v2Bals); + const tokens = await api.multiCall({ abi: { inputs: [],