Skip to content

Commit

Permalink
Add GUMMY market cap and circulating supply (#327)
Browse files Browse the repository at this point in the history
Co-authored-by: Patrik <51710571+shadowkora@users.noreply.github.com>
  • Loading branch information
lowhung and shadowkora authored Jun 18, 2024
1 parent 581d8f7 commit 255db9f
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 @@ -54,6 +54,7 @@ import gldsnekFetcher from "./tokens/gldsnek";
import gmeFetcher from "./tokens/gme";
import gokeyFetcher from "./tokens/gokey";
import gokeyv2Fetcher from "./tokens/gokeyv2";
import gummyFetcher from "./tokens/gummy";
import herbFetcher from "./tokens/herb";
import hoskyFetcher from "./tokens/hosky";
import huntFetcher from "./tokens/hunt";
Expand Down Expand Up @@ -387,6 +388,8 @@ export const supplyFetchers: Record<string, SupplyFetcher> = {
"548c390391253aff00af9c95ae310f00803fd28035a6ed6f17c1e5e2424147": bagFetcher,
e4b8e9d247d9aa043bb9e13b38989b11b02c595450e6313aebdf6c1f47616d6553746f70:
gmeFetcher,
"394d8a0021c8825ad9385c1112009994e37b7b53c0c406d389d452db47756d6d79":
gummyFetcher,
"2dbc49f682ad21f6d18705cf446f9f7a277731ab70ae21a454f888b27273425443":
rsbtcFetcher,
"04b95368393c821f180deee8229fbd941baaf9bd748ebcdbf7adbb14727352534e":
Expand Down
26 changes: 26 additions & 0 deletions src/tokens/gummy.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 GUMMY =
"394d8a0021c8825ad9385c1112009994e37b7b53c0c406d389d452db47756d6d79";

const fetcher: SupplyFetcher = async (options = defaultFetcherOptions) => {
const blockFrost = getBlockFrostInstance(options);
const total = 10_000_000_000;
const treasuryRaw = await getAmountInAddresses(blockFrost, GUMMY, [
"stake1u8szpq85z7f9jv3nvtltzzkv025hpgaql2ec82v7lffse2cjg6lam", // $gummy-treasury
]);

const burnRaw = await getAmountInAddresses(blockFrost, GUMMY, [
"addr1w8qmxkacjdffxah0l3qg8hq2pmvs58q8lcy42zy9kda2ylc6dy5r4", // $burnsnek
]);

const treasury = Number(treasuryRaw);
const burn = Number(burnRaw);
return {
circulating: (total - treasury - burn).toString(),
total: (total - burn).toString(),
};
};

export default fetcher;

0 comments on commit 255db9f

Please sign in to comment.