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

FET #121

Merged
merged 36 commits into from
Sep 20, 2023
Merged

FET #121

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
f5daa46
Add files via upload
FractionEstate Sep 19, 2023
1cb1789
Update index.ts
FractionEstate Sep 19, 2023
ab270c3
Update index.ts
FractionEstate Sep 19, 2023
0a6da6f
Update index.ts
FractionEstate Sep 19, 2023
58ca88c
Update index.ts
FractionEstate Sep 19, 2023
47e844d
Update index.ts
FractionEstate Sep 19, 2023
bc84fb8
Update index.ts
FractionEstate Sep 19, 2023
81d3ae6
Update index.ts
FractionEstate Sep 19, 2023
50c2fbd
Update index.ts
FractionEstate Sep 19, 2023
a14edd4
Update index.ts
FractionEstate Sep 19, 2023
4efb59d
Update index.ts
FractionEstate Sep 19, 2023
531e443
Update index.ts
FractionEstate Sep 19, 2023
432adca
Update fet.ts
FractionEstate Sep 19, 2023
90a2115
Update fet.ts
FractionEstate Sep 19, 2023
a814314
Update fet.ts
FractionEstate Sep 19, 2023
14bc2e0
Update index.ts
FractionEstate Sep 19, 2023
34156b3
Update fet.ts
FractionEstate Sep 19, 2023
d627545
Update fet.ts
FractionEstate Sep 19, 2023
18c36d1
Update fet.ts
FractionEstate Sep 19, 2023
66317d4
Update fet.ts
FractionEstate Sep 19, 2023
95f2a1d
Update fet.ts
FractionEstate Sep 19, 2023
ca022c1
Merge branch 'FractionEstate-patch-1' into main
FractionEstate Sep 19, 2023
7650f92
Update index.ts
FractionEstate Sep 19, 2023
4818436
Update index.ts
FractionEstate Sep 19, 2023
6cd0926
Update fet.ts
FractionEstate Sep 19, 2023
6e9ebc4
Update fet.ts
FractionEstate Sep 19, 2023
f4e3a06
Update fet.ts
FractionEstate Sep 19, 2023
d03d869
Update fet.ts
FractionEstate Sep 19, 2023
cc84969
Update fet.ts
FractionEstate Sep 19, 2023
e8945c7
Update fet.ts
FractionEstate Sep 19, 2023
dc45c5a
Update fet.ts
FractionEstate Sep 19, 2023
81dd3e8
Create webpack.yml
FractionEstate Sep 20, 2023
2b646d0
modified: src/index.ts
FractionEstate Sep 20, 2023
2b7bdf1
new file: .vscode/settings.json
FractionEstate Sep 20, 2023
e4bccea
Delete .github/workflows/webpack.yml
FractionEstate Sep 20, 2023
d0ea47b
Delete .vscode/settings.json
FractionEstate Sep 20, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
Loading