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

Commit

Permalink
Added MNTX (#376)
Browse files Browse the repository at this point in the history
* Added MNTX

* Added MNTX to index.ts
  • Loading branch information
SynthLuvr authored Nov 1, 2024
1 parent 91be6c5 commit 6bed651
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -298,6 +299,8 @@ export const supplyFetchers: Record<string, SupplyFetcher> = {
awooFetcher,
"43b07d4037f0d75ee10f9863097463fc02ff3c0b8b705ae61d9c75bf4d796e746820546f6b656e":
mntFetcher,
"77cab21b1a0eb05886cb9fe8e3d297456e53c1d948dba42219a1b3804d796e746820546f6b656e2058":
mntxFetcher,
"92776616f1f32c65a173392e4410a3d8c39dcf6ef768c73af164779c4d79555344":
myusdFetcher,
"1ddcb9c9de95361565392c5bdff64767492d61a96166cb16094e54be4f5054": optFetcher,
Expand Down
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;

0 comments on commit 6bed651

Please sign in to comment.