Skip to content

Commit

Permalink
FET (#121)
Browse files Browse the repository at this point in the history
* Add files via upload

* Update index.ts

add fet

* Update index.ts

* Update index.ts

* Update index.ts

* Update index.ts

* Update index.ts

* Update index.ts

* Update index.ts

* Update index.ts

* Update index.ts

* Update index.ts

* Update fet.ts

* Update fet.ts

* Update fet.ts

* Update index.ts

* Update fet.ts

* Update fet.ts

* Update fet.ts

* Update fet.ts

* Update fet.ts

* Update index.ts

* Update index.ts

* Update fet.ts

* Update fet.ts

* Update fet.ts

* Update fet.ts

* Update fet.ts

* Update fet.ts

* Update fet.ts

* Create webpack.yml

* modified:   src/index.ts
	modified:   src/tokens/fet.ts

* new file:   .vscode/settings.json

* Delete .github/workflows/webpack.yml

* Delete .vscode/settings.json
  • Loading branch information
FractionEstate authored Sep 20, 2023
1 parent 6abfd2a commit 1e597a9
Show file tree
Hide file tree
Showing 2 changed files with 27 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 @@ -20,6 +20,7 @@ import djedFetcher from "./tokens/djed";
import empFetcher from "./tokens/emp";
import encsFetcher from "./tokens/encs";
import factFetcher from "./tokens/fact";
import fetFetcher from "./tokens/fet";
import flacFetcher from "./tokens/flac";
import gensFetcher from "./tokens/gens";
import gensxFetcher from "./tokens/gensx";
Expand Down Expand Up @@ -100,6 +101,7 @@ export const supplyFetchers: Record<string, SupplyFetcher> = {
vyfiFetcher,
a0028f350aaabe0545fdcb56b039bfb08e4bb4d8c4d7c3c7d481c235484f534b59:
hoskyFetcher,
"815418a1b078a259e678ecccc9d7eac7648d10b88f6f75ce2db8a25aa": fetFetcher,
dda5fdb1002f7389b33e036b6afee82a8189becb6cba852e8b79b4fb0014df1047454e53:
gensFetcher,
fbae99b8679369079a7f6f0da14a2cf1c2d6bfd3afdf3a96a64ab67a0014df1047454e5358:
Expand Down
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 total = 200e6;
const blockFrost = getBlockFrostInstance(options);
const treasuryRaw = await getAmountInAddresses(blockFrost, FET, [
"stake1uyyxjvthz4udwdrzr9pkkudpylasg99ufdzu7gpdfckxf2s5peell",
"stake1ux94pdq42nwx0g24ea3myjcnd8tvl354ku4ygedtgm7sfgc2hugz9",
"stake1uxerycuwj09h2n6wydjp4vk936la23p9dvn37ezlkmdl5ycq38hr4",
"stake1uypwcfxvg7uyzkyeue8fglq6fx7uxmampr2ahylyy4rg38cvky2pr",
"stake1ux7pa94sgkzd0yawsu9e9ddj0vr07psyezksfek24m9wn2qtjf62u",
"stake1u8qzt94vyvfvvs4qan02axtfwj2hz4dcqefpehara5rdh4q6h9xka",
"stake1uy74mhj5x3jdf8d9446xcwrw723pvqelksxwwxu5c6t799qcnww0q",
]);
const treasury = Number(treasuryRaw);
return {
circulating: (total - treasury).toString(),
total: total.toString(),
};
};

export default fetcher;

0 comments on commit 1e597a9

Please sign in to comment.