mirror of
https://github.com/alexgo-io/DefiLlama-Adapters.git
synced 2026-01-12 16:53:02 +08:00
36 lines
685 B
JavaScript
36 lines
685 B
JavaScript
const utils = require('./helper/utils');
|
|
const farmDataEndpoint = "https://marketcap.moonfarm.finance/get-farms-data"
|
|
|
|
async function fetch() {
|
|
const data = await utils.fetchURL(farmDataEndpoint)
|
|
return data.data.tvlUSD
|
|
}
|
|
|
|
async function bsc() {
|
|
const data = await utils.fetchURL(farmDataEndpoint)
|
|
return data.data.tvlBSC
|
|
}
|
|
|
|
async function polygon() {
|
|
const data = await utils.fetchURL(farmDataEndpoint)
|
|
return data.data.tvlPoly
|
|
}
|
|
|
|
async function ethereum() {
|
|
const data = await utils.fetchURL(farmDataEndpoint)
|
|
return data.data.tvlETH
|
|
}
|
|
|
|
module.exports = {
|
|
bsc:{
|
|
fetch:bsc
|
|
},
|
|
polygon:{
|
|
fetch: polygon
|
|
},
|
|
ethereum:{
|
|
fetch: ethereum
|
|
},
|
|
fetch
|
|
}
|