From 86e9855758a3e09c46fc932fedd0e68da04e1171 Mon Sep 17 00:00:00 2001 From: eric821031 <103044393+eric821031@users.noreply.github.com> Date: Sun, 19 Nov 2023 20:35:52 -0500 Subject: [PATCH] Add LCC Token --- src/tokens/lcc.ts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/tokens/lcc.ts diff --git a/src/tokens/lcc.ts b/src/tokens/lcc.ts new file mode 100644 index 00000000..97bdab91 --- /dev/null +++ b/src/tokens/lcc.ts @@ -0,0 +1,19 @@ +import { defaultFetcherOptions, SupplyFetcher } from "../types"; +import { getAmountInAddresses, getBlockFrostInstance } from "../utils"; + +const LCC = "03c2eb4f942703fa965df42ba8ac57e27c5e86802d058da63f4d888b4c4343"; + +const fetcher: SupplyFetcher = async (options = defaultFetcherOptions) => { + const blockFrost = getBlockFrostInstance(options); + const total = 450_000_000; + const treasuryRaw = await getAmountInAddresses(blockFrost, LCC, [ + "stake1ux8xh8xc4clp7nl7qplnz48y5za46dez0wmnr5z5fkrk8ks4ncp2w", + ]); + const treasury = Number(treasuryRaw); + return { + circulating: (total - treasury).toString(), + total: total.toString(), + }; +}; + +export default fetcher;