This commit is contained in:
g1nt0ki
2022-06-02 16:15:25 +02:00
parent 8658d98bfd
commit 27efa9502a
4 changed files with 4 additions and 30 deletions

View File

@@ -2,20 +2,6 @@ const { getChainTvlBuffered } = require("../helper/getUniSubgraphTvl");
const { getUniTVL } = require("../helper/unknownTokens");
const { staking } = require("../helper/staking.js");
const ethers = require("ethers");
const { config } = require("@defillama/sdk/build/api")
config.setProvider(
"shiden",
new ethers.providers.StaticJsonRpcProvider(
"https://evm.shiden.astar.network",
{
name: "shiden",
chainId: 336,
}
)
);
const v1graph = getChainTvlBuffered(
{
ethereum:

View File

@@ -1,6 +1,7 @@
const abi = require("./abi.json");
const { transformFantomAddress } = require("../helper/portedTokens");
const { addFundsInMasterChef } = require("../helper/masterchef");
const { unwrapLPsAuto } = require("../helper/unwrapLPs");
const { staking } = require("../helper/staking");
const { pool2 } = require('../helper/pool2')
@@ -13,6 +14,7 @@ async function tvl(timestamp, block, chainBlocks) {
const balances = {}
const transformAddress = await transformFantomAddress();
await addFundsInMasterChef(balances, chef, chainBlocks.fantom, "fantom", transformAddress, abi.poolInfo, [dmd, dmdFtmLP])
await unwrapLPsAuto({ balances, block: chainBlocks.fantom, chain: 'fantom', transformAddress})
return balances;
}

View File

@@ -1,19 +1,5 @@
const { getUniTVL } = require('./helper/unknownTokens')
const ethers = require("ethers");
const { config } = require("@defillama/sdk/build/api")
config.setProvider(
"energi",
new ethers.providers.StaticJsonRpcProvider(
"https://nodeapi.energi.network",
{
name: "energi",
chainId: 39797,
}
)
);
module.exports = {
energi: {
tvl: getUniTVL({

View File

@@ -117,7 +117,7 @@ function createIncrementArray(length) {
return arr
}
const LP_SYMBOLS = ['SLP', 'spLP', 'JLP', 'OLP', 'SCLP', 'DLP', 'MLP', 'MSLP', 'ULP', 'TLP']
const LP_SYMBOLS = ['SLP', 'spLP', 'JLP', 'OLP', 'SCLP', 'DLP', 'MLP', 'MSLP', 'ULP', 'TLP', 'HMDX','YLP']
function isLP(symbol) {
if (!symbol) return false
if (symbol.startsWith('ZLK-LP')) {
@@ -125,7 +125,7 @@ function isLP(symbol) {
return false
}
return LP_SYMBOLS.includes(symbol) || /(UNI-V2|PGL|HMDX|GREEN-V2|PNDA-V2)/.test(symbol) || symbol.split(/\W+/).includes('LP')
return LP_SYMBOLS.includes(symbol) || /(UNI-V2|PGL|GREEN-V2|PNDA-V2)/.test(symbol) || symbol.split(/\W+/).includes('LP')
}
function mergeExports(...exportsArray) {