Skip to content

Commit 75258f8

Browse files
committed
nexus: fix doublecount
1 parent 42e5454 commit 75258f8

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

projects/nexus/index.js

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,14 @@
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)[])"
101

112
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]]))
163
const MasterProxy = '0x01BFd82675DBCc7762C84019cA518e701C0cD07e'
174
// const bytes2 = ethers.utils.formatBytes32String('P1').slice(0, 4) // '0x5031
185
const P1Address = await api.call({ abi: 'function getLatestAddress(bytes2) view returns (address)', target: MasterProxy, params: '0x5031' })
196
const ethValue = await api.call({ abi: 'uint256:getPoolValueInEth', target: P1Address})
207
api.addGasToken(ethValue)
21-
return sumTokens2({ api, ownerTokens, blacklistedTokens: yieldPools})
228
}
239

2410
module.exports = {
11+
misrepresentedTokens: true,
2512
start: 1558569600, // 05/23/2019 @ 12:00am (UTC)
2613
ethereum: { tvl }
2714
}

0 commit comments

Comments
 (0)