Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Squeak market cap #350

Closed
wants to merge 11 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ import wrtFetcher from "./tokens/wrt";
import xrayFetcher from "./tokens/xray";
import xvyfiFetcher from "./tokens/xvyfi";
import yummiFetcher from "./tokens/yummi";
import squeakFetcher from "./tokens/squeak";
import { SupplyFetcher } from "./types";

export * from "./types";
Expand Down Expand Up @@ -405,6 +406,8 @@ export const supplyFetchers: Record<string, SupplyFetcher> = {
f9a491442678bb2f90a3be676d1f888ce87330003ab7151f9efb3b68424f58: boxFetcher,
ececc92aeaaac1f5b665f567b01baec8bc2771804b4c21716a87a4e353504c415348:
splashFetcher,
"097f37ef3f64a7967c645cb2a40b67594b0f6f4d187d654ff927403753717565616b":
squeakFetcher,
"160a880d9fc45380737cb7e57ff859763230aab28b3ef6a84007bfcc4d495241":
miraFetcher,
"7d9aabc78703947e931e28273a96cf7412039fbd2e54a90ffb17239c42616279506f726b65":
Expand All @@ -425,7 +428,7 @@ export const supplyFetchers: Record<string, SupplyFetcher> = {
rsbtcFetcher,
"590f6d119b214cdcf7ef7751f8b7f1de615ff8f6de097a5ce62b257b534841524c":
sharlFetcher,
"04b95368393c821f180deee8229fbd941baaf9bd748ebcdbf7adbb14727352534e":
"04b95368393c821f180deee8229fbd941baaf9bd748ebcdbf7adbb14727352534e":
rsrsnFetcher,
c881c20e49dbaca3ff6cef365969354150983230c39520b917f5cf7c4e696b65: nikeFetcher,
"03dc510dbd1d1321edc06d8ae013f55fdd79f390c7415e2a09b64797534e4f4b":
Expand All @@ -446,5 +449,5 @@ export const supplyFetchers: Record<string, SupplyFetcher> = {
ea02c99c0668891d6b7cdc49e075cbddf9cd5b89404e5a8a8e5d7016534c4f5020436f696e:
slopFetcher,
"7d869e0e6f936c3299a8b8df2b8f13d5233801e11676ff06e78e8dbe4649474854":
fightFetcher,
fightFetcher,
};
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 = 1_000_000_000;

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

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

export default fetcher;
Loading