From d2923714ec8d52033f7e5b0bafdabbe170dbe63a Mon Sep 17 00:00:00 2001 From: CardanoTokenIO <163329108+CardanoTokenIO@users.noreply.github.com> Date: Wed, 4 Sep 2024 17:13:58 +0200 Subject: [PATCH] Register Meem marketcap (#366) * Create meem.ts * Update index.ts - Register MEEM marketcap --- src/index.ts | 3 +++ src/tokens/meem.ts | 30 ++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 src/tokens/meem.ts diff --git a/src/index.ts b/src/index.ts index ef53e182..f809b77a 100644 --- a/src/index.ts +++ b/src/index.ts @@ -85,6 +85,7 @@ import liqwidFetcher from "./tokens/lq"; import lwhFetcher from "./tokens/lwh"; import mannyFetcher from "./tokens/manny"; import mayzFetcher from "./tokens/mayz"; +import meemFetcher from "./tokens/meem"; import meldFetcher from "./tokens/meld"; import milkFetcher from "./tokens/milk"; import milkv2Fetcher from "./tokens/milkv2"; @@ -458,4 +459,6 @@ export const supplyFetchers: Record = { "81926a57a567c11f6dc502254c5ed2d11fdba4ed9f898916699c6f1753414645": safeFetcher, dce34158d07be7187401a756a3273b792f6476e2ea09c3f2ae7b229d63756c74: cultFetcher, + "05c4bcecccff054c9aefff8bdc310e1edb8baa0756d912b47ae45d694d65656d": + meemFetcher, }; diff --git a/src/tokens/meem.ts b/src/tokens/meem.ts new file mode 100644 index 00000000..53d3f09d --- /dev/null +++ b/src/tokens/meem.ts @@ -0,0 +1,30 @@ +import { defaultFetcherOptions, SupplyFetcher } from "../types"; +import { getAmountInAddresses, getBlockFrostInstance } from "../utils"; + +const MEEM = "05c4bcecccff054c9aefff8bdc310e1edb8baa0756d912b47ae45d694d65656d"; + +const TREASURY_VAULT = [ + "addr1vynhwueahpm94x4vdktyenjn9p652rw42v3kh85ghhzgl5cw8jskd", // Faucet + "addr1v858vfzl7hdqduqqa4vsj58nfy9njtw5q98q8tzzds58uncqjezd7", // Casino +]; + +const FUTURE_BURN_ADDRESSES = [ + "addr1w8qmxkacjdffxah0l3qg8hq2pmvs58q8lcy42zy9kda2ylc6dy5r4", //To be burnt +]; + +const fetcher: SupplyFetcher = async (options = defaultFetcherOptions) => { + const blockFrost = getBlockFrostInstance(options); + const total = 69e6; // 69,000,000 + const treasury = Number( + await getAmountInAddresses(blockFrost, MEEM, TREASURY_VAULT) + ); + const burnt = Number( + await getAmountInAddresses(blockFrost, MEEM, FUTURE_BURN_ADDRESSES) + ); + return { + circulating: (total - treasury).toString(), + total: (total - burnt).toString(), + }; +}; + +export default fetcher;