From 340cadec461a988c039051f5c26fbe28ad1f0b40 Mon Sep 17 00:00:00 2001 From: elpeq Date: Thu, 5 Sep 2024 03:36:58 +0200 Subject: [PATCH] Add peepee token (#368) * Add files via upload * Update index.ts * Update index.ts --------- Co-authored-by: Patrik <51710571+shadowkora@users.noreply.github.com> --- src/index.ts | 2 ++ src/tokens/peepee.ts | 26 ++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 src/tokens/peepee.ts diff --git a/src/index.ts b/src/index.ts index f809b77a..23a8b3db 100644 --- a/src/index.ts +++ b/src/index.ts @@ -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"; @@ -459,6 +460,7 @@ export const supplyFetchers: Record = { "81926a57a567c11f6dc502254c5ed2d11fdba4ed9f898916699c6f1753414645": safeFetcher, dce34158d07be7187401a756a3273b792f6476e2ea09c3f2ae7b229d63756c74: cultFetcher, + "07ccfad78099fef727bfc64de1cf2e684c0872aab3c3bb3bed5e1081": peepeeFetcher, "05c4bcecccff054c9aefff8bdc310e1edb8baa0756d912b47ae45d694d65656d": meemFetcher, }; diff --git a/src/tokens/peepee.ts b/src/tokens/peepee.ts new file mode 100644 index 00000000..1027466b --- /dev/null +++ b/src/tokens/peepee.ts @@ -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;