Skip to content

Commit

Permalink
Initial Add Dega Token
Browse files Browse the repository at this point in the history
  • Loading branch information
Mercurial committed Jul 23, 2024
1 parent 0f08a52 commit ee30e51
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/tokens/dega.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { defaultFetcherOptions, SupplyFetcher } from "../types";
import { getAmountInAddresses, getBlockFrostInstance } from "../utils";

const DEGA = "25c5de5f5b286073c593edfd77b48abc7a48e5a4f3d4cd9d428ff93544454741";
const TREASURY_ADDRESSES = ["<INSERT TREASURY HERE>"];

const fetcher: SupplyFetcher = async (options = defaultFetcherOptions) => {
const blockFrost = getBlockFrostInstance(options);
const total = 33.80325678;
const treasury = Number(
await getAmountInAddresses(blockFrost, DEGA, TREASURY_ADDRESSES)
);

return {
circulating: ((total * 1e8 - treasury) / 1e8).toString(),
total: total.toString(),
};
};

export default fetcher;

0 comments on commit ee30e51

Please sign in to comment.