11const ADDRESSES = require ( '../helper/coreAssets.json' )
2- const { sumTokensExport } = require ( "../helper/unwrapLPs" ) ;
2+ const { sumTokens2 } = require ( "../helper/unwrapLPs" ) ;
33
44const bridgeAddresses = {
5- 'stETH' : { tokenAddress : ADDRESSES . ethereum . STETH , ownerContractAddress : '0xfE08D40Eee53d64936D3128838867c867602665c' }
5+ stETH : { tokenAddress : ADDRESSES . ethereum . STETH , ownerContractAddress : '0xfE08D40Eee53d64936D3128838867c867602665c' } ,
6+ sUSDS : { tokenAddress : ADDRESSES . ethereum . sUSDS , ownerContractAddress : '0x7cd01d5cad4ba0caeba02583a5c61d35b23e08eb' } ,
67}
78
89// Convert the object to an array of [tokenAddress, ownerContractAddress] pairs
910const tokensAndOwners = Object . values ( bridgeAddresses ) . map ( ( { tokenAddress, ownerContractAddress } ) =>
10- [ tokenAddress , ownerContractAddress ]
11+ [ tokenAddress , ownerContractAddress ]
1112) ;
1213
1314module . exports = {
14- methodology : "TVL is calculated by getting all tokens in the AO bridge and adding up the USD values provided by CoinGecko." ,
15- ethereum : {
16- tvl : sumTokensExport ( {
17- tokensAndOwners
18- } ) ,
19- }
20- } ;
15+ methodology : "TVL is calculated by getting all tokens in the AO bridge and adding up the USD values provided by CoinGecko." ,
16+ ethereum : {
17+ tvl : async ( api ) => {
18+ await sumTokens2 ( { api, tokensAndOwners } )
19+ // DAI bridge TVL is tracked via the manager's totalDepositedInPublicPools.
20+ const daiDeposited = await api . call ( {
21+ target : '0x6A1B588B0684dACE1f53C5820111F400B3dbfeBf' ,
22+ abi : 'uint256:totalDepositedInPublicPools' ,
23+ } )
24+ api . add ( ADDRESSES . ethereum . DAI , daiDeposited )
25+ } ,
26+ }
27+ } ;
0 commit comments