Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

moveflow #11251

Closed
wants to merge 1 commit into from
Closed

moveflow #11251

Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,
},

};
Loading