From 8d46dedd2053ed2ae56bd23932886bf568a69ba2 Mon Sep 17 00:00:00 2001 From: relly Date: Fri, 9 Aug 2024 22:44:35 +0800 Subject: [PATCH] moveflow --- projects/moveflow/index.js | 46 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 projects/moveflow/index.js diff --git a/projects/moveflow/index.js b/projects/moveflow/index.js new file mode 100644 index 000000000000..135aff5de25d --- /dev/null +++ b/projects/moveflow/index.js @@ -0,0 +1,46 @@ +const ADDRESSES = require('../helper/coreAssets.json') +const sdk = require("@defillama/sdk"); +const { staking } = require("../helper/staking"); +const { sumTokensAndLPsSharedOwners } = require("../helper/unwrapLPs"); +const { request, gql } = require("graphql-request"); +const { getBlock } = require('../helper/http') +const { transformBalances } = require("../helper/portedTokens"); + +const graphUrl = 'https://main-api.flow.movefuns.xyz/' +const graphQuery = gql` +query ExampleQuery { + tvl { + coin_type + lock_amount + } +}` +async function getTokenAmount() { + const data = await request( + graphUrl, + graphQuery, + {}, + { + "x-auth-info":"123" + } + ); + console.log("data.tvl",data.tvl); + return data.tvl +} + +async function aptosTvl(api) { + const coinContainers = await getTokenAmount(); + + coinContainers.map((item)=>{ + api.add(item.coin_type, parseInt(item.lock_amount)); + }) +} + + + + +module.exports = { + aptos: { + tvl: aptosTvl, + }, + +};