Skip to content

Commit

Permalink
Merge pull request #1 from mixbytes/feat_lido_polkadot
Browse files Browse the repository at this point in the history
Feat: Lido Moonbeam
  • Loading branch information
karapetyantv authored Jul 20, 2022
2 parents 7a595d6 + 7dc4af4 commit 6f4db9f
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions projects/lido/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,21 @@ async function ksm(timestamp, ethBlock, chainBlocks) {
}
}

async function dot(timestamp, ethBlock, chainBlocks) {
const chain = "moonbeam"
const block = await getBlock(timestamp, chain, chainBlocks, true)
const pooledCoin = await sdk.api.abi.call({
block,
chain,
target: "0xfa36fe1da08c89ec72ea1f0143a35bfd5daea108",
abi: {"inputs":[],"name":"getTotalPooledKSM","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}
})

return {
'polkadot': Number(pooledCoin.output)/1e10,
}
}

async function solana(timestamp, ethBlock, chainBlocks) {
const connection = getConnection()
const validatorsBalance = await sol.retrieveValidatorsBalance(connection)
Expand Down Expand Up @@ -88,4 +103,7 @@ module.exports = {
moonriver:{
tvl: ksm
},
moonbeam:{
tvl: dot
}
}

0 comments on commit 6f4db9f

Please sign in to comment.