Skip to content

Commit

Permalink
add ztln-p token
Browse files Browse the repository at this point in the history
  • Loading branch information
shinchann221 committed Jan 20, 2025
1 parent 8fc6dd0 commit e42a75b
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions projects/zoth-ztlnp/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
const ZTLN_P = '0xfEd3D6557Dc46A1B25d0A6F666513Cb33835864B'

const abi = 'function price() view returns (uint256 price)'

const tvl = async (api) => {
const price = await api.call({ target: ZTLN_P, abi: abi })
const supply = await api.call({ target: ZTLN_P, abi: 'erc20:totalSupply' })

const tvl = price * supply / 1e14 //ZTLN_P is 6 decimals, price is 8 decimals

return api.addUSDValue(tvl)
}

module.exports = {
ethereum: { tvl }
}

0 comments on commit e42a75b

Please sign in to comment.