mirror of
https://github.com/alexgo-io/DefiLlama-Adapters.git
synced 2026-01-12 16:53:02 +08:00
feat: add ontology evm data in wing.js;
This commit is contained in:
@@ -17,6 +17,9 @@ function fetchChain(chainId) {
|
||||
case 'bsc':
|
||||
url = "https://ethapi.wing.finance/bsc/flash-pool/detail";
|
||||
break;
|
||||
case 'ontology_evm':
|
||||
url = "https://ethapi.wing.finance/ontevm/flash-pool/detail";
|
||||
break;
|
||||
};
|
||||
const response = await utils.fetchURL(url);
|
||||
let tvl = response.data.result.totalSupply - response.data.result.totalBorrow;
|
||||
@@ -46,6 +49,9 @@ function stake(chainId) {
|
||||
case 'bsc':
|
||||
url = "https://ethapi.wing.finance/bsc/flash-pool/detail";
|
||||
break;
|
||||
case 'ontology_evm':
|
||||
url = "https://ethapi.wing.finance/ontevm/flash-pool/detail";
|
||||
break;
|
||||
};
|
||||
const response = await utils.fetchURL(url);
|
||||
let staked = response.data.result.totalLockedWingDollar;
|
||||
@@ -73,6 +79,10 @@ module.exports = {
|
||||
fetch: fetchChain('bsc'),
|
||||
staking: stake('bsc')
|
||||
},
|
||||
ontology_evm:{
|
||||
fetch: fetchChain('ontology_evm'),
|
||||
staking: stake('ontology_evm')
|
||||
},
|
||||
fetch,
|
||||
methodology: `Wing Finance TVL is achieved by subtracting total borrow from total supply on each chain. Staking is calculated by finding the dollar value of locked WING on each chain. The values are fetched from Wing Finance's own API.`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user