Skip to content

Commit

Permalink
Merge pull request #426 from Tren-Finance/xy-stablecoin
Browse files Browse the repository at this point in the history
feat: add XY
  • Loading branch information
realdealshaman authored Dec 27, 2024
2 parents cba9a1d + 74e7596 commit fd52830
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions src/adapters/peggedAssets/tren-debt-token/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
const sdk = require("@defillama/sdk");

import {
ChainBlocks,
PeggedIssuanceAdapter,
} from "../peggedAsset.type";

const chainContracts = {
arbitrum: {
minted: "0xD4fe6e1e37dfCf35E9EEb54D4cca149d1c10239f",
curvePool: "0x2b2e23b7c1b0de9040011b860cc575650d0817f7",
},
ethereum: {
bridgedFromArbitrum: "0xe9766D6aed0A73255f95ACC1F263156e746B70ba",
},
};

async function mintedOnArbitrum() {
return async function (
_timestamp: number,
_ethBlock: number,
_chainBlocks: ChainBlocks
) {
const totalSupply = (
await sdk.api.erc20.totalSupply({
target: chainContracts.arbitrum.minted,
block: _chainBlocks.arbitrum,
chain: "arbitrum",
})
).output;
return { peggedUSD: totalSupply / 10 ** 18 };
};
}



const adapter: PeggedIssuanceAdapter = {
arbitrum: {
minted: mintedOnArbitrum(),
},
};

export default adapter;

0 comments on commit fd52830

Please sign in to comment.