|
1 |
| -const { staking } = require("../helper/staking"); |
2 |
| -const { sumTokens2 } = require('../helper/unwrapLPs') |
3 |
| - |
| 1 | +const { stakings } = require("../helper/staking"); |
4 | 2 |
|
5 | 3 | const contracts = {
|
6 | 4 | polygon: {
|
7 |
| - core: '0x9A06Db14D639796B25A6ceC6A1bf614fd98815EC', |
| 5 | + core: "0x9A06Db14D639796B25A6ceC6A1bf614fd98815EC", |
| 6 | + staking: [ |
| 7 | + "0x4cec451f63dbe47d9da2debe2b734e4cb4000eac", |
| 8 | + "0x5e7fda6d9f5024c4ad1c780839987ab8c76486c9", |
| 9 | + ], |
8 | 10 | },
|
9 | 11 | ethereum: {
|
10 |
| - core: '0x909E34d3f6124C324ac83DccA84b74398a6fa173', |
11 |
| - staking: '0xf4d06d72dacdd8393fa4ea72fdcc10049711f899' |
12 |
| - } |
| 12 | + core: "0x909E34d3f6124C324ac83DccA84b74398a6fa173", |
| 13 | + staking: ["0xf4d06d72dacdd8393fa4ea72fdcc10049711f899"], |
| 14 | + }, |
13 | 15 | };
|
14 | 16 |
|
15 |
| -const blacklistedTokens = []; |
16 |
| - |
17 |
| -function getTVLFunc(contractAddress, chain) { |
18 |
| - return async function (timestamp, _, { [chain]: block }, { api }) { |
19 |
| - return sumTokens2({ owner: contractAddress, fetchCoValentTokens: true, blacklistedTokens, api }) |
20 |
| - } |
21 |
| -} |
22 |
| - |
23 |
| -function getChainTVL(chain) { |
24 |
| - return { |
25 |
| - staking: contracts[chain].staking ? staking(contracts[chain].staking, contracts[chain].core) : undefined, |
26 |
| - tvl: getTVLFunc(contracts[chain].proxy, chain), |
| 17 | +Object.keys(contracts).forEach((chain) => { |
| 18 | + module.exports[chain] = { |
| 19 | + tvl: () => ({}), |
| 20 | + staking: stakings(contracts[chain].staking, contracts[chain].core), |
27 | 21 | };
|
28 |
| -} |
29 |
| - |
30 |
| -Object.keys(contracts).forEach(chain => { |
31 |
| - module.exports[chain] = getChainTVL(chain) |
32 |
| -}) |
| 22 | +}); |
0 commit comments