Skip to content

Commit bb8e5a2

Browse files
authored
Resupply: Add TVL from staking contracts (DefiLlama#14251)
1 parent cb761b7 commit bb8e5a2

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

projects/resupply/index.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
const { getConfig } = require('../helper/cache');
2+
const { staking } = require("../helper/staking.js");
3+
4+
const RESUP_TOKEN = '0x419905009e4656fdc02418c7df35b1e61ed5f726';
5+
const GOV_STAKING_CONTRACT = '0x22222222E9fE38F6f1FC8C61b25228adB4D8B953';
26

37
const convertToAssetsAbi = 'function convertToAssets(uint256) view returns (uint256)';
48

@@ -23,9 +27,20 @@ async function tvl(api) {
2327
api.add(tokens, assetBalances);
2428
}
2529

30+
async function stakingTvl(api) {
31+
const resupBalance = await api.call({
32+
abi: 'erc20:balanceOf',
33+
target: RESUP_TOKEN,
34+
params: [GOV_STAKING_CONTRACT],
35+
});
36+
37+
api.add(RESUP_TOKEN, resupBalance);
38+
}
39+
2640
module.exports = {
2741
start: '2025-03-15',
2842
ethereum: {
2943
tvl,
44+
staking: stakingTvl,
3045
},
3146
};

0 commit comments

Comments
 (0)