Skip to content

Commit

Permalink
Add GIRLFREN (#334)
Browse files Browse the repository at this point in the history
* Create girlfren.ts

* Update index.ts

* Update index.ts format

* Update index.ts

* Update index.ts

* Update girlfren.ts

---------

Co-authored-by: Patrik <51710571+shadowkora@users.noreply.github.com>
  • Loading branch information
NFTKri and shadowkora authored Jun 27, 2024
1 parent 5daeddf commit 353dc45
Show file tree
Hide file tree
Showing 2 changed files with 28 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 @@ -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;

0 comments on commit 353dc45

Please sign in to comment.