Skip to content
This repository has been archived by the owner on Dec 16, 2024. It is now read-only.

Commit

Permalink
Add $Chad token
Browse files Browse the repository at this point in the history
  • Loading branch information
Kubys98 committed Dec 9, 2024
1 parent 099a701 commit a9bd3c4
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions src/tokens/chad.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { defaultFetcherOptions, SupplyFetcher } from "../types";
import { getAmountInAddresses, getBlockFrostInstance } from "../utils";

const CHAD = "97075bf380e65f3c63fb733267adbb7d42eec574428a754d2abca55b";

const fetcher: SupplyFetcher = async (options = defaultFetcherOptions) => {
const blockFrost = getBlockFrostInstance(options);
const total = 1_000_000_000n;
const treasuryRaw = await getAmountInAddresses(blockFrost, CHAD, [
"stake1uy0sgxfm8pzrkru97rg8pteu4j05c6dgwuwzemhg6k8te3g6h5due", // treasury
]);

const burnRaw = await getAmountInAddresses(blockFrost, CHAD, [
"addr1w8qmxkacjdffxah0l3qg8hq2pmvs58q8lcy42zy9kda2ylc6dy5r4", // burn wallet
]);

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 a9bd3c4

Please sign in to comment.