diff --git a/src/index.ts b/src/index.ts index a7ce86fb..69842284 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,3 +1,4 @@ +import fetFetcher from "./tokens/fet"; import aadaFetcher from "./tokens/aada"; import agcFetcher from "./tokens/agc"; import agixFetcher from "./tokens/agix"; @@ -180,4 +181,5 @@ export const supplyFetchers: Record = { utilFetcher, a3931691f5c4e65d01c429e473d0dd24c51afdb6daf88e632a6c1e516f7263666178746f6b656e: factFetcher, + "815418a1b078a259e678ecccc9d7eac7648d10b88f6f75ce2db8a25a": fetFetcher, }; diff --git a/src/tokens/fet.ts b/src/tokens/fet.ts new file mode 100644 index 00000000..99b4426e --- /dev/null +++ b/src/tokens/fet.ts @@ -0,0 +1,25 @@ +import { defaultFetcherOptions, SupplyFetcher } from "../types"; +import { getAmountInAddresses, getBlockFrostInstance } from "../utils"; + +const FET = "815418a1b078a259e678ecccc9d7eac7648d10b88f6f75ce2db8a25a"; + +const fetcher: SupplyFetcher = async (options = defaultFetcherOptions) => { + const blockFrost = getBlockFrostInstance(options); + const total = 2e8; + const treasuryRaw = await getAmountInAddresses(blockFrost, FET, [ + "stake1uyyxjvthz4udwdrzr9pkkudpylasg99ufdzu7gpdfckxf2s5peell", // DEX funds + "stake1ux94pdq42nwx0g24ea3myjcnd8tvl354ku4ygedtgm7sfgc2hugz9", // Reserve funds + "stake1uxerycuwj09h2n6wydjp4vk936la23p9dvn37ezlkmdl5ycq38hr4", // Development funds + "stake1uypwcfxvg7uyzkyeue8fglq6fx7uxmampr2ahylyy4rg38cvky2pr", // Fraction Estate funds + "stake1ux7pa94sgkzd0yawsu9e9ddj0vr07psyezksfek24m9wn2qtjf62u", // Marketing funds + "stake1u8qzt94vyvfvvs4qan02axtfwj2hz4dcqefpehara5rdh4q6h9xka", // Founder Daniel Johnsen + "stake1uy74mhj5x3jdf8d9446xcwrw723pvqelksxwwxu5c6t799qcnww0q", // Charity funds + ]); + const treasury = Number(treasuryRaw); + return { + circulating: (total - treasury).toString(), + total: total.toString(), + }; +}; + +export default fetcher;