Skip to content

Commit

Permalink
moveflow
Browse files Browse the repository at this point in the history
  • Loading branch information
relly committed Aug 9, 2024
1 parent 0a2d111 commit 8d46ded
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions projects/moveflow/index.js
Original file line number Diff line number Diff line change
@@ -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,
},

};

0 comments on commit 8d46ded

Please sign in to comment.