From 2a10e82edadc1d09bc59e28237b9a39ca2caae92 Mon Sep 17 00:00:00 2001 From: Shan <59776784+shan501@users.noreply.github.com> Date: Tue, 10 Sep 2024 20:39:52 -0400 Subject: [PATCH] add strike mc (#369) --- src/index.ts | 3 +++ src/tokens/strike.ts | 22 ++++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 src/tokens/strike.ts diff --git a/src/index.ts b/src/index.ts index 23a8b3db..d83eb4fb 100644 --- a/src/index.ts +++ b/src/index.ts @@ -148,6 +148,7 @@ import spxFetcher from "./tokens/spx"; import squeakFetcher from "./tokens/squeak"; import ssssFetcher from "./tokens/ssss"; import stableFetcher from "./tokens/stable"; +import strikeFetcher from "./tokens/strike"; import sundaeFetcher from "./tokens/sundae"; import tedyFetcher from "./tokens/tedy"; import tetFetcher from "./tokens/tet"; @@ -174,6 +175,8 @@ export * from "./types"; export const supplyFetchers: Record = { "338c17dffaaefdb97ace91100724836178c3f9dd994a4798a66f546d4d414e4e59": mannyFetcher, + f13ac4d66b3ee19a6aa0f2a22298737bd907cc95121662fc971b5275535452494b45: + strikeFetcher, "633f2e2c5280417c6b76055eda54fc07de984c122c01573ea4a9e8234361746e6970": catnipFetcher, "29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c64d494e": minFetcher, diff --git a/src/tokens/strike.ts b/src/tokens/strike.ts new file mode 100644 index 00000000..f9dc8c81 --- /dev/null +++ b/src/tokens/strike.ts @@ -0,0 +1,22 @@ +import { defaultFetcherOptions, SupplyFetcher } from "../types"; +import { getAmountInAddresses, getBlockFrostInstance } from "../utils"; + +const STRIKE = + "f13ac4d66b3ee19a6aa0f2a22298737bd907cc95121662fc971b5275535452494b45"; + +const fetcher: SupplyFetcher = async (options = defaultFetcherOptions) => { + const blockFrost = getBlockFrostInstance(options); + const total = 25_000_000; + const treasuryRaw = await getAmountInAddresses(blockFrost, STRIKE, [ + "addr1wxfsprv3e2ar80tf2rkex08673llh6rewhgfpzmeeqgnekqv3n2ps", // team vesting + "addr1qx8xgm3zrytup3mdgzxf93d6hc4x6dxywmzhnste6kzhe4lvvwe5f7xtt25s5fyftlm468rnjznztvgn9p0gvvr72p5qhfgyug", // DAO + ]); + + const treasury = Number(treasuryRaw) / 1e6; + return { + circulating: (total - treasury).toString(), + total: total.toString(), + }; +}; + +export default fetcher;