Skip to content
This repository has been archived by the owner on Dec 16, 2024. It is now read-only.

Add LCC Token #179

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
import indyFetcher from "./tokens/indy";
import iusdFetcher from "./tokens/iusd";
import jpgFetcher from "./tokens/jpg";
import lccFetcher from "./tokens/lcc";

Check failure on line 43 in src/index.ts

View workflow job for this annotation

GitHub Actions / build-and-test

'lccFetcher' is defined but never used

Check failure on line 43 in src/index.ts

View workflow job for this annotation

GitHub Actions / build-and-test

'lccFetcher' is defined but never used
import lifiFetcher from "./tokens/lifi";
import lobsterFetcher from "./tokens/lobster";
import liqwidFetcher from "./tokens/lq";
Expand Down
19 changes: 19 additions & 0 deletions src/tokens/lcc.ts
Original file line number Diff line number Diff line change
@@ -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;
Loading