Skip to content

Commit

Permalink
add web3world tvl (#9668)
Browse files Browse the repository at this point in the history
  • Loading branch information
web3world authored Apr 3, 2024
1 parent 1f0b8d2 commit ae98796
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions projects/helper/chains.json
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,7 @@
"umee",
"vechain",
"velas",
"venom",
"vision",
"vite",
"vive",
Expand Down
22 changes: 22 additions & 0 deletions projects/web3world/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
const { post } = require('../helper/http')
const BigNumber = require('bignumber.js')

async function fetch() {
const tvl = (await post("https://api.web3.world/v2/pools", {
limit: 1000,
offset: 0,
ordering: "tvldescending",
whiteListUri: "https://static.web3.world/assets/manifest.json",
})
).pools.map(p => p.tvl).reduce(
(a, c) => new BigNumber(a).plus(c));

return tvl;
}

module.exports = {
venom: {
fetch
},
fetch
};

0 comments on commit ae98796

Please sign in to comment.