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

Add GIRLFREN #334

Merged
merged 7 commits into from
Jun 27, 2024
Merged
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
3 changes: 3 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ import frenFetcher from "./tokens/fren";
import gensFetcher from "./tokens/gens";
import gensxFetcher from "./tokens/gensx";
import geroFetcher from "./tokens/gero";
import girlfrenFetcher from "./tokens/girlfren";
import gldsnekFetcher from "./tokens/gldsnek";
import gmeFetcher from "./tokens/gme";
import gokeyFetcher from "./tokens/gokey";
Expand Down Expand Up @@ -408,6 +409,8 @@ export const supplyFetchers: Record<string, SupplyFetcher> = {
rsbtcFetcher,
"04b95368393c821f180deee8229fbd941baaf9bd748ebcdbf7adbb14727352534e":
rsrsnFetcher,
"20efaf13727eea5813e57530f1f9bb60fa8a986056b48c4b89d59b414769726c4672656e":
girlfrenFetcher,
c80d335ae2206381ae3dfe07b1ef38e43af95736e7f5d4f150663c255241555349:
rausiFetcher,
};
25 changes: 25 additions & 0 deletions src/tokens/girlfren.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 GIRLFREN = "20efaf13727eea5813e57530f1f9bb60fa8a986056b48c4b89d59b414769726c4672656e";

const fetcher: SupplyFetcher = async (options = defaultFetcherOptions) => {
const blockFrost = getBlockFrostInstance(options);
const total = 69_420_000_000;
const treasuryRaw = await getAmountInAddresses(blockFrost, GIRLFREN, [
"stake1uyz9dgwqjdtqa36nn7mn4t6ptsu66dnd3c9uwv9luhkzlcgsa3v5h", // Treasury
]);

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

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

export default fetcher;
Loading