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

Commit

Permalink
Updated CC
Browse files Browse the repository at this point in the history
  • Loading branch information
neo00411 committed Nov 8, 2023
1 parent a6a94c0 commit 1c9c62f
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ import wozFetcher from "./tokens/woz";
import wrtFetcher from "./tokens/wrt";
import xvyfiFetcher from "./tokens/xvyfi";
import yummiFetcher from "./tokens/yummi";
import jellyFetcher from "./tokens/jelly";
import { SupplyFetcher } from "./types";

export * from "./types";
Expand Down Expand Up @@ -222,5 +223,6 @@ export const supplyFetchers: Record<string, SupplyFetcher> = {
snepeFetcher,
"51a5e236c4de3af2b8020442e2a26f454fda3b04cb621c1294a0ef34424f4f4b":
bookFetcher,
"961f2cac0bb1967d74691af179350c1e1062c7298d1f7be1e4696e31": derpFetcher,
"961f2cac0bb1967d74691af179350c1e1062c7298d1f7be1e4696e31": derpFetcher,
"5c1c91a65bedac56f245b8184b5820ced3d2f1540e521dc1060fa6834a454c4c59": jellyFetcher,
};
22 changes: 22 additions & 0 deletions src/tokens/jelly.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { defaultFetcherOptions, SupplyFetcher } from "../types";
import { getAmountInAddresses, getBlockFrostInstance } from "../utils";

const JELLY = "5c1c91a65bedac56f245b8184b5820ced3d2f1540e521dc1060fa6834a454c4c59";

const fetcher: SupplyFetcher = async (options = defaultFetcherOptions) => {
const blockFrost = getBlockFrostInstance(options);
const total = 39_000_000;
const treasuryRaw = await getAmountInAddresses(blockFrost, JELLY, [
"stake1u8yjy30a56m2838092c37spgjnnhpunttpdkzlvrr86kr8crgcuhe", // $jelly.pool Jelly Chunk Reserve Pool
"addr1w8qmxkacjdffxah0l3qg8hq2pmvs58q8lcy42zy9kda2ylc6dy5r4", // Burn wallet
]);

const treasury = Number(treasuryRaw) / 1e6;

return {
circulating: (total - treasury).toString(),
total: total.toString(),
};
};

export default fetcher;

0 comments on commit 1c9c62f

Please sign in to comment.