Skip to content

Commit

Permalink
Adds $FIGHT Supply Fetcher (#348)
Browse files Browse the repository at this point in the history
* Added SupplyFetcher for FIGHT token

* Updated index.ts with fightFetcher

* Added $burnsnek wallet
  • Loading branch information
dunamis-ada committed Jul 23, 2024
1 parent 46b14e7 commit 07b6595
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -444,4 +445,6 @@ export const supplyFetchers: Record<string, SupplyFetcher> = {
scaleFetcher,
ea02c99c0668891d6b7cdc49e075cbddf9cd5b89404e5a8a8e5d7016534c4f5020436f696e:
slopFetcher,
"7d869e0e6f936c3299a8b8df2b8f13d5233801e11676ff06e78e8dbe4649474854":
fightFetcher,
};
23 changes: 23 additions & 0 deletions src/tokens/fight.ts
Original file line number Diff line number Diff line change
@@ -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;

0 comments on commit 07b6595

Please sign in to comment.