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

Commit

Permalink
Add LCC Token (#181)
Browse files Browse the repository at this point in the history
* add Token LCC

Add

import lccFetcher from ""./tokens/lcc;

on line 43

* Add LCC Token

* Update index.ts

* Update index.ts
  • Loading branch information
eric821031 authored Nov 25, 2023
1 parent 72cb8d1 commit d61c1e7
Show file tree
Hide file tree
Showing 2 changed files with 21 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 @@ -40,6 +40,7 @@ import iethFetcher from "./tokens/ieth";
import indyFetcher from "./tokens/indy";
import iusdFetcher from "./tokens/iusd";
import jpgFetcher from "./tokens/jpg";
import lccFetcher from "./tokens/lcc";
import lifiFetcher from "./tokens/lifi";
import lobsterFetcher from "./tokens/lobster";
import liqwidFetcher from "./tokens/lq";
Expand Down Expand Up @@ -225,4 +226,5 @@ export const supplyFetchers: Record<string, SupplyFetcher> = {
bookFetcher,
"961f2cac0bb1967d74691af179350c1e1062c7298d1f7be1e4696e31": derpFetcher,
"2d587111358801114f04df83dc0015de0a740b462b75cce5170fc935434749": cgiFetcher,
"03c2eb4f942703fa965df42ba8ac57e27c5e86802d058da63f4d888b4c4343": lccFetcher,
};
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;

0 comments on commit d61c1e7

Please sign in to comment.