Skip to content

Commit

Permalink
Register Meem marketcap (#366)
Browse files Browse the repository at this point in the history
* Create meem.ts

* Update index.ts - Register MEEM marketcap
  • Loading branch information
CardanoTokenIO authored Sep 4, 2024
1 parent 712edbc commit d292371
Show file tree
Hide file tree
Showing 2 changed files with 33 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 @@ -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";
Expand Down Expand Up @@ -458,4 +459,6 @@ export const supplyFetchers: Record<string, SupplyFetcher> = {
"81926a57a567c11f6dc502254c5ed2d11fdba4ed9f898916699c6f1753414645":
safeFetcher,
dce34158d07be7187401a756a3273b792f6476e2ea09c3f2ae7b229d63756c74: cultFetcher,
"05c4bcecccff054c9aefff8bdc310e1edb8baa0756d912b47ae45d694d65656d":
meemFetcher,
};
30 changes: 30 additions & 0 deletions src/tokens/meem.ts
Original file line number Diff line number Diff line change
@@ -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;

0 comments on commit d292371

Please sign in to comment.