File tree Expand file tree Collapse file tree 1 file changed +19
-5
lines changed
Expand file tree Collapse file tree 1 file changed +19
-5
lines changed Original file line number Diff line number Diff line change 11const ADDRESSES = require ( '../helper/coreAssets.json' )
2- const BBTC = '0xF5e11df1ebCf78b6b6D26E04FF19cD786a1e81dC'
3- const { sumTokens2 } = require ( '../helper/unwrapLPs' )
42
5- async function bouncebitLSDTvl ( api ) {
3+ const STAKE_ABI = {
4+ stakingToken : "function stakingToken() view returns (address)"
5+ }
6+
7+ const stakeContracts = [
8+ '0xE031b9E9AA6Ec7F29362cBD4735Ef567215fc68A' ,
9+ '0xbF28516EB2a987CB63b1E3b019fEb42aA40d5577' ,
10+ '0x9e4c010d537551c2FF5dEA9A73Af189Dfb9347E6' ,
11+ '0x44398B640c82821eF354707598C4C148d81aE72a' ,
12+ '0x3b457C670711e0771a8Da4f2589d7d8DbA3D40A0'
13+ ]
14+
15+ async function bouncebitLSD ( api ) {
616 const BBBalance = await api . call ( { abi : 'erc20:totalSupply' , target : '0x22aAC17E571D6651880d057e310703fF4C7c3483' } )
717 api . add ( ADDRESSES . null , BBBalance )
8- return sumTokens2 ( { owner : '0x7F150c293c97172C75983BD8ac084c187107eA19' , tokens : [ BBTC ] , api } )
18+
19+ const utokens = await api . multiCall ( { calls : stakeContracts , abi : STAKE_ABI . stakingToken } )
20+ const toa = utokens . map ( ( addr , idx ) => [ addr , stakeContracts [ idx ] ] )
21+ return api . sumTokens ( { tokensAndOwners : toa } )
922}
1023
1124module . exports = {
1225 bouncebit : {
13- tvl : bouncebitLSDTvl
26+ tvl : ( ) => { } ,
27+ staking : bouncebitLSD
1428 }
1529} ;
You can’t perform that action at this time.
0 commit comments