Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fraction Estate #116

Closed
wants to merge 18 commits into from
2 changes: 2 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import fetFetcher from "./tokens/fet";
import aadaFetcher from "./tokens/aada";
import agcFetcher from "./tokens/agc";
import agixFetcher from "./tokens/agix";
Expand Down Expand Up @@ -180,4 +181,5 @@ export const supplyFetchers: Record<string, SupplyFetcher> = {
utilFetcher,
a3931691f5c4e65d01c429e473d0dd24c51afdb6daf88e632a6c1e516f7263666178746f6b656e:
factFetcher,
"815418a1b078a259e678ecccc9d7eac7648d10b88f6f75ce2db8a25a": fetFetcher,
};
25 changes: 25 additions & 0 deletions src/tokens/fet.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 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;
Loading