mirror of
https://github.com/alexgo-io/DefiLlama-Adapters.git
synced 2026-01-12 16:53:02 +08:00
lint fixes
This commit is contained in:
@@ -11,7 +11,7 @@ const veAddress = "0xcBd8fEa77c2452255f59743f55A3Ea9d83b3c72b";
|
||||
const oxSolidAddress = "0xDA0053F0bEfCbcaC208A3f867BB243716734D809";
|
||||
const sanitize = require("./sanitizeWeb3Response.js");
|
||||
|
||||
const { masterChefExports, standardPoolInfoAbi, addFundsInMasterChef } = require('../helper/masterchef')
|
||||
const { standardPoolInfoAbi, addFundsInMasterChef } = require('../helper/masterchef')
|
||||
const sdk = require('@defillama/sdk')
|
||||
const { default: BigNumber } = require('bignumber.js')
|
||||
|
||||
@@ -85,7 +85,7 @@ async function tvl(time, ethBlock, chainBlocks) {
|
||||
|
||||
// Add pools
|
||||
const addPools = (pools, reservesData) => {
|
||||
pools.forEach((pool, index) => {
|
||||
pools.forEach((pool) => {
|
||||
const solidlyPoolAddress = pool.poolData.id;
|
||||
const reserveData = reservesData.find(
|
||||
(data) => data.id === solidlyPoolAddress
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
const { staking, stakingUnknownPricedLP } = require("../helper/staking");
|
||||
const { stakingUnknownPricedLP } = require("../helper/staking");
|
||||
|
||||
const ACID_STAKING = "0x00a842038a674616f6a97e62f80111a536778282";
|
||||
const ACID_TOKEN = "0x29C1EA5ED7af53094b1a79eF60d20641987c867e";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const sdk = require("@defillama/sdk");
|
||||
const { unwrapUniswapLPs } = require("../helper/unwrapLPs");
|
||||
const { staking, stakingPricedLP } = require("../helper/staking");
|
||||
const { stakingPricedLP } = require("../helper/staking");
|
||||
|
||||
const tombTokenAddress = "0xDD057bCcB72982753266A903Feda154608e54468";
|
||||
const tshareTokenAddress = "0x0c55339a139acd3a8ba07a9abad345b05c4bf804";
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
const sdk = require('@defillama/sdk');
|
||||
const curvePoolAbi = require('./curvePoolAbi.json');
|
||||
const archimedesVaultAbi = require('./archimedesVaultAbi.json')
|
||||
const ERC20_TOKEN_3CRV = "0x6c3F90f043a72FA612cbac8115EE7e52BDe6E490";
|
||||
@@ -8,26 +7,14 @@ const ARCHIMEDES_VAULT_OUSD = "0x4c12c57C37Ff008450A2597e810B51B2BbA0383A";
|
||||
const ERC20_TOKEN_OUSD = "0x2A8e1E676Ec238d8A992307B495b45B3fEAa5e86";
|
||||
|
||||
async function tvl(_, _1, _2, { api }) {
|
||||
const balances = {};
|
||||
|
||||
// 3CRV liquidity in LVUSD-3CRV curve pool
|
||||
const { output: poolLiquidity3CRV } = await sdk.api.abi.call({
|
||||
target: POOL_CONTRACT_LVUSD_3CRV,
|
||||
abi: curvePoolAbi.balances,
|
||||
params: POOL_INDEX_3CRV
|
||||
});
|
||||
|
||||
await sdk.util.sumSingleBalance(balances, ERC20_TOKEN_3CRV, poolLiquidity3CRV);
|
||||
const poolLiquidity3CRV = await api.call({ target: POOL_CONTRACT_LVUSD_3CRV, abi: curvePoolAbi.balances, params: POOL_INDEX_3CRV });
|
||||
|
||||
// Total OUSD held in vault
|
||||
const { output: totalAssetsOUSD } = await sdk.api.abi.call({
|
||||
target: ARCHIMEDES_VAULT_OUSD,
|
||||
abi: archimedesVaultAbi.totalAssets
|
||||
});
|
||||
const totalAssetsOUSD = await api.call({ target: ARCHIMEDES_VAULT_OUSD, abi: archimedesVaultAbi.totalAssets });
|
||||
|
||||
await sdk.util.sumSingleBalance(balances, ERC20_TOKEN_OUSD, totalAssetsOUSD);
|
||||
|
||||
return balances;
|
||||
api.add(ERC20_TOKEN_3CRV, poolLiquidity3CRV)
|
||||
api.add(ERC20_TOKEN_OUSD, totalAssetsOUSD)
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
const sdk = require("@defillama/sdk");
|
||||
const {pool2Exports} = require("../helper/pool2");
|
||||
const { staking } = require("../helper/staking");
|
||||
|
||||
const token = "0xAB4F3fC9831dBC77424269B9255fC1A082AC9840";
|
||||
const shares = "0x9f8349C33B942b6CBb15426E02b5Bbb77fAeB64f";
|
||||
const shareRewardPool = "0x02361bAd5b50AfDDea2d8c4359a8C9595445a90D";
|
||||
const boardroom = "0xcE2912101EF05034Eb2FA818dd6e57Ab09c8Ca73";
|
||||
|
||||
@@ -1,27 +1,10 @@
|
||||
const ADDRESSES = require('../helper/coreAssets.json')
|
||||
const { sumTokensExport } = require('../helper/unwrapLPs')
|
||||
const { masterchefExports } = require('../helper/unknownTokens')
|
||||
|
||||
|
||||
const config = {
|
||||
kava: {
|
||||
SKILL_TOKEN_CONTRACT: '0x85602B00C9bd973B1Afb66EC140A62480CF812d3',
|
||||
// STAKING: [
|
||||
// ADDRESSES.kava.WKAVA,
|
||||
// ADDRESSES.shiden.ETH,
|
||||
// ADDRESSES.telos.ETH,
|
||||
// '0xB44a9B6905aF7c801311e8F4E76932ee959c663',
|
||||
// ]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Object.keys(config).forEach(chain => {
|
||||
// const { SKILL_TOKEN_CONTRACT, STAKING, } = config[chain]
|
||||
// module.exports[chain] = {
|
||||
// tvl: () => ({}),
|
||||
// staking: sumTokensExport({ tokens: STAKING, owner: SKILL_TOKEN_CONTRACT })
|
||||
// }
|
||||
// })
|
||||
|
||||
module.exports = masterchefExports({ chain: 'kava', masterchef: config.kava.SKILL_TOKEN_CONTRACT, })
|
||||
@@ -8,7 +8,7 @@ const graphUrlMainnet = "https://api.thegraph.com/subgraphs/name/gysr-io/gysr";
|
||||
const graphUrlPolygon = "https://api.thegraph.com/subgraphs/name/gysr-io/gysr-polygon";
|
||||
const graphQuery = gql`
|
||||
query GET_TVL($block: Int) {
|
||||
platform(id: ADDRESSES.null, block: { number: $block }) {
|
||||
platform(id: "${ADDRESSES.null}", block: { number: $block }) {
|
||||
tvl
|
||||
}
|
||||
}
|
||||
@@ -36,7 +36,7 @@ async function polygon(_, ethBlock, chainBlocks) {
|
||||
graphUrlPolygon,
|
||||
graphQuery,
|
||||
{
|
||||
block
|
||||
block: block - 200
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -1,19 +1,3 @@
|
||||
const ADDRESSES = require('../helper/coreAssets.json')
|
||||
// const { ohmTvl } = require('../helper/ohm')
|
||||
|
||||
// const treasury = "0x39914b5b0687882659d74b7a82e07Ca3acBf9a8c"
|
||||
// module.exports = ohmTvl(treasury, [
|
||||
// //WBNB
|
||||
// [ADDRESSES.bsc.WBNB, false],
|
||||
// //BUSD
|
||||
// [ADDRESSES.bsc.BUSD, false],
|
||||
// //USDC
|
||||
// [ADDRESSES.bsc.USDC, false],
|
||||
// //PancakeLP
|
||||
// ["0x63D9DEf04dcBf82870f46f50db5C1eFeCcb1Cd63", true],
|
||||
// ], "bsc", "0x5132e14a2673DA61581364d792E90B926F10bC8e", "0xfAAec9f866Fa7f34a2c31c2B11D1723Ad4a46446", undefined, undefined, true)
|
||||
|
||||
|
||||
// NOTE: treasury is emptied, token is worthless, adapter is left alone for historical data
|
||||
module.exports = {
|
||||
bsc: {
|
||||
|
||||
Reference in New Issue
Block a user