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

Commit

Permalink
Create squeak.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
adakondacoin authored Jul 29, 2024
1 parent 07b6595 commit 940411d
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/tokens/squeak.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { defaultFetcherOptions, SupplyFetcher } from "../types";
import { getAmountInAddresses, getBlockFrostInstance } from "../utils";

const SQUEAK = "097f37ef3f64a7967c645cb2a40b67594b0f6f4d187d654ff927403753717565616b";

const fetcher: SupplyFetcher = async (options = defaultFetcherOptions) => {
const blockFrost = getBlockFrostInstance(options);
const total = 1e9;

const burnRaw = await getAmountInAddresses(blockFrost, SQUEAK, [
"addr1z8kadskrrswl3avwe9psd3mar5l7shf06slyxr2tetwln4nzg06w6dvxg0vuzx4s0uenlr0vfucctcfwpa2eshd86taqduntvj",
]);

const burn = burnRaw ? Number(burnRaw) : 0;
return {
circulating: (total - burn).toString(),
total: (total - burn).toString(),
};
};

export default fetcher;

0 comments on commit 940411d

Please sign in to comment.