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

Commit

Permalink
Add MAYZ (#131)
Browse files Browse the repository at this point in the history
* Add MAYZ circulating supply

* add 8gm address to treasury

---------

Co-authored-by: jacobwarren44 <[email protected]>
  • Loading branch information
longngn and jacobwarren44 authored Sep 25, 2023
1 parent a92e5e4 commit 739aa38
Show file tree
Hide file tree
Showing 2 changed files with 29 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 @@ -36,6 +36,7 @@ import jpgFetcher from "./tokens/jpg";
import lifiFetcher from "./tokens/lifi";
import lobsterFetcher from "./tokens/lobster";
import liqwidFetcher from "./tokens/lq";
import mayzFetcher from "./tokens/mayz";
import meldFetcher from "./tokens/meld";
import milkFetcher from "./tokens/milk";
import minFetcher from "./tokens/min";
Expand Down Expand Up @@ -183,5 +184,7 @@ export const supplyFetchers: Record<string, SupplyFetcher> = {
utilFetcher,
a3931691f5c4e65d01c429e473d0dd24c51afdb6daf88e632a6c1e516f7263666178746f6b656e:
factFetcher,
"9e975c76508686eb2d57985dbaea7e3843767a31b4dcf4e99e5646834d41595a":
mayzFetcher,
"681b5d0383ac3b457e1bcc453223c90ccef26b234328f45fa10fd2764a5047": jpgFetcher,
};
26 changes: 26 additions & 0 deletions src/tokens/mayz.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { defaultFetcherOptions, SupplyFetcher } from "../types";
import { getAmountInAddresses, getBlockFrostInstance } from "../utils";

const MAYZ = "9e975c76508686eb2d57985dbaea7e3843767a31b4dcf4e99e5646834d41595a";

const fetcher: SupplyFetcher = async (options = defaultFetcherOptions) => {
const blockFrost = getBlockFrostInstance(options);

const total = 1e9;
const treasuryRaw = await getAmountInAddresses(blockFrost, MAYZ, [
"stake1u8yrsk8fn672hr0xhtzslppvnl5jfdgpggn0862yq903u0c7w7e06",
"stake1u9pj8cpxn8xpxk9qlpwsuv08w3mr8pky4r6e7xkwfh20zcqx8dahf",
"stake1uy2pglk3g4lqwnu2d5qwvpkf85zl94eq3s20zgqtxy0n9kqmts464",
"stake1u9eyhfzur7lvgmgmeky0gzqsq80jvu0n9qfqeydff802adsr8sjkn",
"stake1u83dyusvcs4ju9tqts8q20x3k7zakm5tk32pr3t32e09dqg9s2jqw",
"stake1u9gum7a7eanxdh0zmuaytt66xdfz63qshw584mn3xq0j80csu4k48",
"stake1uxhx6z2s9dpmss9e7ks0l065kmd22uwgjzdgl78ygwvl25gm9l8gm",
]);
const treasury = Number(treasuryRaw) / 1e6;
return {
circulating: (total - treasury).toString(),
total: total.toString(),
};
};

export default fetcher;

0 comments on commit 739aa38

Please sign in to comment.