File tree Expand file tree Collapse file tree 1 file changed +17
-6
lines changed
Expand file tree Collapse file tree 1 file changed +17
-6
lines changed Original file line number Diff line number Diff line change 1- const { getTokenSupplies } = require ( '../helper/solana' ) ;
1+ const { getTokenSupplies} = require ( '../helper/solana' ) ;
22
3- const TOKEN_MINT = '9ckR7pPPvyPadACDTzLwK2ZAEeUJ3qGSnzPs8bVaHrSy' ;
3+ const SOLANA_TOKEN_ADDRESS = '9ckR7pPPvyPadACDTzLwK2ZAEeUJ3qGSnzPs8bVaHrSy' ;
4+ const BSC_TOKEN_ADDRESS = "0xeA953eA6634d55dAC6697C436B1e81A679Db5882"
45
5- async function tvl ( ) {
6- const supply = await getTokenSupplies ( [ TOKEN_MINT ] ) ;
6+ async function solanaTvl ( ) {
7+ const supply = await getTokenSupplies ( [ SOLANA_TOKEN_ADDRESS ] ) ;
78 return {
8- 'usd-coin' : supply [ TOKEN_MINT ] / 1e6
9+ 'usd-coin' : supply [ SOLANA_TOKEN_ADDRESS ] / 1e6
10+ }
11+ }
12+
13+ async function bscTvl ( api ) {
14+ const supply = await api . call ( { abi : 'erc20:totalSupply' , target : BSC_TOKEN_ADDRESS } )
15+ return {
16+ 'usd-coin' : supply / 1e18
917 }
1018}
1119
@@ -16,6 +24,9 @@ module.exports = {
1624 timetravel : false ,
1725 methodology : "Currently, tvl is composed of minted USDu" ,
1826 solana : {
19- tvl
27+ tvl : solanaTvl
28+ } ,
29+ bsc : {
30+ tvl : bscTvl
2031 }
2132}
You can’t perform that action at this time.
0 commit comments