diff --git a/src/index.ts b/src/index.ts index 13672096..694f4c54 100644 --- a/src/index.ts +++ b/src/index.ts @@ -20,6 +20,7 @@ import btnFetcher from "./tokens/btn"; import bubbleFetcher from "./tokens/bubble"; import c3Fetcher from "./tokens/c3"; import c4Fetcher from "./tokens/c4"; +import catnipFetcher from "./tokens/catnip"; import catsFetcher from "./tokens/cats"; import catskyFetcher from "./tokens/catsky"; import cblpFetcher from "./tokens/cblp"; @@ -169,6 +170,8 @@ export * from "./types"; export const supplyFetchers: Record = { "338c17dffaaefdb97ace91100724836178c3f9dd994a4798a66f546d4d414e4e59": mannyFetcher, + "633f2e2c5280417c6b76055eda54fc07de984c122c01573ea4a9e8234361746e6970": + catnipFetcher, "29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c64d494e": minFetcher, "577f0b1342f8f8f4aed3388b80a8535812950c7a892495c0ecdf0f1e0014df10464c4454": fldtFetcher, diff --git a/src/tokens/catnip.ts b/src/tokens/catnip.ts new file mode 100644 index 00000000..383af0f0 --- /dev/null +++ b/src/tokens/catnip.ts @@ -0,0 +1,25 @@ +import { defaultFetcherOptions, SupplyFetcher } from "../types"; +import { getAmountInAddresses, getBlockFrostInstance } from "../utils"; + +const CATNIP = "633f2e2c5280417c6b76055eda54fc07de984c122c01573ea4a9e8234361746e6970"; + +const fetcher: SupplyFetcher = async (options = defaultFetcherOptions) => { + const blockFrost = getBlockFrostInstance(options); + const total = 900_000_000; + const treasuryRaw = await getAmountInAddresses(blockFrost, CATNIP, [ + "stake178lgmc2vgwkvr9dll5keap2fvga7f6sanu0rt0902skr3ms56772e", // Treasury + ]); + + const burnRaw = await getAmountInAddresses(blockFrost, CATNIP, [ + "addr1w8qmxkacjdffxah0l3qg8hq2pmvs58q8lcy42zy9kda2ylc6dy5r4", // burn address + ]); + + const treasury = Number(treasuryRaw); + const burn = Number(burnRaw); + return { + circulating: (total - treasury - burn).toString(), + total: (total - burn).toString(), + }; +}; + +export default fetcher;