Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add ztln-p token #13172

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 }
}
Loading