Skip to content

Commit

Permalink
rsk bridge
Browse files Browse the repository at this point in the history
  • Loading branch information
waynebruce0x committed Apr 8, 2024
1 parent 8f2e6d5 commit 0923f0c
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 0923f0c

Please sign in to comment.