diff --git a/src/index.ts b/src/index.ts index da22802f..6f82692f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -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"; @@ -387,6 +388,8 @@ export const supplyFetchers: Record = { "548c390391253aff00af9c95ae310f00803fd28035a6ed6f17c1e5e2424147": bagFetcher, e4b8e9d247d9aa043bb9e13b38989b11b02c595450e6313aebdf6c1f47616d6553746f70: gmeFetcher, + "394d8a0021c8825ad9385c1112009994e37b7b53c0c406d389d452db47756d6d79": + gummyFetcher, "2dbc49f682ad21f6d18705cf446f9f7a277731ab70ae21a454f888b27273425443": rsbtcFetcher, "04b95368393c821f180deee8229fbd941baaf9bd748ebcdbf7adbb14727352534e": diff --git a/src/tokens/gummy.ts b/src/tokens/gummy.ts new file mode 100644 index 00000000..8841a031 --- /dev/null +++ b/src/tokens/gummy.ts @@ -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;