Skip to content

Commit

Permalink
Add peepee token (#368)
Browse files Browse the repository at this point in the history
* Add files via upload

* Update index.ts

* Update index.ts

---------

Co-authored-by: Patrik <51710571+shadowkora@users.noreply.github.com>
  • Loading branch information
elpeq and shadowkora committed Sep 5, 2024
1 parent d292371 commit 340cade
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ import nvlFetcher from "./tokens/nvl";
import optFetcher from "./tokens/opt";
import optimFetcher from "./tokens/optim";
import paviaFetcher from "./tokens/pavia";
import peepeeFetcher from "./tokens/peepee";
import pepeblueFetcher from "./tokens/pepeblue";
import pirateFetcher from "./tokens/pirate";
import porkeFetcher from "./tokens/porke";
Expand Down Expand Up @@ -459,6 +460,7 @@ export const supplyFetchers: Record<string, SupplyFetcher> = {
"81926a57a567c11f6dc502254c5ed2d11fdba4ed9f898916699c6f1753414645":
safeFetcher,
dce34158d07be7187401a756a3273b792f6476e2ea09c3f2ae7b229d63756c74: cultFetcher,
"07ccfad78099fef727bfc64de1cf2e684c0872aab3c3bb3bed5e1081": peepeeFetcher,
"05c4bcecccff054c9aefff8bdc310e1edb8baa0756d912b47ae45d694d65656d":
meemFetcher,
};
26 changes: 26 additions & 0 deletions src/tokens/peepee.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { defaultFetcherOptions, SupplyFetcher } from "../types";
import { getAmountInAddresses, getBlockFrostInstance } from "../utils";

const TOKEN = "07ccfad78099fef727bfc64de1cf2e684c0872aab3c3bb3bed5e1081";

const fetcher: SupplyFetcher = async (options = defaultFetcherOptions) => {
const blockFrost = getBlockFrostInstance(options);
const total = 3_000_000_000;
const treasuryRaw = await getAmountInAddresses(blockFrost, TOKEN, [
"stake1uxr3vlnzt085c0nyyv4yl7v2zcdewv02x4gslxmdc4cys3scy64vu", // royalties
"stake1799ryumz9g7a6xg8n899lt5g49ru9ccv5v0hhm6856ju54qauwms3", // team
]);

const burnRaw = await getAmountInAddresses(blockFrost, TOKEN, [
"addr1w8qmxkacjdffxah0l3qg8hq2pmvs58q8lcy42zy9kda2ylc6dy5r4", //$burnsnek
]);

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 340cade

Please sign in to comment.