Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add strike mc #369

Merged
merged 1 commit into from
Sep 11, 2024
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 @@ -146,6 +146,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";
Expand All @@ -172,6 +173,8 @@ export * from "./types";
export const supplyFetchers: Record<string, SupplyFetcher> = {
"338c17dffaaefdb97ace91100724836178c3f9dd994a4798a66f546d4d414e4e59":
mannyFetcher,
f13ac4d66b3ee19a6aa0f2a22298737bd907cc95121662fc971b5275535452494b45:
strikeFetcher,
"633f2e2c5280417c6b76055eda54fc07de984c122c01573ea4a9e8234361746e6970":
catnipFetcher,
"29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c64d494e": minFetcher,
Expand Down
22 changes: 22 additions & 0 deletions src/tokens/strike.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 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;
Loading