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

Added Jelly Circulating Supply #172

Merged
merged 1 commit into from
Nov 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import idpFetcher from "./tokens/idp";
import iethFetcher from "./tokens/ieth";
import indyFetcher from "./tokens/indy";
import iusdFetcher from "./tokens/iusd";
import jellyFetcher from "./tokens/jelly";
import jpgFetcher from "./tokens/jpg";
import lifiFetcher from "./tokens/lifi";
import lobsterFetcher from "./tokens/lobster";
Expand Down Expand Up @@ -223,6 +224,8 @@ export const supplyFetchers: Record<string, SupplyFetcher> = {
snepeFetcher,
"51a5e236c4de3af2b8020442e2a26f454fda3b04cb621c1294a0ef34424f4f4b":
bookFetcher,
"5c1c91a65bedac56f245b8184b5820ced3d2f1540e521dc1060fa6834a454c4c59":
jellyFetcher,
"961f2cac0bb1967d74691af179350c1e1062c7298d1f7be1e4696e31": derpFetcher,
"2d587111358801114f04df83dc0015de0a740b462b75cce5170fc935434749": cgiFetcher,
};
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 vestingRaw = await getAmountInAddresses(blockFrost, JELLY, [
"stake1u8yjy30a56m2838092c37spgjnnhpunttpdkzlvrr86kr8crgcuhe", // Chunk pool
"addr1w8qmxkacjdffxah0l3qg8hq2pmvs58q8lcy42zy9kda2ylc6dy5r4", // Burn wallet
]);

const vesting = Number(vestingRaw) / 10 ** 6;
return {
circulating: (total - vesting).toString(),
total: total.toString(),
};
};

export default fetcher;