diff --git a/src/index.ts b/src/index.ts index b2c37ded..7948c9d6 100644 --- a/src/index.ts +++ b/src/index.ts @@ -49,6 +49,7 @@ import empFetcher from "./tokens/emp"; import encsFetcher from "./tokens/encs"; import factFetcher from "./tokens/fact"; import fetFetcher from "./tokens/fet"; +import fightFetcher from "./tokens/fight"; import fireFetcher from "./tokens/fire"; import flacFetcher from "./tokens/flac"; import fldtFetcher from "./tokens/fldt"; @@ -444,4 +445,6 @@ export const supplyFetchers: Record = { scaleFetcher, ea02c99c0668891d6b7cdc49e075cbddf9cd5b89404e5a8a8e5d7016534c4f5020436f696e: slopFetcher, + "7d869e0e6f936c3299a8b8df2b8f13d5233801e11676ff06e78e8dbe4649474854": + fightFetcher, }; diff --git a/src/tokens/fight.ts b/src/tokens/fight.ts new file mode 100644 index 00000000..da12177e --- /dev/null +++ b/src/tokens/fight.ts @@ -0,0 +1,23 @@ +import { defaultFetcherOptions, SupplyFetcher } from "../types"; +import { getAmountInAddresses, getBlockFrostInstance } from "../utils"; + +const FIGHT = "7d869e0e6f936c3299a8b8df2b8f13d5233801e11676ff06e78e8dbe4649474854"; + +const fetcher: SupplyFetcher = async (options = defaultFetcherOptions) => { + const blockFrost = getBlockFrostInstance(options); + const total = 450_000_000_000; + const treasuryRaw = await getAmountInAddresses(blockFrost, FIGHT, [ + "stake1uygzdup55m354t6nx9nlj9eqhquh5rfue4tzm3yppaxr6vgz6cspc", // $fight.coin + ]); + const burnRaw = await getAmountInAddresses(blockFrost, FIGHT, [ + "addr1w8qmxkacjdffxah0l3qg8hq2pmvs58q8lcy42zy9kda2ylc6dy5r4", // $burnsnek + ]); + const treasury = Number(treasuryRaw); + const burn = Number(burnRaw); + return { + circulating: (total - treasury - burn).toString(), + total: (total - burn).toString(), + }; +}; + +export default fetcher;