mirror of
https://github.com/alexgo-io/DefiLlama-Adapters.git
synced 2026-04-29 05:15:28 +08:00
bugfix
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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({
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user