diff --git a/src/index.ts b/src/index.ts index 6481ef55..b1b13472 100644 --- a/src/index.ts +++ b/src/index.ts @@ -36,6 +36,7 @@ import meldFetcher from "./tokens/meld"; import milkFetcher from "./tokens/milk"; import minFetcher from "./tokens/min"; import mintFetcher from "./tokens/mint"; +import mntFetcher from "./tokens/mnt"; import moaiFetcher from "./tokens/moai"; import newmFetcher from "./tokens/newm"; import ninjazFetcher from "./tokens/ninjaz"; @@ -159,5 +160,6 @@ export const supplyFetchers: Record = { bubbleFetcher, "09f5f55fcad17503e6b7acc81de7c80f84b76e76d17085f0e32f1ce241574f4f": awooFetcher, + "43b07d4037f0d75ee10f9863097463fc02ff3c0b8b705ae61d9c75bf": mntFetcher, "1ddcb9c9de95361565392c5bdff64767492d61a96166cb16094e54be4f5054": optFetcher, }; diff --git a/src/tokens/mnt.ts b/src/tokens/mnt.ts new file mode 100644 index 00000000..9769ffa5 --- /dev/null +++ b/src/tokens/mnt.ts @@ -0,0 +1,22 @@ +import { defaultFetcherOptions, SupplyFetcher } from "../types"; +import { getAxiosInstance } from "../utils"; + +// eslint-disable-next-line unused-imports/no-unused-vars +const MNT = "43b07d4037f0d75ee10f9863097463fc02ff3c0b8b705ae61d9c75bf"; + +const TOTAL_SUPPLY = 100_000_000; + +const MNT_SUPPLY_ADDRESS = "https://www.mynth.ai/api/token-supply"; + +const fetcher: SupplyFetcher = async (options = defaultFetcherOptions) => { + const axios = getAxiosInstance(options); + const response = await axios.get(MNT_SUPPLY_ADDRESS); + const treasury = response.data.current_supply; + + return { + circulating: treasury.toString(), + total: TOTAL_SUPPLY.toString(), + }; +}; + +export default fetcher;