Skip to content

Commit

Permalink
Renzo pzeth tvl tracking (DefiLlama#10982)
Browse files Browse the repository at this point in the history
* add: base tracker for ezETH

* add: pzeth tvl tracking on mainnet
  • Loading branch information
jatinj615 authored Jul 14, 2024
1 parent 9c17e30 commit b59a007
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion projects/renzo/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ const ADDRESSES = require('../helper/coreAssets.json')
const L1_EZ_ETH_ADDRESS = "0xbf5495Efe5DB9ce00f80364C8B423567e58d2110";
const L2_EZ_ETH_ADDRESS = ADDRESSES.blast.ezETH;
const L1_LOCKBOX_ADDRESS = "0xC8140dA31E6bCa19b287cC35531c2212763C2059";
const L1_PZ_ETH_ADDRESS = "0x8c9532a60E0E7C6BbD2B2c1303F63aCE1c3E9811";

async function L2Tvl(api) {
return {
Expand All @@ -12,7 +13,9 @@ async function L2Tvl(api) {
async function ethTvl(api) {
const totalTvl = await api.call({ target: L1_EZ_ETH_ADDRESS, abi: "erc20:totalSupply" });
const lockBoxBalance = await api.call({ target: L1_EZ_ETH_ADDRESS, abi: "erc20:balanceOf", params: [L1_LOCKBOX_ADDRESS] })
api.add(L1_EZ_ETH_ADDRESS, totalTvl - lockBoxBalance)
const pzEthBalance = await api.call({target: L1_PZ_ETH_ADDRESS, abi: "erc20:totalSupply"});
api.add(L1_EZ_ETH_ADDRESS, totalTvl - lockBoxBalance);
api.add(L1_PZ_ETH_ADDRESS, pzEthBalance);
}

const chains = ["mode", "blast", "bsc", "linea", "arbitrum", "base"]
Expand Down

0 comments on commit b59a007

Please sign in to comment.