This commit is contained in:
g1nt0ki
2022-05-20 17:12:30 +05:30
parent 0f06835bf3
commit 814b20356f
26 changed files with 30 additions and 30 deletions

View File

@@ -116,12 +116,12 @@
acoPools[address] = {underlying: underlyingAddress, strikeAsset: strikeAssetAddress}
});
let poolCallsMap = acoPools.map((poolData, poolAddress) => ({
let poolCallsMap = Object.entries(acoPools).map(([poolAddress, poolData]) => ({
target: poolData.underlying,
params: poolAddress,
}))
poolCallsMap = poolCallsMap.concat(acoPools.map((poolData, poolAddress) => ({
poolCallsMap = poolCallsMap.concat(Object.entries(acoPools).map(([poolAddress, poolData]) => ({
target: poolData.strikeAsset,
params: poolAddress,
})))
@@ -182,5 +182,5 @@
module.exports = {
start: 1590014400, // 05/20/2020 @ 08:10:40pm (UTC)
tvl
ethereum: { tvl }
}

View File

@@ -171,5 +171,5 @@ async function tvl(timestamp, block) {
module.exports = {
start: 1601142406, // 2020-09-26 17:46:46 (UTC)
tvl
ethereum: { tvl }
};

View File

@@ -186,5 +186,5 @@
module.exports = {
start: 1599552000, // 09/08/2020 @ 8:00am (UTC)
tvl
ethereum: { tvl }
}

View File

@@ -57,5 +57,5 @@ async function tvl(timestamp, block) {
module.exports = {
start: 1566470505, // 2019-08-22T18:41:45+08:00
tvl
ethereum: { tvl }
}

View File

@@ -58,5 +58,5 @@ async function tvl(timestamp, block) {
module.exports = {
start: 1607126400, // 12/5/2020 00:00:00 utc
tvl,
ethereum: { tvl }
};

View File

@@ -41,5 +41,5 @@
module.exports = {
start: 1595853825, // 27/07/2020 @ 12:43:45am (UTC)
tvl
ethereum: { tvl }
}

View File

@@ -78,9 +78,9 @@ module.exports = async function tvl(timestamp, block) {
let conversionRate = BigNumber(cTokenConversionRatesMap[address]);
let balanceOfUnderlying = BigNumber(balanceOf.output).times(conversionRate).div(cTokenDecimalScale);
balances[addressOfUnderlying] = BigNumber(balances[addressOfUnderlying] || 0).plus(balanceOfUnderlying).toFixed();
balances[addressOfUnderlying] = BigNumber(balances[addressOfUnderlying] || 0).plus(balanceOfUnderlying || 0).toFixed();
} else {
balances[address] = BigNumber(balances[address] || 0).plus(balanceOf.output).toFixed();
balances[address] = BigNumber(balances[address] || 0).plus(balanceOf.output || 0).toFixed();
}
});

View File

@@ -121,5 +121,5 @@
module.exports = {
start: 1566518400, // 08/23/2019 @ 12:00am (UTC)
tvl
ethereum: { tvl }
};

View File

@@ -71,5 +71,5 @@ async function tvl(timestamp, block) {
module.exports = {
start: 1609459200, // unix timestamp (utc 0) specifying when the project began, or where live data begins
tvl, // tvl adapter
ethereum: { tvl }
};

View File

@@ -37,6 +37,6 @@ async function tvl(timestamp, block) {
module.exports = {
start: 1513566671, // 2020/10/21 6:34:47 (+UTC)
tvl,
ethereum: { tvl }
};

View File

@@ -203,5 +203,5 @@ async function tvl(timestamp, block) {
module.exports = {
methodology: "DOLA curve metapool replaced by DOLA",
start: 1607731200, // Dec 12 2020 00:00:00 GMT+0000
tvl,
ethereum: { tvl }
};

View File

@@ -201,7 +201,7 @@ async function getLiquidityPoolBalances(timestamp, block) {
// Get token balances
let balances = await sdk.api.abi.multiCall({
block,
calls: markets.map((data, token) => ({
calls: Object.keys(markets).map((token) => ({
target: token,
params: liquidityPool,
})).filter(m => m.target !== "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"),

View File

@@ -27,5 +27,5 @@ async function tvl(timestamp, block) {
module.exports = {
start: 1619798400, // 30/4/2021 @ 04:00PM (UTC)
tvl,
ethereum: { tvl }
};

View File

@@ -65,5 +65,5 @@
module.exports = {
start: 1574241665, // 11/20/2019 @ 09:21AM (UTC)
tvl
ethereum: { tvl }
}

View File

@@ -26,7 +26,7 @@ async function GenerateCallList() {
}
});
let calls = []
id2Info.map((info, id) => {
Object.values(id2Info).map((info, id) => {
if (info.collateralTokenAddress && info.perpetualAddress) {
calls.push({
target: info.collateralTokenAddress,

View File

@@ -18,7 +18,7 @@ async function tvl(_, _ethBlock, chainBlocks) {
const decimalsOfReserve = (
await sdk.api.abi.multiCall({
calls: _us.map(reserves_mensa, (reserve) => ({
calls: reserves_mensa.map((reserve) => ({
target: reserve
})),
abi: "erc20:decimals",
@@ -54,7 +54,7 @@ async function tvl(_, _ethBlock, chainBlocks) {
const balanceOfResults = await sdk.api.abi.multiCall({
block: chainBlocks['fantom'],
chain: 'fantom',
calls: _us.map(assets, (reserve) => ({
calls: assets.map((reserve) => ({
target: reserve.address,
params: _mensaCoreAddress,
})),

View File

@@ -44,5 +44,5 @@
module.exports = {
start: 1527076766, // block 5659904
tvl,
ethereum: { tvl }
};

View File

@@ -216,7 +216,7 @@ async function tvl(timestamp, ethBlock, chainBlocks) {
module.exports = {
start: 8606077, // January 19, 2021 11:51:30 AM
tvl, // tvl adapter
celo: { tvl }
};
///

View File

@@ -59,5 +59,5 @@
module.exports = {
start: 1558569600, // 05/23/2019 @ 12:00am (UTC)
tvl
ethereum: { tvl }
}

View File

@@ -101,6 +101,6 @@ async function tvl(timestamp, block) {
module.exports = {
start: 1619081169, // Thu Apr 22 2021 16:46:35
tvl,
ethereum: { tvl }
};

View File

@@ -83,7 +83,7 @@ const { staking } = require('../helper/staking');
let fundsAddresses = [];
// Prepare funds balances
funds.forEach((fund) => {
Object.values(funds).forEach((fund) => {
let fundTokens = fund.tokens
let fundAddress = fund.address

View File

@@ -98,5 +98,5 @@ async function tvl(timestamp, block) {
module.exports = {
start: 1600905600,
tvl
ethereum: { tvl }
}

View File

@@ -57,5 +57,5 @@ async function tvl(timestamp, block) {
module.exports = {
start: 1573582731,
tvl,
ethereum: { tvl }
};

View File

@@ -26,5 +26,5 @@
module.exports = {
start: 1554848955, // 04/09/2019 @ 10:29pm (UTC)
tvl
ethereum: { tvl }
}

View File

@@ -72,5 +72,5 @@ async function tvl(timestamp, block) {
==================================================*/
module.exports = {
start: 1601440616, // 09/30/2020 @ 4:36am (UTC)
tvl,
ethereum: { tvl }
};

View File

@@ -106,5 +106,5 @@ async function tvl(timestamp, block) {
module.exports = {
doublecounted: true,
start: 1600185600, // 09/16/2020 @ 12:00am (UTC+8)
tvl,
ethereum: { tvl }
};