File tree Expand file tree Collapse file tree 1 file changed +1
-14
lines changed Expand file tree Collapse file tree 1 file changed +1
-14
lines changed Original file line number Diff line number Diff line change 1
- const { sumTokens2 } = require ( '../helper/unwrapLPs' ) ;
2
-
3
- const pools = [
4
- '0xcafeaBED7e0653aFe9674A3ad862b78DB3F36e60' // current pool
5
- ] ;
6
- const yieldPools = [
7
- '0x27f23c710dd3d878fe9393d93465fed1302f2ebd'
8
- ]
9
- const getAssetsABI = "function getAssets() view returns (tuple(address assetAddress, bool isCoverAsset, bool isAbandoned)[])"
10
1
11
2
async function tvl ( api ) {
12
- const assets = await api . multiCall ( { abi : getAssetsABI , calls : pools } )
13
- const ownerTokens = assets . map ( ( v , i ) => [ v . map ( i => i . assetAddress ) , pools [ i ] ] )
14
- const assets2 = await api . multiCall ( { abi : 'address[]:getTrackedAssets' , calls : yieldPools } )
15
- assets2 . forEach ( ( v , i ) => ownerTokens . push ( [ v , yieldPools [ i ] ] ) )
16
3
const MasterProxy = '0x01BFd82675DBCc7762C84019cA518e701C0cD07e'
17
4
// const bytes2 = ethers.utils.formatBytes32String('P1').slice(0, 4) // '0x5031
18
5
const P1Address = await api . call ( { abi : 'function getLatestAddress(bytes2) view returns (address)' , target : MasterProxy , params : '0x5031' } )
19
6
const ethValue = await api . call ( { abi : 'uint256:getPoolValueInEth' , target : P1Address } )
20
7
api . addGasToken ( ethValue )
21
- return sumTokens2 ( { api, ownerTokens, blacklistedTokens : yieldPools } )
22
8
}
23
9
24
10
module . exports = {
11
+ misrepresentedTokens : true ,
25
12
start : 1558569600 , // 05/23/2019 @ 12:00am (UTC)
26
13
ethereum : { tvl }
27
14
}
You can’t perform that action at this time.
0 commit comments