Skip to content
This repository has been archived by the owner on Dec 16, 2024. It is now read-only.

Added MNTX #376

Merged
merged 2 commits into from
Nov 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -93,6 +93,7 @@ import minFetcher from "./tokens/min";
import mintFetcher from "./tokens/mint";
import miraFetcher from "./tokens/mira";
import mntFetcher from "./tokens/mnt";
import mntxFetcher from "./tokens/mntx";
import moaiFetcher from "./tokens/moai";
import momFetcher from "./tokens/mom";
import mrHankeyFetcher from "./tokens/mrhankey";
@@ -298,6 +299,8 @@ export const supplyFetchers: Record<string, SupplyFetcher> = {
awooFetcher,
"43b07d4037f0d75ee10f9863097463fc02ff3c0b8b705ae61d9c75bf4d796e746820546f6b656e":
mntFetcher,
"77cab21b1a0eb05886cb9fe8e3d297456e53c1d948dba42219a1b3804d796e746820546f6b656e2058":
mntxFetcher,
"92776616f1f32c65a173392e4410a3d8c39dcf6ef768c73af164779c4d79555344":
myusdFetcher,
"1ddcb9c9de95361565392c5bdff64767492d61a96166cb16094e54be4f5054": optFetcher,
16 changes: 16 additions & 0 deletions src/tokens/mntx.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { defaultFetcherOptions, SupplyFetcher } from "../types";
import { getBlockFrostInstance } from "../utils";

const MNTX = "77cab21b1a0eb05886cb9fe8e3d297456e53c1d948dba42219a1b3804d796e746820546f6b656e2058";

const fetcher: SupplyFetcher = async (options = defaultFetcherOptions) => {
const blockFrost = getBlockFrostInstance(options);
const assetInfo = await blockFrost.assetsById(MNTX);
const circulating = Number(assetInfo?.quantity) / 1e6;
return {
circulating: circulating.toString(),
total: circulating.toString(),
};
};

export default fetcher;