Skip to content

Commit

Permalink
fix usdx
Browse files Browse the repository at this point in the history
  • Loading branch information
g1nt0ki committed Oct 11, 2024
1 parent c3b07bc commit 7a5a208
Showing 1 changed file with 5 additions and 13 deletions.
18 changes: 5 additions & 13 deletions projects/usdx/index.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,11 @@
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,
};
tvl: async (api) => {
const supply = await api.call({ abi: 'erc20:totalSupply', target: usdxAddress})
api.addCGToken('usdx-money-usdx', supply/1e18)
},
};
});
}
})

0 comments on commit 7a5a208

Please sign in to comment.