Skip to content

Commit

Permalink
Merge pull request #9742 from waynebruce0x/main
Browse files Browse the repository at this point in the history
rootstock
  • Loading branch information
waynebruce0x authored Apr 8, 2024
2 parents 25e3d96 + 0923f0c commit 6a21226
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions projects/rootstock-bridge/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
const { getBalance } = require("@defillama/sdk/build/eth");
const { getBlock } = require("@defillama/sdk/build/util/blocks");

module.exports = {
rsk: {
tvl: async (api) => {
const block = (await getBlock("rsk", api.timestamp)).block;
const unminted =
(
await getBalance({
target: "0x0000000000000000000000000000000001000006",
chain: api.chain,
block,
})
).output / 1e18;

const minted = 21e6 - unminted;

return { "coingecko:bitcoin": minted };
},
},
};

0 comments on commit 6a21226

Please sign in to comment.