mirror of
https://github.com/alexgo-io/DefiLlama-Adapters.git
synced 2026-01-12 16:53:02 +08:00
21 lines
437 B
JavaScript
21 lines
437 B
JavaScript
const retry = require('./helper/retry')
|
|
const { GraphQLClient, gql } = require('graphql-request')
|
|
|
|
async function fetch() {
|
|
var endpoint = 'https://cache.bondappetit.io/api'
|
|
var graphQLClient = new GraphQLClient(endpoint)
|
|
|
|
var query = gql`
|
|
{
|
|
getTVL
|
|
}
|
|
`;
|
|
|
|
var results = await retry(async bail => await graphQLClient.request(query))
|
|
return parseFloat(results.getTVL)
|
|
}
|
|
|
|
module.exports = {
|
|
fetch
|
|
}
|