Skip to content

Commit

Permalink
Create squeak.ts (#351)
Browse files Browse the repository at this point in the history
* Create squeak.ts

* Update index.ts

* Update index.ts

* Update index.ts

* Update index.ts
  • Loading branch information
adakondacoin authored Aug 5, 2024
1 parent 07b6595 commit 63b4b30
Show file tree
Hide file tree
Showing 2 changed files with 24 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 @@ -140,6 +140,7 @@ import societyFetcher from "./tokens/society";
import spfFetcher from "./tokens/spf";
import splashFetcher from "./tokens/splash";
import spxFetcher from "./tokens/spx";
import squeakFetcher from "./tokens/squeak";
import ssssFetcher from "./tokens/ssss";
import stableFetcher from "./tokens/stable";
import sundaeFetcher from "./tokens/sundae";
Expand Down Expand Up @@ -428,6 +429,8 @@ export const supplyFetchers: Record<string, SupplyFetcher> = {
"04b95368393c821f180deee8229fbd941baaf9bd748ebcdbf7adbb14727352534e":
rsrsnFetcher,
c881c20e49dbaca3ff6cef365969354150983230c39520b917f5cf7c4e696b65: nikeFetcher,
"097f37ef3f64a7967c645cb2a40b67594b0f6f4d187d654ff927403753717565616b":
squeakFetcher,
"03dc510dbd1d1321edc06d8ae013f55fdd79f390c7415e2a09b64797534e4f4b":
snokFetcher,
bf3e19192da77dfadc7c9065944e50ca7e1a439d90833e3ae58b720a44414e5a4f:
Expand Down
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 63b4b30

Please sign in to comment.