mirror of
https://github.com/alexgo-io/DefiLlama-Adapters.git
synced 2026-01-12 16:53:02 +08:00
graphql-migration (#10635)
* ic * revert package lock change * bump version --------- Co-authored-by: 0xngmi <0xngmi@protonmail.com>
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import * as sdk from "@defillama/sdk";
|
||||
import { gql, request } from "graphql-request";
|
||||
import { Liq } from "../utils/types";
|
||||
import { getPagedGql } from "../utils/gql";
|
||||
@@ -75,14 +76,14 @@ const rc: { [chain in Chains]: AaveAdapterResource } = {
|
||||
name: "aave",
|
||||
chain: Chains.ethereum,
|
||||
usdcAddress: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
|
||||
subgraphUrl: "https://api.thegraph.com/subgraphs/name/aave/protocol-v2",
|
||||
subgraphUrl: sdk.graph.modifyEndpoint('8wR23o1zkS4gpLqLNU4kG3JHYVucqGyopL5utGxP2q1N'),
|
||||
explorerBaseUrl: "https://etherscan.io/address/",
|
||||
},
|
||||
// [Chains.polygon]: {
|
||||
// name: "aave",
|
||||
// chain: Chains.polygon,
|
||||
// usdcAddress: "0x2791bca1f2de4661ed88a30c99a7a9449aa84174",
|
||||
// subgraphUrl: "https://api.thegraph.com/subgraphs/name/aave/aave-v2-matic",
|
||||
// subgraphUrl: sdk.graph.modifyEndpoint('H1Et77RZh3XEf27vkAmJyzgCME2RSFLtDS2f4PPW6CGp'),
|
||||
// explorerBaseUrl: "https://polygonscan.com/address/",
|
||||
// },
|
||||
};
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import * as sdk from "@defillama/sdk";
|
||||
import { gql } from "graphql-request";
|
||||
import { getPagedGql } from "../utils/gql";
|
||||
import BigNumber from "bignumber.js";
|
||||
@@ -12,7 +13,7 @@ import {
|
||||
totalCollateralValueInUsd,
|
||||
} from "../utils/compound-helpers";
|
||||
|
||||
const subgraphUrl = "https://api.thegraph.com/subgraphs/name/yhayun/benqi";
|
||||
const subgraphUrl = sdk.graph.modifyEndpoint('HcTvZi3fwucvRJvVmtFzNDTnomvMBk64xCLNQQg6GPAV');
|
||||
|
||||
const accountsQuery = gql`
|
||||
query accounts($lastId: ID, $pageSize: Int) {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import * as sdk from "@defillama/sdk";
|
||||
import { gql } from "graphql-request";
|
||||
import { getPagedGql } from "../utils/gql";
|
||||
import BigNumber from "bignumber.js";
|
||||
@@ -12,7 +13,7 @@ import {
|
||||
totalCollateralValueInUsd,
|
||||
} from "../utils/compound-helpers";
|
||||
|
||||
const subgraphUrl = "https://api.thegraph.com/subgraphs/name/graphprotocol/compound-v2";
|
||||
const subgraphUrl = sdk.graph.modifyEndpoint('AAva7YSZBLar4MaxQ3MqdJDFXkkHEaCDeibKTnraex1x');
|
||||
|
||||
const accountsQuery = gql`
|
||||
query accounts($lastId: ID, $pageSize: Int) {
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import * as sdk from "@defillama/sdk";
|
||||
import { gql } from "graphql-request";
|
||||
import { getPagedGql } from "../utils/gql";
|
||||
import BigNumber from "bignumber.js";
|
||||
import { Liq } from "../utils/types";
|
||||
|
||||
const subgraphUrl = "https://api.thegraph.com/subgraphs/name/euler-xyz/euler-mainnet";
|
||||
const subgraphUrl = sdk.graph.modifyEndpoint('EQBXhrF4ppZy9cBYnhPdrMCRaVas6seNpqviih5VRGmU');
|
||||
|
||||
const accountsQuery = gql`
|
||||
query accounts($lastId: ID, $pageSize: Int) {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import * as sdk from "@defillama/sdk";
|
||||
import axios from "axios";
|
||||
import { gql } from "graphql-request";
|
||||
import BigNumber from "bignumber.js";
|
||||
@@ -49,16 +50,16 @@ const getSubgraphUrl = (chain: Chain) => {
|
||||
|
||||
switch (chain) {
|
||||
case Chain.ethereum: {
|
||||
subgraphUrl = "https://api.thegraph.com/subgraphs/name/m19/titan";
|
||||
subgraphUrl = sdk.graph.modifyEndpoint('FV3Dw1zMs97LpVPegWZKJv4bsbsZdrob2EqLCPxdcoDS');
|
||||
break;
|
||||
}
|
||||
case Chain.polygon: {
|
||||
subgraphUrl = "https://api.thegraph.com/subgraphs/name/m19/titanpolygon";
|
||||
subgraphUrl = sdk.graph.modifyEndpoint('EfFLqiwngmmtE5su2t1EsFoEttoj8KWervocfab1ofYT');
|
||||
break;
|
||||
}
|
||||
// case Chain.fantom: {
|
||||
// subgraphUrl =
|
||||
// "https://api.thegraph.com/subgraphs/name/rayxpub/titanfantom";
|
||||
// sdk.graph.modifyEndpoint('DkSQLWkkiNfeNG43NJnHsW9hfih8hDt4SHFTNMQgPHJH');
|
||||
// break;
|
||||
// }
|
||||
}
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import * as sdk from "@defillama/sdk";
|
||||
import { gql } from "graphql-request";
|
||||
import { getPagedGql } from "../utils/gql";
|
||||
import BigNumber from "bignumber.js";
|
||||
import { Liq } from "../utils/types";
|
||||
|
||||
const subgraphUrl = "https://api.thegraph.com/subgraphs/name/traderjoe-xyz/lending";
|
||||
const subgraphUrl = sdk.graph.modifyEndpoint('JB5EdQqbddMjawMLYe3C5ifmhN9WKYvLdgAKoUy1CyYy');
|
||||
|
||||
const accountsQuery = gql`
|
||||
query accounts($lastId: ID, $pageSize: Int) {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import * as sdk from "@defillama/sdk";
|
||||
import { gql } from "graphql-request";
|
||||
import { getPagedGql } from "../utils/gql";
|
||||
import BigNumber from "bignumber.js";
|
||||
@@ -15,7 +16,7 @@ import {
|
||||
} from "../utils/compound-helpers";
|
||||
const sdk = require("@defillama/sdk");
|
||||
|
||||
const subgraphUrl = "https://api.thegraph.com/subgraphs/name/venusprotocol/venus-subgraph";
|
||||
const subgraphUrl = sdk.graph.modifyEndpoint('7h65Zf3pXXPmf8g8yZjjj2bqYiypVxems5d8riLK1DyR');
|
||||
|
||||
const accountsQuery = gql`
|
||||
query accounts($lastId: ID, $pageSize: Int) {
|
||||
|
||||
6
package-lock.json
generated
6
package-lock.json
generated
@@ -886,9 +886,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@defillama/sdk": {
|
||||
"version": "5.0.67",
|
||||
"resolved": "https://registry.npmjs.org/@defillama/sdk/-/sdk-5.0.67.tgz",
|
||||
"integrity": "sha512-gOJACkDuPyNicL2zs0J93LkbDOkcviSaNQAvRH/wQkeXcdo7tHwN5YH59sFFE6Ge6gsCgcI0KnyuO6E0yjmo8g==",
|
||||
"version": "5.0.69",
|
||||
"resolved": "https://registry.npmjs.org/@defillama/sdk/-/sdk-5.0.69.tgz",
|
||||
"integrity": "sha512-IYdT4P5vG9xt14tM9RuT1+uBUyD8oL6fdTWC3iwOlwATjWKA1kwOhucCXNFE8sc2KKugwTUfQuGp8Q3fHDxAfw==",
|
||||
"dependencies": {
|
||||
"@aws-sdk/client-s3": "^3.400.0",
|
||||
"@elastic/elasticsearch": "^8.13.1",
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
const sdk = require("@defillama/sdk");
|
||||
const { cachedGraphQuery } = require('../helper/cache')
|
||||
|
||||
const graphs = {
|
||||
ethereum: "https://api.thegraph.com/subgraphs/name/aktionariat/brokerbot",
|
||||
optimism: "https://api.thegraph.com/subgraphs/name/aktionariat/brokerbot-optimism",
|
||||
ethereum: sdk.graph.modifyEndpoint('2ZoJCp4S7YP7gbYN2ndsYNjPeZBV1PMti7BBoPRRscNq'),
|
||||
optimism: sdk.graph.modifyEndpoint('3QfEXbPfP23o3AUzcmjTfRtUUd4bfrFj3cJ4jET57CTX'),
|
||||
}
|
||||
|
||||
function tvlPaged(chain) {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
const sdk = require("@defillama/sdk");
|
||||
// const LendingContract = "0xdc93413cbe690a1643d285c9f075b271372c9b36"
|
||||
const { graphQuery } = require('../helper/http')
|
||||
const ADDRESSES = require('../helper/coreAssets.json')
|
||||
@@ -9,7 +10,7 @@ async function borrowed(api) {
|
||||
}
|
||||
}`
|
||||
|
||||
const { loans } = await graphQuery("https://api.thegraph.com/subgraphs/name/lucidao-developer/altr-lend", query);
|
||||
const { loans } = await graphQuery(sdk.graph.modifyEndpoint('AVmBsxjouEH6wvG2HCGPCNNt9eDeX2esaRZ7L7jJaTnD'), query);
|
||||
api.add(ADDRESSES.polygon.USDT, loans.map(i => i.amount));
|
||||
return api.getBalances()
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
const sdk = require("@defillama/sdk");
|
||||
const { blockQuery } = require("../helper/http");
|
||||
const { cachedGraphQuery } = require("../helper/cache");
|
||||
|
||||
@@ -8,27 +9,27 @@ const config = {
|
||||
arbitrum: {
|
||||
contango: CONTANGO_PROXY,
|
||||
contango_lens: CONTANGO_LENS_PROXY,
|
||||
grapUrl: "https://api.thegraph.com/subgraphs/name/contango-xyz/v2-arbitrum",
|
||||
grapUrl: sdk.graph.modifyEndpoint('BmHqxUxxLuMoDYgbbXU6YR8VHUTGPBf9ghD7XH6RYyTQ'),
|
||||
},
|
||||
optimism: {
|
||||
contango: CONTANGO_PROXY,
|
||||
contango_lens: CONTANGO_LENS_PROXY,
|
||||
grapUrl: "https://api.thegraph.com/subgraphs/name/contango-xyz/v2-optimism",
|
||||
grapUrl: sdk.graph.modifyEndpoint('PT2TcgYqhQmx713U3KVkdbdh7dJevgoDvmMwhDR29d5'),
|
||||
},
|
||||
ethereum: {
|
||||
contango: CONTANGO_PROXY,
|
||||
contango_lens: CONTANGO_LENS_PROXY,
|
||||
grapUrl: "https://api.thegraph.com/subgraphs/name/contango-xyz/v2-mainnet",
|
||||
grapUrl: sdk.graph.modifyEndpoint('FSn2gMoBKcDXEHPvshaXLPC1EJN7YsfCP78swEkXcntY'),
|
||||
},
|
||||
polygon: {
|
||||
contango: CONTANGO_PROXY,
|
||||
contango_lens: CONTANGO_LENS_PROXY,
|
||||
grapUrl: "https://api.thegraph.com/subgraphs/name/contango-xyz/v2-polygon",
|
||||
grapUrl: sdk.graph.modifyEndpoint('5t3rhrAYt79iyjm929hgwyiaPLk9uGxQRMiKEasGgeSP'),
|
||||
},
|
||||
xdai: {
|
||||
contango: CONTANGO_PROXY,
|
||||
contango_lens: CONTANGO_LENS_PROXY,
|
||||
grapUrl: "https://api.thegraph.com/subgraphs/name/contango-xyz/v2-gnosis",
|
||||
grapUrl: sdk.graph.modifyEndpoint('9h1rHUKJK9CGqztdaBptbj4Q9e2zL9jABuu9LpRQ1XkC'),
|
||||
},
|
||||
base: {
|
||||
contango: CONTANGO_PROXY,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
const sdk = require("@defillama/sdk");
|
||||
const { cachedGraphQuery } = require('./helper/cache');
|
||||
|
||||
const { sumTokens, queryAddresses } = require('./helper/chain/radixdlt');
|
||||
@@ -5,7 +6,7 @@ const { getConfig } = require('./helper/cache');
|
||||
const { get } = require('./helper/http');
|
||||
const sdk = require('@defillama/sdk');
|
||||
|
||||
const graphUrl = 'https://api.thegraph.com/subgraphs/name/omegasyndicate/defiplaza';
|
||||
const graphUrl = sdk.graph.modifyEndpoint('4z9FBF12CrfoQJhAkWicqzY2fKYN9QRmuzSsizVXhjKa');
|
||||
|
||||
module.exports = {
|
||||
ethereum: {
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
const sdk = require("@defillama/sdk");
|
||||
const { cachedGraphQuery } = require('../helper/cache')
|
||||
const { sumTokens2 } = require('../helper/unwrapLPs')
|
||||
|
||||
const config = {
|
||||
polygon: { endpoint: 'https://api.thegraph.com/subgraphs/name/enzymefinance/enzyme-core-polygon' },
|
||||
ethereum: { endpoint: 'https://api.thegraph.com/subgraphs/name/enzymefinance/enzyme-core' },
|
||||
polygon: { endpoint: sdk.graph.modifyEndpoint('GCAHDyqvZBLMwqdb9U7AqWAN4t4TSwR3aXMHDoUUFuRV') },
|
||||
ethereum: { endpoint: sdk.graph.modifyEndpoint('9DLBBLep5UyU16kUQRvxBCMqko4q9XzuE4XsMMpARhKK') },
|
||||
}
|
||||
const query = `query get_accounts($lastId: String!) {
|
||||
vaults(
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
const sdk = require("@defillama/sdk");
|
||||
const ADDRESSES = require('../helper/coreAssets.json')
|
||||
const sdk = require('@defillama/sdk')
|
||||
const abi = require('./abi.json')
|
||||
@@ -49,7 +50,7 @@ async function avaxTvl(_, _block, cb) {
|
||||
async function tvl(chain, block, chainId) {
|
||||
const balances = {}
|
||||
if (chain === 'polygon') {
|
||||
const globalData = (await request("https://api.thegraph.com/subgraphs/name/ethalend/etha-v1", globalDataQuery, { block: block - 100 })).globalDatas
|
||||
const globalData = (await request(sdk.graph.modifyEndpoint('3fJ6wwsbCeMUrsohMRsmzgzrWwRMWnEac8neYkYQuJaz'), globalDataQuery, { block: block - 100 })).globalDatas
|
||||
await Promise.all(globalData.filter(v => v.type === "lending").map(async v => {
|
||||
if (v.address === "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee") {
|
||||
v.address = ADDRESSES.polygon.WMATIC_2
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
const sdk = require("@defillama/sdk");
|
||||
const { blockQuery } = require('../helper/http')
|
||||
|
||||
const queryBlock = `query data($block: Int){
|
||||
@@ -11,7 +12,7 @@ const queryBlock = `query data($block: Int){
|
||||
}`
|
||||
|
||||
const SUBGRAPH_URL =
|
||||
"https://api.thegraph.com/subgraphs/name/dimasriat/factor-leverage-vault";
|
||||
sdk.graph.modifyEndpoint('BZhGLLFicmKB9N9oMgDEAP8HmhVxTTjjxQA3ctGewAFc');
|
||||
|
||||
async function tvl(api) {
|
||||
const { leverageVaultPairStates } = await blockQuery(SUBGRAPH_URL, queryBlock, { api })
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
const sdk = require("@defillama/sdk");
|
||||
const { staking } = require("../helper/staking");
|
||||
const { sumTokens2 } = require('../helper/unwrapLPs');
|
||||
const { cachedGraphQuery } = require('../helper/cache');
|
||||
@@ -6,7 +7,7 @@ const FCTR = "0x6dD963C510c2D2f09d5eDdB48Ede45FeD063Eb36"
|
||||
const veFCTR = "0xA032082B08B2EF5A6C3Ea80DaEac58300F68FB73"
|
||||
|
||||
async function tvl(api) {
|
||||
const endpoint = 'https://api.thegraph.com/subgraphs/name/yanuar-ar/factor-arbitrum'
|
||||
const endpoint = sdk.graph.modifyEndpoint('2ZavYD1JPYUy8HMheuYcyKCswHR5djpEq2xuWs7PzPRe')
|
||||
const res = await cachedGraphQuery('factor-v1', endpoint, `{vaultGeneses { id }}`)
|
||||
const indices = res.vaultGeneses.map(v => v.id)
|
||||
const uBalances = await api.multiCall({ abi: 'uint256[]:underlyingAssetsBalance', calls: indices })
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
const sdk = require("@defillama/sdk");
|
||||
const { request, gql } = require("graphql-request");
|
||||
const { getBlock } = require('../helper/http');
|
||||
|
||||
const graph_endpoint = 'https://api.thegraph.com/subgraphs/name/rout-horizon/bsc15-issuance'
|
||||
const graph_endpoint = sdk.graph.modifyEndpoint('3URCfxZm32CHDYikF3eu93YCVpDKQyofm42FUh7KkRY9')
|
||||
const graphQuery = gql`
|
||||
query get_tvl($block: Int) {
|
||||
snxholders(orderBy:collateral,orderDirection:desc,block: { number: $block },first:1000,skip:0, where: {initialDebtOwnership_gt: 0, debtEntryAtIndex_gt: 0}) {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
const sdk = require("@defillama/sdk");
|
||||
const { GraphQLClient, } = require('graphql-request')
|
||||
const utils = require('./helper/utils');
|
||||
const sdk = require('@defillama/sdk')
|
||||
@@ -13,7 +14,7 @@ async function tvl() {
|
||||
}
|
||||
}
|
||||
`;
|
||||
var endpoint = 'https://api.thegraph.com/subgraphs/name/suntzu93/tbtc';
|
||||
var endpoint = sdk.graph.modifyEndpoint('8vQM7kTwPoW37U5FWgZLRpcoMyYKExMcHr5JGgnvzxk5');
|
||||
var graphQLClient = new GraphQLClient(endpoint)
|
||||
const results2 = await graphQLClient.request(q2)
|
||||
var ethStaked = parseFloat(results2.totalBondedECDSAKeeps[0].totalBonded) + parseFloat(results2.totalBondedECDSAKeeps[0].totalAvailable);
|
||||
@@ -39,7 +40,7 @@ async function staking() {
|
||||
}
|
||||
`;
|
||||
|
||||
var endpoint = 'https://api.thegraph.com/subgraphs/name/suntzu93/keepnetwork';
|
||||
var endpoint = sdk.graph.modifyEndpoint('Pg2cbxfPGJtqRBwMutR69oapbodKmcXuQRsxPRaK57S');
|
||||
var graphQLClient = new GraphQLClient(endpoint)
|
||||
const results = await graphQLClient.request(q1)
|
||||
const keepPoolStaked = await utils.returnBalance('0x85Eee30c52B0b379b046Fb0F85F4f3Dc3009aFEC', '0xCf916681a6F08fa22e9EF3e665F2966Bf3089Ff1')
|
||||
|
||||
@@ -14,7 +14,7 @@ const MtrollerABI = {
|
||||
|
||||
async function fetch(query) {
|
||||
var endpoint =
|
||||
"https://api.thegraph.com/subgraphs/name/ohan8/mmo-finance-active-loans";
|
||||
sdk.graph.modifyEndpoint('DUQF7Lhwu1dzz2GwyNi3eRvjZeUnMNCDFjQRA8BYpoRJ');
|
||||
var graphQLClient = new GraphQLClient(endpoint);
|
||||
|
||||
const results = await graphQLClient.request(query)
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
const sdk = require("@defillama/sdk");
|
||||
const ADDRESSES = require('../helper/coreAssets.json')
|
||||
const { blockQuery } = require("../helper/http");
|
||||
const { getEnv } = require("../helper/env");
|
||||
@@ -94,7 +95,7 @@ const subgraphUrls = {
|
||||
arbitrum:
|
||||
"2XQDRQ9AXhp5us6PsNyRM5BxKWeXhy3BNQLynA6YmmjA",
|
||||
fantom:
|
||||
"https://api.thegraph.com/subgraphs/name/olympusdao/protocol-metrics-fantom",
|
||||
sdk.graph.modifyEndpoint('3qSJTWdWJETFzht814HVV9rVafwRLQp3k9mZhCF39bYd'),
|
||||
polygon:
|
||||
"JCVMW1dbqectgaSLRuKSen6FKe9RPMJRQhNYZa4iTgFb",
|
||||
};
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
const sdk = require("@defillama/sdk");
|
||||
const { toUSDTBalances } = require("../helper/balances");
|
||||
const { request, gql } = require("graphql-request");
|
||||
|
||||
async function tvlFromGraph() {
|
||||
const graphUrl =
|
||||
"https://api.thegraph.com/subgraphs/name/riccardogalbusera/orbit-subgraph";
|
||||
sdk.graph.modifyEndpoint('BRUJ3Y4Fpq4VuvoCAi4p9qv1SxZ6ghVtMK1Rg8igfxmi');
|
||||
const graphQuery = gql`
|
||||
query {
|
||||
positionManagerFactories(first: 1) {
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
const sdk = require("@defillama/sdk");
|
||||
const { cachedGraphQuery } = require('../helper/cache')
|
||||
|
||||
const GRAPH_URLS = {
|
||||
ethereum: "https://api.thegraph.com/subgraphs/name/templedao/origami-mainnet", // ethereum
|
||||
arbitrum: "https://api.thegraph.com/subgraphs/name/templedao/origami-arb", // arbitrum
|
||||
ethereum: sdk.graph.modifyEndpoint('GGN8RoYQBiw2Ui6wUeaKcHsBBSrQzQoryYi2feoTKwPX'), // ethereum
|
||||
arbitrum: sdk.graph.modifyEndpoint('AHT1ffJhw7NWdeH3XYbWzMmy5USbB22K3ecVDu8azGuF'), // arbitrum
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
const sdk = require("@defillama/sdk");
|
||||
const { GraphQLClient, gql } = require("graphql-request");
|
||||
const { staking } = require("../helper/staking");
|
||||
|
||||
@@ -5,7 +6,7 @@ const CLAM = "0xC250e9987A032ACAC293d838726C511E6E1C029d";
|
||||
const PearlBank = "0x845EB7730a8D37e8D190Fb8bb9c582038331B48a";
|
||||
|
||||
async function tvl({timestamp}, block, chainBlocks) {
|
||||
let endpoint = "https://api.thegraph.com/subgraphs/name/otterclam/otterclam";
|
||||
let endpoint = sdk.graph.modifyEndpoint('CejrrsnSQAxHJBpkgiBrLHQZ7h2MkK9QArM8bJvN9GuQ');
|
||||
let graphQLClient = new GraphQLClient(endpoint);
|
||||
let query = gql`
|
||||
query tvl($start: BigInt!, $end: BigInt!) {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
const sdk = require("@defillama/sdk");
|
||||
const { graphQuery } = require('../helper/http')
|
||||
|
||||
const subgraphUrl = "https://api.thegraph.com/subgraphs/name/pacmanfinance/pacman-arbitrum";
|
||||
const subgraphUrl = sdk.graph.modifyEndpoint('9xteTELUdzjii1yLASJm6CxSpYuS1bmE6DGWMMhgkq2k');
|
||||
|
||||
const vaultsQuery = `
|
||||
query {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
const sdk = require("@defillama/sdk");
|
||||
const { staking } = require("../helper/staking");
|
||||
const { sumTokens2 } = require("../helper/unwrapLPs");
|
||||
const { cachedGraphQuery } = require('../helper/cache')
|
||||
@@ -13,7 +14,7 @@ const query = `{
|
||||
|
||||
async function tvl(api) {
|
||||
if (api.timestamp > +new Date("2023-02-17") / 1e3) blacklistedTokens.push("0xdaCDe03d7Ab4D81fEDdc3a20fAA89aBAc9072CE2") // USP was hacked
|
||||
const { pools } = await cachedGraphQuery("platypus-finance", "https://api.thegraph.com/subgraphs/name/platypus-finance/platypus-dashboard", query)
|
||||
const { pools } = await cachedGraphQuery("platypus-finance", sdk.graph.modifyEndpoint('Bu5QPRWGnZB6NxU4S7kAKQZJpY4pHmAq3TV69V1W2Qqw'), query)
|
||||
console.log(pools)
|
||||
const tokensAndOwners = pools.map(i => i.assetsList.map(v => [v.token.id, v.id])).flat()
|
||||
return sumTokens2({ api, tokensAndOwners, blacklistedTokens });
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
const sdk = require("@defillama/sdk");
|
||||
const ADDRESSES = require('../helper/coreAssets.json')
|
||||
module.exports = {
|
||||
ADDRESS_ZERO: ADDRESSES.null,
|
||||
@@ -7,16 +8,16 @@ module.exports = {
|
||||
NETWORK_POLYGON: {
|
||||
id: 137,
|
||||
name: 'polygon',
|
||||
subgraph: 'https://api.thegraph.com/subgraphs/name/pods-finance/pods-matic'
|
||||
subgraph: sdk.graph.modifyEndpoint('5yQETkt77T9htftwDSW4WJpoGkPH9KBQzQLzPnuyZ8ti')
|
||||
},
|
||||
NETWORK_MAINNET: {
|
||||
id: 1,
|
||||
name: 'ethereum',
|
||||
subgraph: 'https://api.thegraph.com/subgraphs/name/pods-finance/pods'
|
||||
subgraph: sdk.graph.modifyEndpoint('9qiAuWa5ryYeTj1gLy9BGiiVkfgkXnsN25wkYQSfyaws')
|
||||
},
|
||||
NETWORK_ARBITRUM: {
|
||||
id: 42161,
|
||||
name: 'arbitrum',
|
||||
subgraph: 'https://api.thegraph.com/subgraphs/name/pods-finance/pods-arbitrum'
|
||||
subgraph: sdk.graph.modifyEndpoint('5Qz4mWABKaCfr9uGnteAAwmWmBAyQtRDYgB3ydU556HX')
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
const sdk = require("@defillama/sdk");
|
||||
const { cachedGraphQuery } = require('../helper/cache')
|
||||
const abi = require('./abi.json')
|
||||
|
||||
const GRAPH_URLS = {
|
||||
ethereum: [
|
||||
'https://api.thegraph.com/subgraphs/name/pooltogether/pooltogether-v3_1_0',
|
||||
'https://api.thegraph.com/subgraphs/name/pooltogether/pooltogether-v3_3_2',
|
||||
'https://api.thegraph.com/subgraphs/name/pooltogether/pooltogether-v3_3_8',
|
||||
'https://api.thegraph.com/subgraphs/name/pooltogether/pooltogether-v3_4_3'
|
||||
sdk.graph.modifyEndpoint('DpnLpjCKyyQ8TZnD2V6VNyx4JR7bGrCfGaLbrrsn5r7s'),
|
||||
sdk.graph.modifyEndpoint('6SXRM2pyUiLKgNvXU6fiSF1E3dDDFGGAFiMurbZhZew8'),
|
||||
sdk.graph.modifyEndpoint('6fBV3gC2fjdPsKvnmhi2SNzp74RYZj3tS1AiWFGHapyX'),
|
||||
sdk.graph.modifyEndpoint('C12o8EA9X9EKjjDoxKGUiM9YniNT4RVCiV6jGuYWwwZX')
|
||||
],
|
||||
celo: ['https://api.thegraph.com/subgraphs/name/pooltogether/celo-v3_4_5'],
|
||||
bsc: ['https://api.thegraph.com/subgraphs/name/pooltogether/bsc-v3_4_3']
|
||||
celo: [sdk.graph.modifyEndpoint('7RqWfG27PACLZEvSMGtcK87qnV1DJCQfYjNdqwHDQdTe')],
|
||||
bsc: [sdk.graph.modifyEndpoint('9Qmsc7YBLy2sdbEAcGv8vkpaqdGm3YMYoqiWLCid64MN')]
|
||||
}
|
||||
const GRAPH_QUERY = `
|
||||
query GET_POOLS {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
const sdk = require("@defillama/sdk");
|
||||
const sdk = require('@defillama/sdk');
|
||||
const { sumTokens2, } = require('../helper/unwrapLPs');
|
||||
const { cachedGraphQuery } = require('../helper/cache');
|
||||
@@ -17,7 +18,7 @@ const PRIME_SATELLITE_NETWORKS = {
|
||||
// filecoin: 314
|
||||
};
|
||||
|
||||
const primeSubgraphUrl = 'https://api.thegraph.com/subgraphs/name/prime-protocol/liquidity-incentives';
|
||||
const primeSubgraphUrl = sdk.graph.modifyEndpoint('6LrvPGTZeMZfEQh4p9DvDBBv4G8cjhLs4v3mdiUycERp');
|
||||
|
||||
const primeMarketsQuery = `{
|
||||
markets { address chainId }
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
const sdk = require("@defillama/sdk");
|
||||
const ADDRESSES = require('../helper/coreAssets.json')
|
||||
const { getChainTvl } = require('../helper/getUniSubgraphTvl');
|
||||
const { staking } = require('../helper/staking');
|
||||
@@ -8,7 +9,7 @@ module.exports = {
|
||||
polygon:{
|
||||
staking: staking("0x958d208Cdf087843e9AD98d23823d32E17d723A1", ADDRESSES.polygon.QUICK),
|
||||
tvl: getChainTvl({
|
||||
polygon: 'https://api.thegraph.com/subgraphs/name/sameepsi/quickswap06'
|
||||
polygon: sdk.graph.modifyEndpoint('FUWdkXWpi8JyhAnhKL5pZcVshpxuaUQG8JHMDqNCxjPd')
|
||||
})('polygon')
|
||||
},
|
||||
hallmarks:[
|
||||
|
||||
@@ -3,15 +3,15 @@ const { request, gql } = require("graphql-request");
|
||||
const sdk = require("@defillama/sdk");
|
||||
const { getTokenSupply } = require('../helper/solana')
|
||||
|
||||
const ethGraphUrl = "https://api.thegraph.com/subgraphs/name/renproject/renvm";
|
||||
const ethGraphUrl = sdk.graph.modifyEndpoint('AJaQdD8DUunuwHCbAsZk5h62AfyNG1etRtK9EcDH7gwH');
|
||||
const bscGraphUrl =
|
||||
"https://api.thegraph.com/subgraphs/name/renproject/renvm-binance-smart-chain";
|
||||
sdk.graph.modifyEndpoint('6UCMxzH5LPvZrLhcpSVrSDhoKRYJchvHM7vnTUo2bBp2');
|
||||
const avalancheGraphUrl =
|
||||
"https://api.thegraph.com/subgraphs/name/renproject/renvm-avalanche";
|
||||
sdk.graph.modifyEndpoint('GBRcEpUZTHMyjmtkPsHMYmHuPtcLFqnU5SPvpaLdfmau');
|
||||
const fantomGraphUrl =
|
||||
"https://api.thegraph.com/subgraphs/name/renproject/renvm-fantom";
|
||||
sdk.graph.modifyEndpoint('2TV9sKK7fLvfsbnUox6irt3XbiHAzw1fvbh9j8vnBXmH');
|
||||
const polygonGraphUrl =
|
||||
"https://api.thegraph.com/subgraphs/name/renproject/renvm-polygon";
|
||||
sdk.graph.modifyEndpoint('GQCGcDW16JfawMXegTemUte8PPyJQVvtF6kACvMYwX8V');
|
||||
const graphQuery = gql`
|
||||
{
|
||||
assets {
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
const sdk = require("@defillama/sdk");
|
||||
module.exports = {
|
||||
aurora: {
|
||||
coreAddress: "0x40A01A4064b690cA33FA52d315ec02015eF5287E",
|
||||
startBlock: 58983267,
|
||||
graphUrl:
|
||||
"https://api.thegraph.com/subgraphs/name/recursive-research/rift-subgraph-aurora",
|
||||
sdk.graph.modifyEndpoint('GkqMC7XyPQFceCjT7rdqc62nzfF5WsVCn6HA9q17VBW'),
|
||||
},
|
||||
ethereum: {
|
||||
coreAddress: "0x5D7e616B2c0bf268494A482e315a60814F97dBC8",
|
||||
startBlock: 14845882,
|
||||
graphUrl:
|
||||
"https://api.thegraph.com/subgraphs/name/recursive-research/rift-subgraph",
|
||||
sdk.graph.modifyEndpoint('44q7UpeVu33BTDwHd1iHJnEYXwcF9NM6HRd5oSVdLFDQ'),
|
||||
},
|
||||
};
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
const sdk = require("@defillama/sdk");
|
||||
const { cachedGraphQuery } = require('../helper/cache')
|
||||
const { sumTokens2 } = require('../helper/unwrapLPs')
|
||||
|
||||
@@ -17,7 +18,7 @@ module.exports = {
|
||||
|
||||
const config = {
|
||||
optimism: {
|
||||
endpoint: 'https://api.thegraph.com/subgraphs/name/denverbaumgartner/rubiconmetricsoptimism',
|
||||
endpoint: sdk.graph.modifyEndpoint('AUcAkUd4sJutFD3hYQfvB6uvXrEdYP26qiZwZ5qyrgTw'),
|
||||
owners: [
|
||||
RUBICON_MARKET_OPTIMISM, // Rubicon Market
|
||||
"0xB0bE5d911E3BD4Ee2A8706cF1fAc8d767A550497", // bathETH
|
||||
@@ -30,7 +31,7 @@ const config = {
|
||||
]
|
||||
},
|
||||
arbitrum: {
|
||||
endpoint: 'https://api.thegraph.com/subgraphs/name/jossduff/rubiconmetricsarbitrum',
|
||||
endpoint: sdk.graph.modifyEndpoint('B4cTJXyWHMLkxAcpLGK7dJfArJdrbyWukCoCLPDT1f7n'),
|
||||
owners: [RUBICON_MARKET_ARBITRUM,]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
const sdk = require("@defillama/sdk");
|
||||
const { isWhitelistedToken } = require('../helper/streamingHelper')
|
||||
const { cachedGraphQuery } = require('../helper/cache')
|
||||
|
||||
@@ -33,11 +34,11 @@ const config = {
|
||||
ethereum: { endpoints: ['5EgaXheiBXZBCkepyGUYAu8pN31Dkbh7bpGtnLPqaT5m'], },
|
||||
arbitrum: { endpoints: ['AR77w8PwmkAG7c9DJSsfW6yTrC5UdvdQ1Hz5ZTCuaUWz'], },
|
||||
bsc: { endpoints: ['BVyi15zcH5eUg5PPKfRDDesezMezh6cAkn8LPvh7MVAF'], },
|
||||
xdai: { endpoints: ['https://api.thegraph.com/subgraphs/name/sablier-labs/sablier-v2-gnosis'], },
|
||||
optimism: { endpoints: ['https://api.thegraph.com/subgraphs/name/sablier-labs/sablier-v2-optimism'], },
|
||||
xdai: { endpoints: [sdk.graph.modifyEndpoint('EXhNLbhCbsewJPx4jx5tutNXpxwdgng2kmX1J7w1bFyu')], },
|
||||
optimism: { endpoints: [sdk.graph.modifyEndpoint('6e6Dvs1yDpsWDDREZRqxGi54SVdvTNzUdKpKJxniKVrp')], },
|
||||
polygon: { endpoints: ['J8XJaFtxcz7xowzVJ5LwZhi35N5Lbtwfrt4sea6G1ysJ'], },
|
||||
avax: { endpoints: ['https://api.thegraph.com/subgraphs/name/sablier-labs/sablier-v2-avalanche'], },
|
||||
base: { endpoints: ['https://api.thegraph.com/subgraphs/name/sablier-labs/sablier-v2-base'], },
|
||||
avax: { endpoints: [sdk.graph.modifyEndpoint('FdVwZuMV43yCb1nPmjnLQwmzS58wvKuLMPzcZ4UWgWAc')], },
|
||||
base: { endpoints: [sdk.graph.modifyEndpoint('HS6B8Wi9ZY7D9bjHEuJwDqHa5eCMX5d6H59YyGVnQ5QP')], },
|
||||
blast: { endpoints: ['https://api.studio.thegraph.com/query/57079/sablier-v2-blast/version/latest'], },
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
const sdk = require("@defillama/sdk");
|
||||
const ADDRESSES = require('../helper/coreAssets.json')
|
||||
const { cachedGraphQuery } = require('../helper/cache')
|
||||
|
||||
@@ -8,7 +9,7 @@ async function tvl(api) {
|
||||
api.addTokens(assets, totalAssets)
|
||||
|
||||
// const userAccounts = await api.call({ target: "0x17b07cfbab33c0024040e7c299f8048f4a49679b", abi: "address[]:getAllAccounts", })
|
||||
const data = await cachedGraphQuery('sentiment', 'https://api.thegraph.com/subgraphs/name/r0ohafza/sentiment', query, { fetchById: true, })
|
||||
const data = await cachedGraphQuery('sentiment', sdk.graph.modifyEndpoint('H4hxkyy4kLmFsZZCatedvHpWT1ZvqKcfv2FFYXLxDm9W'), query, { fetchById: true, })
|
||||
const userAccounts = data.map(i => i.id)
|
||||
const [equity, borrows] = await Promise.all([
|
||||
api.multiCall({ target: "0xc0ac97A0eA320Aa1E32e9DEd16fb580Ef3C078Da", calls: userAccounts, abi: "function getBalance(address account) view returns (uint256)", permitFailure: true, }),
|
||||
|
||||
@@ -4,8 +4,8 @@ const { BigNumber } = require('bignumber.js');
|
||||
|
||||
// https://thegraph.com/hosted-service/subgraph/soulswapfantom/coffinbox
|
||||
const graphUrls = {
|
||||
'fantom': 'https://api.thegraph.com/subgraphs/name/soulswapfinance/fantom-coffinbox',
|
||||
'avax': 'https://api.thegraph.com/subgraphs/name/soulswapfinance/coffinbox-avalanche',
|
||||
'fantom': sdk.graph.modifyEndpoint('FhS8cRWsTPZwXfmn7b8YGvKii2h2ghr2v7ah5T8oiDmo'),
|
||||
'avax': sdk.graph.modifyEndpoint('6WonmxWbw3MSVXVR5P4VhC8jWBEG5RkipWzxhAA67hoP'),
|
||||
}
|
||||
|
||||
const coffinboxQuery = gql`
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
const sdk = require("@defillama/sdk");
|
||||
const { cachedGraphQuery } = require('../helper/cache')
|
||||
const { stakings } = require("../helper/staking");
|
||||
|
||||
@@ -5,25 +6,25 @@ const { stakings } = require("../helper/staking");
|
||||
const supportedChains = [
|
||||
{
|
||||
name: 'Polygon',
|
||||
subgraphEndpoint: 'https://api.thegraph.com/subgraphs/name/steerprotocol/steer-protocol-polygon',
|
||||
subgraphEndpoint: sdk.graph.modifyEndpoint('uQxLz6EarmJcr2ymRRmTnrRPi8cCqas4XcPQb71HBvw'),
|
||||
chainId: 137,
|
||||
identifier: 'polygon'
|
||||
},
|
||||
{
|
||||
name: 'Arbitrum',
|
||||
subgraphEndpoint: 'https://api.thegraph.com/subgraphs/name/steerprotocol/steer-protocol-arbitrum',
|
||||
subgraphEndpoint: sdk.graph.modifyEndpoint('HVC4Br5yprs3iK6wF8YVJXy4QZWBNXTCFp8LPe3UpcD4'),
|
||||
chainId: 42161,
|
||||
identifier: 'arbitrum'
|
||||
},
|
||||
{
|
||||
name: 'Optimism',
|
||||
subgraphEndpoint: 'https://api.thegraph.com/subgraphs/name/steerprotocol/steer-protocol-optimism',
|
||||
subgraphEndpoint: sdk.graph.modifyEndpoint('GgW1EwNARL3dyo3acQ3VhraQQ66MHT7QnYuGcQc5geDG'),
|
||||
chainId: 10,
|
||||
identifier: 'optimism'
|
||||
},
|
||||
{
|
||||
name: 'Binance',
|
||||
subgraphEndpoint: 'https://api.thegraph.com/subgraphs/name/steerprotocol/steer-protocol-bsc',
|
||||
subgraphEndpoint: sdk.graph.modifyEndpoint('GLDP56fPGDz3MtmhtfTkz5CxWiqiNLACVrsJ9RqQeL4U'),
|
||||
chainId: 56,
|
||||
identifier: 'bsc'
|
||||
},
|
||||
@@ -35,7 +36,7 @@ const supportedChains = [
|
||||
},
|
||||
{
|
||||
name: 'Avalanche',
|
||||
subgraphEndpoint: 'https://api.thegraph.com/subgraphs/name/steerprotocol/steer-protocol-avalanche',
|
||||
subgraphEndpoint: sdk.graph.modifyEndpoint('GZotTj3rQJ8ZqVyodtK8TcnKcUxMgeF7mCJHGPYbu8dA'),
|
||||
chainId: 43114,
|
||||
identifier: 'avax'
|
||||
},
|
||||
@@ -101,7 +102,7 @@ const supportedChains = [
|
||||
},
|
||||
{
|
||||
name: 'Fantom',
|
||||
subgraphEndpoint: 'https://api.thegraph.com/subgraphs/name/rakeshbhatt10/steer-protocol-fantom-test',
|
||||
subgraphEndpoint: sdk.graph.modifyEndpoint('8k6x2Uho5PEqjxHx5SeSE334MEaxSZqMZhH6p5XYvqjM'),
|
||||
chainId: 250,
|
||||
identifier: 'fantom'
|
||||
},
|
||||
@@ -143,7 +144,7 @@ const supportedChains = [
|
||||
},
|
||||
// {
|
||||
// name: 'Celo',
|
||||
// subgraphEndpoint: 'https://api.thegraph.com/subgraphs/name/rakeshbhatt10/steer-test-celo',
|
||||
// subgraphEndpoint: sdk.graph.modifyEndpoint('DDwt4z55qLHPNmasiQXFH3nRjgCBrBhsiz3uEqKRJoa'),
|
||||
// chainId: 42220,
|
||||
// identifier: 'celo'
|
||||
// },
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
const sdk = require("@defillama/sdk");
|
||||
const { graphFetchById, } = require('../helper/cache')
|
||||
const { ART_BLOCKS, sumArtBlocks } = require('../helper/nft')
|
||||
const sdk = require('@defillama/sdk')
|
||||
@@ -34,7 +35,7 @@ module.exports = {
|
||||
ethereum: {
|
||||
tvl: async (api) => {
|
||||
const data = await graphFetchById({
|
||||
endpoint: 'https://api.thegraph.com/subgraphs/name/zeframlou/sudoswap',
|
||||
endpoint: sdk.graph.modifyEndpoint('5ZEPsiros7UhV5noPBHHkzy1rfSBFRP2d2ghHZHHCugd'),
|
||||
query,
|
||||
api,
|
||||
options: {
|
||||
|
||||
@@ -6,8 +6,8 @@ const { transformBalances } = require('./helper/portedTokens')
|
||||
|
||||
// Superfluid Supertokens can be retrieved using GraphQl API - cannot use block number to retrieve historical data at the moment though
|
||||
// TheGraph URL before being deprecated, before 2021-12-23
|
||||
// const polygonGraphUrl = 'https://api.thegraph.com/subgraphs/name/superfluid-finance/superfluid-matic'
|
||||
// const xdaiGraphUrl = 'https://api.thegraph.com/subgraphs/name/superfluid-finance/superfluid-xdai'
|
||||
// const polygonGraphUrl = sdk.graph.modifyEndpoint('BoiJR4mfVpVthWjTcansrCUFCjKY9MfDxgTfzkf4YpAN')
|
||||
// const xdaiGraphUrl = sdk.graph.modifyEndpoint('A3LhWnFQR13mxQPFGUZML9vyBrLLKhLJBhfFsrdShxBU')
|
||||
|
||||
const supertokensQuery = `
|
||||
query get_supertokens($block: Int) {
|
||||
@@ -99,12 +99,12 @@ async function retrieveSupertokensBalances(chain, block, isVesting, ts, graphUrl
|
||||
}
|
||||
|
||||
const config = {
|
||||
avax: { graph: 'https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-avalanche-c', },
|
||||
polygon: { graph: 'https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-matic', },
|
||||
xdai: { graph: 'https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-xdai', },
|
||||
optimism: { graph: 'https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-optimism-mainnet', },
|
||||
arbitrum: { graph: 'https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-arbitrum-one', },
|
||||
bsc: { graph: 'https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-bsc-mainnet', },
|
||||
avax: { graph: sdk.graph.modifyEndpoint('CtYR3ng4ED64HVEzDo49eKQgEf78RERiC8mDUtwLxda'), },
|
||||
polygon: { graph: sdk.graph.modifyEndpoint('7d9iBvDoM43SZiZhRR2pnpW8z3ujSEy9nC6RuqnufRU9'), },
|
||||
xdai: { graph: sdk.graph.modifyEndpoint('DE6fybqxjXLNvqGpd4QLAD92kAZNEmha1ZfKvS2qM376'), },
|
||||
optimism: { graph: sdk.graph.modifyEndpoint('S48f1C3KhNB2YbEMDxYHPzZ3FYt27fQZdruKfSTeEdZ'), },
|
||||
arbitrum: { graph: sdk.graph.modifyEndpoint('ES5GNHtiaqP6jFydhUyD9R4RackYrbGr6LEL1ZDauktd'), },
|
||||
bsc: { graph: sdk.graph.modifyEndpoint('FzYUiDH968QKbjURULGE5Pwh1ZRvcBNjDcut5YSiMYnj'), },
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
|
||||
@@ -24,23 +24,23 @@ const toAmountAbi =
|
||||
|
||||
const bentoSubgraphs = {
|
||||
ethereum:
|
||||
"https://api.thegraph.com/subgraphs/name/sushiswap/bentobox-ethereum",
|
||||
polygon: "https://api.thegraph.com/subgraphs/name/sushiswap/bentobox-polygon",
|
||||
fantom: "https://api.thegraph.com/subgraphs/name/sushiswap/bentobox-fantom",
|
||||
bsc: "https://api.thegraph.com/subgraphs/name/sushiswap/bentobox-bsc",
|
||||
avax: "https://api.thegraph.com/subgraphs/name/sushiswap/bentobox-avalanche",
|
||||
sdk.graph.modifyEndpoint('8HYeoDopVqqvb5RJEV2TtSzFsouYPz8cownnG3mbhiGy'),
|
||||
polygon: sdk.graph.modifyEndpoint('6kJg5kFoQY8B8Ge2hqswHMqZDcmsR1TLUUz7AKov69fy'),
|
||||
fantom: sdk.graph.modifyEndpoint('2KqXx6dGw7T4mZeGKyzQ9m9iyuCMjPR8PntLB9Gn9AEK'),
|
||||
bsc: sdk.graph.modifyEndpoint('BggyE3r5snDsjx19jgZcbiBH7cbtrkpjvyGLFHMdXekd'),
|
||||
avax: sdk.graph.modifyEndpoint('EhYaJodF1WQjKgxx1ZC63goeCwp5swD4AQRdaKXBm2xk'),
|
||||
arbitrum:
|
||||
"https://api.thegraph.com/subgraphs/name/sushiswap/bentobox-arbitrum",
|
||||
sdk.graph.modifyEndpoint('JZFyMKR4jnsFQ58q7dT6nbXenTzNgE176zTejc6Gf8Z'),
|
||||
optimism:
|
||||
"https://api.thegraph.com/subgraphs/name/sushiswap/bentobox-optimism",
|
||||
xdai: "https://api.thegraph.com/subgraphs/name/sushiswap/bentobox-gnosis",
|
||||
harmony: "https://api.thegraph.com/subgraphs/name/sushiswap/bentobox-harmony",
|
||||
sdk.graph.modifyEndpoint('8b4Hy4Kn7jCNAf9JFrqHb24LsqmapG4HrAsCrwdJf9Nu'),
|
||||
xdai: sdk.graph.modifyEndpoint('9jn9kA6SKCNxXQSqb93zZPLdLaru4FeZBwLNWAK4nfZ2'),
|
||||
harmony: sdk.graph.modifyEndpoint('Bioj7N3Rf2n7iBq9PVoaMie3WiuzPze9NMi7aSye7LFc'),
|
||||
moonbeam:
|
||||
"https://api.thegraph.com/subgraphs/name/sushiswap/bentobox-moonbeam",
|
||||
sdk.graph.modifyEndpoint('7wA5gqWNP4E1dPWBsTYvz5eQSDbtYDFgyU5BGdHr2UKp'),
|
||||
moonriver:
|
||||
"https://api.thegraph.com/subgraphs/name/sushiswap/bentobox-moonriver",
|
||||
sdk.graph.modifyEndpoint('73XEV6UQKpPSJn68WZBAYTwALcZtFJkFYn58ZoZUb7tn'),
|
||||
//metis: "",
|
||||
celo: "https://api.thegraph.com/subgraphs/name/sushiswap/bentobox-celo",
|
||||
celo: sdk.graph.modifyEndpoint('5DwkvjxPGVFFaWEMM68g1yztDdhCgJEYAxS6FuhkajzR'),
|
||||
//kava: "",
|
||||
};
|
||||
|
||||
@@ -60,23 +60,23 @@ const bentoQuery = gql`
|
||||
|
||||
const furoSubgraphs = {
|
||||
ethereum:
|
||||
"https://api.thegraph.com/subgraphs/name/sushi-subgraphs/furo-ethereum",
|
||||
sdk.graph.modifyEndpoint('D8vYJpKN5SEHUkUWKSuorsL6FRt7hAQMnywnC4e93ygf'),
|
||||
polygon:
|
||||
"https://api.thegraph.com/subgraphs/name/sushi-subgraphs/furo-polygon",
|
||||
fantom: "https://api.thegraph.com/subgraphs/name/sushi-subgraphs/furo-fantom",
|
||||
bsc: "https://api.thegraph.com/subgraphs/name/sushi-subgraphs/furo-bsc",
|
||||
avax: "https://api.thegraph.com/subgraphs/name/sushi-subgraphs/furo-avalanche",
|
||||
sdk.graph.modifyEndpoint('4KsDNsyJjKX6bjwVNJQmJ7Dm3wovYXSX37UR39rNaMX4'),
|
||||
fantom: sdk.graph.modifyEndpoint('E98zSR5UZBGBgQe2SSLZ5R6yj5GPqKDJcQJNDHTeV3cS'),
|
||||
bsc: sdk.graph.modifyEndpoint('2wBYezghRA3hEJLQB4njUZGDNxCdU3u2gsLP5yVvBqKk'),
|
||||
avax: sdk.graph.modifyEndpoint('8LVoX3JPEVAak8T8GoEfdJudMoP2bsGwd9tszJxo3Rnx'),
|
||||
arbitrum:
|
||||
"https://api.thegraph.com/subgraphs/name/sushi-subgraphs/furo-arbitrum",
|
||||
sdk.graph.modifyEndpoint('8eHhPeKDr646JH5KUBBcabAJzkWmLfu6pqBtpXQHa37F'),
|
||||
optimism:
|
||||
"https://api.thegraph.com/subgraphs/name/sushi-subgraphs/furo-optimism",
|
||||
xdai: "https://api.thegraph.com/subgraphs/name/sushi-subgraphs/furo-gnosis",
|
||||
sdk.graph.modifyEndpoint('8KnsmppMf9k6Qvyixxwmny7dYugTV7XT4htHTfyq3d69'),
|
||||
xdai: sdk.graph.modifyEndpoint('5ToxB5xubMh9osdEDeX98JBAyzUVwkReGXAT1CzQhZCB'),
|
||||
harmony:
|
||||
"https://api.thegraph.com/subgraphs/name/sushi-subgraphs/furo-harmony",
|
||||
sdk.graph.modifyEndpoint('9D9C3ppoDE1zuZk5adznngKomLYS8NnC9zxniSS8vzgH'),
|
||||
moonbeam:
|
||||
"https://api.thegraph.com/subgraphs/name/sushi-subgraphs/furo-moonbeam",
|
||||
sdk.graph.modifyEndpoint('HJxpcsmaPV3L6PsqGFBHLczeMnL7bEgmL1D65edGx8pf'),
|
||||
moonriver:
|
||||
"https://api.thegraph.com/subgraphs/name/sushi-subgraphs/furo-moonriver",
|
||||
sdk.graph.modifyEndpoint('9ZqdKjfu7o9dX1RThXHDV9EqMn5CTvgpsPKKbpANg8yC'),
|
||||
};
|
||||
|
||||
const furoQuery = gql`
|
||||
@@ -97,11 +97,11 @@ const furoQuery = gql`
|
||||
`;
|
||||
|
||||
const kashiSubgraphs = {
|
||||
ethereum: "https://api.thegraph.com/subgraphs/name/sushi-labs/kashi-ethereum",
|
||||
polygon: "https://api.thegraph.com/subgraphs/name/sushi-labs/kashi-polygon",
|
||||
arbitrum: "https://api.thegraph.com/subgraphs/name/sushi-labs/kashi-arbitrum",
|
||||
bsc: "https://api.thegraph.com/subgraphs/name/sushi-labs/kashi-bsc",
|
||||
avax: "https://api.thegraph.com/subgraphs/name/sushiswap/kashi-avalanche",
|
||||
ethereum: sdk.graph.modifyEndpoint('6Kf5cPeXUMVzfGCtzBnSxDU849w2YM2o9afn1uiPpy2m'),
|
||||
polygon: sdk.graph.modifyEndpoint('5F3eB4Cm5mxorArsyrbs2a1TDxctmk3znpDZ4LEzqrBJ'),
|
||||
arbitrum: sdk.graph.modifyEndpoint('G3rbmaF7w2ZLQjZgGoi12BzPeL9z4MTW662iVyjYmtiX'),
|
||||
bsc: sdk.graph.modifyEndpoint('D1TGHRKx2Q54ce2goyt9hbtKNuT94FDBsuPwtGg5EzRw'),
|
||||
avax: sdk.graph.modifyEndpoint('BHeJByyVoNuVtqufK3Nk7YYmFkBs43boYpKv8z6hQ5Q1'),
|
||||
};
|
||||
|
||||
const kashiQuery = gql`
|
||||
@@ -124,15 +124,15 @@ const kashiQuery = gql`
|
||||
|
||||
const tridentSubgraphs = {
|
||||
polygon: "https://api.thegraph.com/subgraphs/name/sushi-v2/trident-polygon",
|
||||
optimism: "https://api.thegraph.com/subgraphs/name/sushi-v2/trident-optimism",
|
||||
optimism: sdk.graph.modifyEndpoint('FEgRuH9zeTRMZgpVv5YavoFEcisoK6KHk3zgQRRBqt51'),
|
||||
kava: "https://pvt.graph.kava.io/subgraphs/name/sushi-v2/trident-kava",
|
||||
metis:
|
||||
"https://andromeda.thegraph.metis.io/subgraphs/name/sushi-v2/trident-metis",
|
||||
bittorrent:
|
||||
"https://subgraphs.sushi.com/subgraphs/name/sushi-v2/trident-bttc",
|
||||
arbitrum: "https://api.thegraph.com/subgraphs/name/sushi-v2/trident-arbitrum",
|
||||
bsc: "https://api.thegraph.com/subgraphs/name/sushi-v2/trident-bsc",
|
||||
avax: "https://api.thegraph.com/subgraphs/name/sushi-v2/trident-avalanche",
|
||||
arbitrum: sdk.graph.modifyEndpoint('4x8H6ZoGfJykyZqAe2Kx2g5afsp17S9pn8GroRkpezhx'),
|
||||
bsc: sdk.graph.modifyEndpoint('9TQaBw1sU3wi2kdevuygKhfhjP3STnwBe1jUnKxmNhmn'),
|
||||
avax: sdk.graph.modifyEndpoint('NNTV3MgqSGtHMBGdMVLXzzDbKDKmsY87k3PsQ2knmC1'),
|
||||
};
|
||||
|
||||
const tridentQuery = gql`
|
||||
|
||||
@@ -5,23 +5,23 @@ const { isWhitelistedToken } = require('../helper/streamingHelper')
|
||||
|
||||
const graphUrls = {
|
||||
ethereum:
|
||||
"https://api.thegraph.com/subgraphs/name/sushi-subgraphs/furo-ethereum",
|
||||
sdk.graph.modifyEndpoint('D8vYJpKN5SEHUkUWKSuorsL6FRt7hAQMnywnC4e93ygf'),
|
||||
polygon:
|
||||
"https://api.thegraph.com/subgraphs/name/sushi-subgraphs/furo-polygon",
|
||||
fantom: "https://api.thegraph.com/subgraphs/name/sushi-subgraphs/furo-fantom",
|
||||
bsc: "https://api.thegraph.com/subgraphs/name/sushi-subgraphs/furo-bsc",
|
||||
avax: "https://api.thegraph.com/subgraphs/name/sushi-subgraphs/furo-avalanche",
|
||||
sdk.graph.modifyEndpoint('4KsDNsyJjKX6bjwVNJQmJ7Dm3wovYXSX37UR39rNaMX4'),
|
||||
fantom: sdk.graph.modifyEndpoint('E98zSR5UZBGBgQe2SSLZ5R6yj5GPqKDJcQJNDHTeV3cS'),
|
||||
bsc: sdk.graph.modifyEndpoint('2wBYezghRA3hEJLQB4njUZGDNxCdU3u2gsLP5yVvBqKk'),
|
||||
avax: sdk.graph.modifyEndpoint('8LVoX3JPEVAak8T8GoEfdJudMoP2bsGwd9tszJxo3Rnx'),
|
||||
arbitrum:
|
||||
"https://api.thegraph.com/subgraphs/name/sushi-subgraphs/furo-arbitrum",
|
||||
sdk.graph.modifyEndpoint('8eHhPeKDr646JH5KUBBcabAJzkWmLfu6pqBtpXQHa37F'),
|
||||
optimism:
|
||||
"https://api.thegraph.com/subgraphs/name/sushi-subgraphs/furo-optimism",
|
||||
xdai: "https://api.thegraph.com/subgraphs/name/sushi-subgraphs/furo-gnosis",
|
||||
sdk.graph.modifyEndpoint('8KnsmppMf9k6Qvyixxwmny7dYugTV7XT4htHTfyq3d69'),
|
||||
xdai: sdk.graph.modifyEndpoint('5ToxB5xubMh9osdEDeX98JBAyzUVwkReGXAT1CzQhZCB'),
|
||||
harmony:
|
||||
"https://api.thegraph.com/subgraphs/name/sushi-subgraphs/furo-harmony",
|
||||
sdk.graph.modifyEndpoint('9D9C3ppoDE1zuZk5adznngKomLYS8NnC9zxniSS8vzgH'),
|
||||
moonbeam:
|
||||
"https://api.thegraph.com/subgraphs/name/sushi-subgraphs/furo-moonbeam",
|
||||
sdk.graph.modifyEndpoint('HJxpcsmaPV3L6PsqGFBHLczeMnL7bEgmL1D65edGx8pf'),
|
||||
moonriver:
|
||||
"https://api.thegraph.com/subgraphs/name/sushi-subgraphs/furo-moonriver",
|
||||
sdk.graph.modifyEndpoint('9ZqdKjfu7o9dX1RThXHDV9EqMn5CTvgpsPKKbpANg8yC'),
|
||||
};
|
||||
|
||||
const bentoboxes = {
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
const sdk = require("@defillama/sdk");
|
||||
const ADDRESSES = require('../helper/coreAssets.json')
|
||||
const { blockQuery } = require("../helper/http");
|
||||
|
||||
const graphUrls = {
|
||||
ethereum: "https://api.thegraph.com/subgraphs/name/sushi-labs/kashi-ethereum",
|
||||
polygon: "https://api.thegraph.com/subgraphs/name/sushi-labs/kashi-polygon",
|
||||
arbitrum: "https://api.thegraph.com/subgraphs/name/sushi-labs/kashi-arbitrum",
|
||||
bsc: "https://api.thegraph.com/subgraphs/name/sushi-labs/kashi-bsc",
|
||||
avax: "https://api.thegraph.com/subgraphs/name/sushiswap/kashi-avalanche",
|
||||
ethereum: sdk.graph.modifyEndpoint('6Kf5cPeXUMVzfGCtzBnSxDU849w2YM2o9afn1uiPpy2m'),
|
||||
polygon: sdk.graph.modifyEndpoint('5F3eB4Cm5mxorArsyrbs2a1TDxctmk3znpDZ4LEzqrBJ'),
|
||||
arbitrum: sdk.graph.modifyEndpoint('G3rbmaF7w2ZLQjZgGoi12BzPeL9z4MTW662iVyjYmtiX'),
|
||||
bsc: sdk.graph.modifyEndpoint('D1TGHRKx2Q54ce2goyt9hbtKNuT94FDBsuPwtGg5EzRw'),
|
||||
avax: sdk.graph.modifyEndpoint('BHeJByyVoNuVtqufK3Nk7YYmFkBs43boYpKv8z6hQ5Q1'),
|
||||
};
|
||||
|
||||
const bentoboxes = {
|
||||
|
||||
@@ -1,18 +1,19 @@
|
||||
const sdk = require("@defillama/sdk");
|
||||
const { blockQuery } = require('../helper/http')
|
||||
|
||||
const graphUrls = {
|
||||
polygon: "https://api.thegraph.com/subgraphs/name/sushi-v2/trident-polygon",
|
||||
polygonOldRouter:
|
||||
"https://api.thegraph.com/subgraphs/name/sushi-0m/trident-polygon",
|
||||
optimism: "https://api.thegraph.com/subgraphs/name/sushi-v2/trident-optimism",
|
||||
sdk.graph.modifyEndpoint('5LBvcUQthQDZTMe6cyJ7DbeokFkYeVpYYBZruHPUjMG5'),
|
||||
optimism: sdk.graph.modifyEndpoint('FEgRuH9zeTRMZgpVv5YavoFEcisoK6KHk3zgQRRBqt51'),
|
||||
kava: "https://pvt.graph.kava.io/subgraphs/name/sushi-v2/trident-kava",
|
||||
metis:
|
||||
"https://andromeda.thegraph.metis.io/subgraphs/name/sushi-v2/trident-metis",
|
||||
bittorrent:
|
||||
"https://subgraphs.sushi.com/subgraphs/name/sushi-v2/trident-bttc",
|
||||
arbitrum: "https://api.thegraph.com/subgraphs/name/sushi-v2/trident-arbitrum",
|
||||
bsc: "https://api.thegraph.com/subgraphs/name/sushi-v2/trident-bsc",
|
||||
avax: "https://api.thegraph.com/subgraphs/name/sushi-v2/trident-avalanche",
|
||||
arbitrum: sdk.graph.modifyEndpoint('4x8H6ZoGfJykyZqAe2Kx2g5afsp17S9pn8GroRkpezhx'),
|
||||
bsc: sdk.graph.modifyEndpoint('9TQaBw1sU3wi2kdevuygKhfhjP3STnwBe1jUnKxmNhmn'),
|
||||
avax: sdk.graph.modifyEndpoint('NNTV3MgqSGtHMBGdMVLXzzDbKDKmsY87k3PsQ2knmC1'),
|
||||
};
|
||||
|
||||
const tridentQueryWithBlock = `
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
const sdk = require("@defillama/sdk");
|
||||
const { toUSDTBalances } = require('../helper/balances');
|
||||
const { blockQuery } = require('../helper/http')
|
||||
const { getUniTVL } = require("../helper/unknownTokens")
|
||||
|
||||
const graphUrl = 'https://api.thegraph.com/subgraphs/name/zippoxer/sushiswap-subgraph-fork'
|
||||
const graphUrl = sdk.graph.modifyEndpoint('8TXwDMLemg6p4eicVuixKk7Mw9aNxpod1PQQFdSvFj6H')
|
||||
const graphQuery = `
|
||||
query get_tvl($block: Int) {
|
||||
uniswapFactory(
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
const sdk = require("@defillama/sdk");
|
||||
const { cachedGraphQuery } = require('../helper/cache')
|
||||
const query = `query FundsTVL{ funds { id } }`
|
||||
|
||||
@@ -6,7 +7,7 @@ module.exports = {
|
||||
}
|
||||
|
||||
const config = {
|
||||
arbitrum: { endpoint: 'https://api.thegraph.com/subgraphs/name/borelien/swaap-earn-arbitrum-test', },
|
||||
arbitrum: { endpoint: sdk.graph.modifyEndpoint('DHZvo3KRhryqHH9zj9sK8n9sjXvg3ddmDoVdLZcZQMJg'), },
|
||||
}
|
||||
|
||||
Object.keys(config).forEach(chain => {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
const sdk = require("@defillama/sdk");
|
||||
const { sumTokens2 } = require('../helper/unwrapLPs')
|
||||
const { cachedGraphQuery } = require('../helper/cache')
|
||||
|
||||
@@ -6,7 +7,7 @@ const configV1 = {
|
||||
startBlock: 29520285,
|
||||
blockDelay: 30,
|
||||
theGraph: {
|
||||
endpoint: 'https://api.thegraph.com/subgraphs/name/swaap-labs/swaapv1',
|
||||
endpoint: sdk.graph.modifyEndpoint('A1ibaGVUkqdLeBG7VeeSB8jm9QNmS8phSz8iooXR8puv'),
|
||||
query: `pools: pools(orderBy: liquidity, orderDirection: desc) {
|
||||
id
|
||||
tokens {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
const sdk = require("@defillama/sdk");
|
||||
const ADDRESSES = require('../helper/coreAssets.json')
|
||||
const sdk = require('@defillama/sdk');
|
||||
const BigNumber = require('bignumber.js');
|
||||
@@ -27,7 +28,7 @@ const synthetixs = {
|
||||
}
|
||||
const snxGraphEndpoints = {
|
||||
ethereum: 'https://api.thegraph.com/subgraphs/name/0xngmi/snx-lite-ethereum',
|
||||
optimism: 'https://api.thegraph.com/subgraphs/name/0xngmi/snx-lite-optimism-regenesis'
|
||||
optimism: sdk.graph.modifyEndpoint('5NQi9n4ztd8M6EEDFKA6gwcCnbLdmzZRymiDbPkbjEWN')
|
||||
}
|
||||
const ethStaking = "0xc1aae9d18bbe386b102435a8632c8063d31e747c"
|
||||
const weth = ADDRESSES.ethereum.WETH
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
const sdk = require("@defillama/sdk");
|
||||
const ADDRESSES = require('../helper/coreAssets.json')
|
||||
const sdk = require('@defillama/sdk');
|
||||
const BigNumber = require('bignumber.js');
|
||||
@@ -30,7 +31,7 @@ const synthetixs = {
|
||||
}
|
||||
const snxGraphEndpoints = {
|
||||
ethereum: 'https://api.thegraph.com/subgraphs/name/0xngmi/snx-lite-ethereum',
|
||||
optimism: 'https://api.thegraph.com/subgraphs/name/0xngmi/snx-lite-optimism-regenesis'
|
||||
optimism: sdk.graph.modifyEndpoint('5NQi9n4ztd8M6EEDFKA6gwcCnbLdmzZRymiDbPkbjEWN')
|
||||
}
|
||||
const ethStaking = "0xc1aae9d18bbe386b102435a8632c8063d31e747c"
|
||||
const weth = ADDRESSES.ethereum.WETH
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
const sdk = require("@defillama/sdk");
|
||||
const { sumTokens2 } = require('../helper/unwrapLPs')
|
||||
const { cachedGraphQuery } = require('../helper/cache')
|
||||
|
||||
const GRAPH_URLS = {
|
||||
polygon:
|
||||
"https://api.thegraph.com/subgraphs/name/timeswap-labs/timeswap-defi-llama",
|
||||
sdk.graph.modifyEndpoint('CjoTTVotweY5YZYjGbskVMZvJi8oD6urLnP1N7rWVFun'),
|
||||
};
|
||||
|
||||
function chainTvl(chain) {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
const sdk = require("@defillama/sdk");
|
||||
const { GraphQLClient, gql } = require('graphql-request')
|
||||
const { staking } = require("../helper/staking");
|
||||
|
||||
@@ -10,7 +11,7 @@ const UNB_POLY = '0xD81F558b71A5323e433729009D55159955F8A7f9'
|
||||
|
||||
|
||||
async function ethTvl() {
|
||||
var endpoint = 'https://api.thegraph.com/subgraphs/name/unbound-finance/unbound'
|
||||
var endpoint = sdk.graph.modifyEndpoint('8hYGnnqzaQ98ikvhi9uZ5GRmYjd7C2ykopeNpbA3DXUh')
|
||||
var graphQLClient = new GraphQLClient(endpoint)
|
||||
|
||||
var query = gql`
|
||||
@@ -40,7 +41,7 @@ async function ethTvl() {
|
||||
}
|
||||
|
||||
async function polyTvl() {
|
||||
var endpoint = 'https://api.thegraph.com/subgraphs/name/unbound-finance/unbound-polygon'
|
||||
var endpoint = sdk.graph.modifyEndpoint('EtpUNR2s35iZNRGfQ5vqCSayGf72THHd1duUtkxKreGU')
|
||||
var graphQLClient = new GraphQLClient(endpoint)
|
||||
|
||||
var query = gql`
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
const sdk = require("@defillama/sdk");
|
||||
const { cachedGraphQuery } = require('../helper/cache')
|
||||
const { graphQuery, } = require('../helper/http')
|
||||
const { sleep, log } = require('../helper/utils')
|
||||
@@ -78,9 +79,9 @@ query MyQuery {
|
||||
`;
|
||||
|
||||
const v2EndPoints = {
|
||||
ethereum: "https://api.thegraph.com/subgraphs/name/themohitmadan/unifarm-eth",
|
||||
polygon: "https://api.thegraph.com/subgraphs/name/themohitmadan/unifarm-polygon",
|
||||
bsc: "https://api.thegraph.com/subgraphs/name/themohitmadan/unifarm-bsc",
|
||||
ethereum: sdk.graph.modifyEndpoint('Cquw1hbmvNrSvUjaqoRhu9nWv7AX1Mz2gEb9sapYdMA5'),
|
||||
polygon: sdk.graph.modifyEndpoint('Ami8CcwigwYViJsUrwqK8DWwDPtFVAKbeYfii6ANahax'),
|
||||
bsc: sdk.graph.modifyEndpoint('EsA5LyABgi7ibZJGNr5PQsQ2L8QDPZxNdDvd5qPs5CJj'),
|
||||
}
|
||||
|
||||
const getV1Calls = async (chain) => {
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
const sdk = require("@defillama/sdk");
|
||||
const ADDRESSES = require('../helper/coreAssets.json')
|
||||
const { staking } = require("../helper/staking")
|
||||
const { graphQuery } = require('../helper/http')
|
||||
|
||||
const VELA = '0x088cd8f5eF3652623c22D48b1605DCfE860Cd704'
|
||||
|
||||
const arbitrumEndpoint = "https://api.thegraph.com/subgraphs/name/velaexchange/vela-exchange-official"
|
||||
const baseEndpoint = "https://api.thegraph.com/subgraphs/name/velaexchange/vela-exchange-official-base"
|
||||
const arbitrumEndpoint = sdk.graph.modifyEndpoint('6H9PEiNPZgwXfpbijjesZh96LFBzUvkHmEutMoYQ9fvp')
|
||||
const baseEndpoint = sdk.graph.modifyEndpoint('2qsbZ4X5TJM7NupC2eRJv167kBDFCDBd37KnK7PQtdga')
|
||||
async function staking_arbitrum_(api) {
|
||||
|
||||
const query = `
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
const sdk = require("@defillama/sdk");
|
||||
const { cachedGraphQuery } = require('../helper/cache')
|
||||
const sdk = require('@defillama/sdk')
|
||||
const { compoundExports2 } = require('../helper/compound')
|
||||
const config = {
|
||||
bsc: {
|
||||
endpoint: 'https://api.thegraph.com/subgraphs/name/venusprotocol/venus-isolated-pools',
|
||||
endpoint: sdk.graph.modifyEndpoint('H2a3D64RV4NNxyJqx9jVFQRBpQRzD6zNZjLDotgdCrTC'),
|
||||
corePools: ['0xfd36e2c2a6789db23113685031d7f16329158384'],
|
||||
},
|
||||
ethereum: {
|
||||
endpoint: 'https://api.thegraph.com/subgraphs/name/venusprotocol/venus-isolated-pools-ethereum',
|
||||
endpoint: sdk.graph.modifyEndpoint('Htf6Hh1qgkvxQxqbcv4Jp5AatsaiY5dNLVcySkpCaxQ8'),
|
||||
corePools: ['0x67aA3eCc5831a65A5Ba7be76BED3B5dc7DB60796'],
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
const sdk = require("@defillama/sdk");
|
||||
const { cachedGraphQuery } = require('../helper/cache')
|
||||
const { sumTokens2 } = require('../helper/unwrapLPs')
|
||||
|
||||
@@ -11,7 +12,7 @@ const query = `{
|
||||
}`
|
||||
|
||||
async function tvl(api) {
|
||||
const { pools } = await cachedGraphQuery('zksynth', 'https://api.thegraph.com/subgraphs/name/prasad-kumkar/zksynth-mainnet', query)
|
||||
const { pools } = await cachedGraphQuery('zksynth', sdk.graph.modifyEndpoint('CWgPgHm4zz4pijQaEsi2oniuzvdwqasBczTgBRMgg1EL'), query)
|
||||
const tokensAndOwners = pools.map(i => i.collaterals).flat().map(i => [i.token.id, i.pool.id])
|
||||
return sumTokens2({ api, tokensAndOwners })
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user