Skip to content

Commit

Permalink
track filecoin tvl
Browse files Browse the repository at this point in the history
  • Loading branch information
g1nt0ki committed Mar 4, 2024
1 parent 3a1bafa commit bd2f7a6
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions projects/uniswap/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,24 @@ function v3TvlPaged(chain) {
}
}

async function filecoinTvl(_, _b, _cb, { api, }) {
const { result: { pools } } = await configPost('oku-trade/filecoin', 'https://cush.apiary.software/filecoin', {
"jsonrpc": "2.0",
"method": "cush_topPools",
"params": [
{
"result_size": 1000,
"sort_by": "tx_count",
"sort_order": false
}
],
"id": 0
})
const ownerTokens = pools.map(i => [[i.t0, i.t1], i.address])
return api.sumTokens({ ownerTokens })
}


module.exports = {
methodology: `Counts the tokens locked on AMM pools, pulling the data from the 'ianlapham/uniswapv2' subgraph`,
timetravel: false,
Expand All @@ -60,9 +78,10 @@ module.exports = {
moonbeam: { factory: '0x28f1158795a3585caaa3cd6469cd65382b89bb70', fromBlock: 4313505 },
era: { factory: '0x8FdA5a7a8dCA67BBcDd10F02Fa0649A937215422', fromBlock: 12637080 },
boba: { factory: "0xFFCd7Aed9C627E82A765c3247d562239507f6f1B", fromBlock: 969351, },
rsk: { factory: "0xAf37Ec98A00fD63689cF3060Bf3b6784e00CaD82", fromBlock: 5829207, },
rsk: { factory: "0xAf37Ec98A00fD63689cF3060Bf3b6784e00CaD82", fromBlock: 5829207, },
scroll: { factory: "0x70C62C8b8e801124A4Aa81ce07b637A3e83cb919", fromBlock: 1367, },
})
}),
filecoin: { tvl: filecoinTvl },
}

const chains = ['ethereum', 'arbitrum', 'optimism', 'polygon', 'bsc', 'avax', 'base']
Expand Down

0 comments on commit bd2f7a6

Please sign in to comment.