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

Commit 6bed651

Browse files
authored
Added MNTX (#376)
* Added MNTX * Added MNTX to index.ts
1 parent 91be6c5 commit 6bed651

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

src/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ import minFetcher from "./tokens/min";
9393
import mintFetcher from "./tokens/mint";
9494
import miraFetcher from "./tokens/mira";
9595
import mntFetcher from "./tokens/mnt";
96+
import mntxFetcher from "./tokens/mntx";
9697
import moaiFetcher from "./tokens/moai";
9798
import momFetcher from "./tokens/mom";
9899
import mrHankeyFetcher from "./tokens/mrhankey";
@@ -298,6 +299,8 @@ export const supplyFetchers: Record<string, SupplyFetcher> = {
298299
awooFetcher,
299300
"43b07d4037f0d75ee10f9863097463fc02ff3c0b8b705ae61d9c75bf4d796e746820546f6b656e":
300301
mntFetcher,
302+
"77cab21b1a0eb05886cb9fe8e3d297456e53c1d948dba42219a1b3804d796e746820546f6b656e2058":
303+
mntxFetcher,
301304
"92776616f1f32c65a173392e4410a3d8c39dcf6ef768c73af164779c4d79555344":
302305
myusdFetcher,
303306
"1ddcb9c9de95361565392c5bdff64767492d61a96166cb16094e54be4f5054": optFetcher,

src/tokens/mntx.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { defaultFetcherOptions, SupplyFetcher } from "../types";
2+
import { getBlockFrostInstance } from "../utils";
3+
4+
const MNTX = "77cab21b1a0eb05886cb9fe8e3d297456e53c1d948dba42219a1b3804d796e746820546f6b656e2058";
5+
6+
const fetcher: SupplyFetcher = async (options = defaultFetcherOptions) => {
7+
const blockFrost = getBlockFrostInstance(options);
8+
const assetInfo = await blockFrost.assetsById(MNTX);
9+
const circulating = Number(assetInfo?.quantity) / 1e6;
10+
return {
11+
circulating: circulating.toString(),
12+
total: circulating.toString(),
13+
};
14+
};
15+
16+
export default fetcher;

0 commit comments

Comments
 (0)