From 1d35c127ef5fd83e2d2ef679c6fcdac39e2f4aa9 Mon Sep 17 00:00:00 2001 From: waynebruce0x Date: Thu, 4 Apr 2024 17:26:22 +0100 Subject: [PATCH 1/6] ronin bridge --- projects/ronin-bridge/index.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 projects/ronin-bridge/index.js diff --git a/projects/ronin-bridge/index.js b/projects/ronin-bridge/index.js new file mode 100644 index 000000000000..a8c25f4c776d --- /dev/null +++ b/projects/ronin-bridge/index.js @@ -0,0 +1,13 @@ +const { sumTokens2 } = require("../helper/unwrapLPs"); + +module.exports = { + ethereum: { + tvl: (api) => + sumTokens2({ + api, + owners: ["0x64192819Ac13Ef72bF6b5AE239AC672B43a9AF08"], + fetchCoValentTokens: true, + blacklistedTokens: [], + }), + }, +}; From 68b6e852a6835fa62a520170370179256d5836aa Mon Sep 17 00:00:00 2001 From: waynebruce0x Date: Thu, 4 Apr 2024 17:34:43 +0100 Subject: [PATCH 2/6] pulsechain --- projects/pulsechain-bridge/index.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 projects/pulsechain-bridge/index.js diff --git a/projects/pulsechain-bridge/index.js b/projects/pulsechain-bridge/index.js new file mode 100644 index 000000000000..1fd92d38eb79 --- /dev/null +++ b/projects/pulsechain-bridge/index.js @@ -0,0 +1,13 @@ +const { sumTokens2 } = require("../helper/unwrapLPs"); + +module.exports = { + ethereum: { + tvl: (api) => + sumTokens2({ + api, + owners: ["0x1715a3E4A142d8b698131108995174F37aEBA10D"], // where does the WETH deposit go + fetchCoValentTokens: true, + blacklistedTokens: [], + }), + }, +}; From eae54ee010d4b0cb076095d916987a6522d68455 Mon Sep 17 00:00:00 2001 From: waynebruce0x Date: Thu, 4 Apr 2024 23:05:07 +0100 Subject: [PATCH 3/6] degen --- projects/degen-bridge/index.js | 13 +++++++++++++ projects/pulsechain-bridge/index.js | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 projects/degen-bridge/index.js diff --git a/projects/degen-bridge/index.js b/projects/degen-bridge/index.js new file mode 100644 index 000000000000..923997a49d1e --- /dev/null +++ b/projects/degen-bridge/index.js @@ -0,0 +1,13 @@ +const { sumTokens2 } = require("../helper/unwrapLPs"); + +module.exports = { + base: { + tvl: (api) => + sumTokens2({ + api, + owners: ["0xEfEf4558802bF373Ce3307189C79a9cAb0a4Cb9C"], + fetchCoValentTokens: true, + blacklistedTokens: [], + }), + }, +}; diff --git a/projects/pulsechain-bridge/index.js b/projects/pulsechain-bridge/index.js index 1fd92d38eb79..ceec7e8087fa 100644 --- a/projects/pulsechain-bridge/index.js +++ b/projects/pulsechain-bridge/index.js @@ -5,7 +5,7 @@ module.exports = { tvl: (api) => sumTokens2({ api, - owners: ["0x1715a3E4A142d8b698131108995174F37aEBA10D"], // where does the WETH deposit go + owners: ["0x1715a3E4A142d8b698131108995174F37aEBA10D"], fetchCoValentTokens: true, blacklistedTokens: [], }), From 663b851e713d2956c95dc6e0089d0033dc434357 Mon Sep 17 00:00:00 2001 From: waynebruce0x Date: Thu, 4 Apr 2024 23:27:50 +0100 Subject: [PATCH 4/6] sumTokensExport --- projects/degen-bridge/index.js | 13 +++++-------- projects/pulsechain-bridge/index.js | 11 ++++------- projects/ronin-bridge/index.js | 11 ++++------- 3 files changed, 13 insertions(+), 22 deletions(-) diff --git a/projects/degen-bridge/index.js b/projects/degen-bridge/index.js index 923997a49d1e..5c0557fc4923 100644 --- a/projects/degen-bridge/index.js +++ b/projects/degen-bridge/index.js @@ -1,13 +1,10 @@ -const { sumTokens2 } = require("../helper/unwrapLPs"); +const { sumTokens2, sumTokensExport } = require("../helper/unwrapLPs"); module.exports = { base: { - tvl: (api) => - sumTokens2({ - api, - owners: ["0xEfEf4558802bF373Ce3307189C79a9cAb0a4Cb9C"], - fetchCoValentTokens: true, - blacklistedTokens: [], - }), + tvl: sumTokensExport({ + owner: "0xEfEf4558802bF373Ce3307189C79a9cAb0a4Cb9C", + fetchCoValentTokens: true, + }), }, }; diff --git a/projects/pulsechain-bridge/index.js b/projects/pulsechain-bridge/index.js index ceec7e8087fa..111ed73ba887 100644 --- a/projects/pulsechain-bridge/index.js +++ b/projects/pulsechain-bridge/index.js @@ -2,12 +2,9 @@ const { sumTokens2 } = require("../helper/unwrapLPs"); module.exports = { ethereum: { - tvl: (api) => - sumTokens2({ - api, - owners: ["0x1715a3E4A142d8b698131108995174F37aEBA10D"], - fetchCoValentTokens: true, - blacklistedTokens: [], - }), + tvl: sumTokensExport({ + owner: "0x1715a3E4A142d8b698131108995174F37aEBA10D", + fetchCoValentTokens: true, + }), }, }; diff --git a/projects/ronin-bridge/index.js b/projects/ronin-bridge/index.js index a8c25f4c776d..908550dbe72f 100644 --- a/projects/ronin-bridge/index.js +++ b/projects/ronin-bridge/index.js @@ -2,12 +2,9 @@ const { sumTokens2 } = require("../helper/unwrapLPs"); module.exports = { ethereum: { - tvl: (api) => - sumTokens2({ - api, - owners: ["0x64192819Ac13Ef72bF6b5AE239AC672B43a9AF08"], - fetchCoValentTokens: true, - blacklistedTokens: [], - }), + tvl: sumTokensExport({ + owner: "0x64192819Ac13Ef72bF6b5AE239AC672B43a9AF08", + fetchCoValentTokens: true, + }), }, }; From 5c059d6b298025e528d66af2814e3fa782f5a43a Mon Sep 17 00:00:00 2001 From: waynebruce0x Date: Thu, 4 Apr 2024 23:30:14 +0100 Subject: [PATCH 5/6] patch --- projects/degen-bridge/index.js | 2 +- projects/pulsechain-bridge/index.js | 2 +- projects/ronin-bridge/index.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/projects/degen-bridge/index.js b/projects/degen-bridge/index.js index 5c0557fc4923..35b0f02d5346 100644 --- a/projects/degen-bridge/index.js +++ b/projects/degen-bridge/index.js @@ -1,4 +1,4 @@ -const { sumTokens2, sumTokensExport } = require("../helper/unwrapLPs"); +const { sumTokensExport } = require("../helper/unwrapLPs"); module.exports = { base: { diff --git a/projects/pulsechain-bridge/index.js b/projects/pulsechain-bridge/index.js index 111ed73ba887..89e1079f68ad 100644 --- a/projects/pulsechain-bridge/index.js +++ b/projects/pulsechain-bridge/index.js @@ -1,4 +1,4 @@ -const { sumTokens2 } = require("../helper/unwrapLPs"); +const { sumTokensExport } = require("../helper/unwrapLPs"); module.exports = { ethereum: { diff --git a/projects/ronin-bridge/index.js b/projects/ronin-bridge/index.js index 908550dbe72f..af62f09e9196 100644 --- a/projects/ronin-bridge/index.js +++ b/projects/ronin-bridge/index.js @@ -1,4 +1,4 @@ -const { sumTokens2 } = require("../helper/unwrapLPs"); +const { sumTokensExport } = require("../helper/unwrapLPs"); module.exports = { ethereum: { From 0923f0c91730535b2fdb328c24a250d302badf3d Mon Sep 17 00:00:00 2001 From: waynebruce0x Date: Mon, 8 Apr 2024 13:06:57 +0100 Subject: [PATCH 6/6] rsk bridge --- projects/rootstock-bridge/index.js | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 projects/rootstock-bridge/index.js diff --git a/projects/rootstock-bridge/index.js b/projects/rootstock-bridge/index.js new file mode 100644 index 000000000000..d8b835b61c21 --- /dev/null +++ b/projects/rootstock-bridge/index.js @@ -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 }; + }, + }, +};