From 0d7036a862670cead0dfe76aecb51e8c1f121677 Mon Sep 17 00:00:00 2001 From: brucelsoon Date: Fri, 27 Sep 2024 17:27:20 +0800 Subject: [PATCH] feat: add usdx network --- projects/usdx/index.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 projects/usdx/index.js diff --git a/projects/usdx/index.js b/projects/usdx/index.js new file mode 100644 index 00000000000..c56b1b2cd86 --- /dev/null +++ b/projects/usdx/index.js @@ -0,0 +1,19 @@ +const sdk = require("@defillama/sdk"); +const usdxAddress = "0xf3527ef8dE265eAa3716FB312c12847bFBA66Cef"; +const chains = ["ethereum", "bsc", "arbitrum"]; + +chains.forEach((chain) => { + module.exports[chain] = { + tvl: async (api, block) => { + const res = await sdk.api.erc20.totalSupply({ + target: usdxAddress, + block, + chain: chain, + decimals: 18, + }); + return { + "usdx-money-usdx": res.output, + }; + }, + }; +}); \ No newline at end of file