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

Commit

Permalink
ashib update - circulation fix
Browse files Browse the repository at this point in the history
  • Loading branch information
similiken authored Nov 9, 2023
1 parent 71407c7 commit 1370d80
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions src/tokens/ashib.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
import { SupplyFetcher } from "../types";
import { defaultFetcherOptions, SupplyFetcher } from "../types";
import { getAmountInAddresses, getBlockFrostInstance } from "../utils";

const fetcher: SupplyFetcher = async () => {
const total = 109000000000;
const ASHIB =
"afc910d7a306d20c12903979d4935ae4307241d03245743548e767834153484942";
const TREASURY_ADDRESSES = [
"addr1qxpv50tpyy9xutrzd3585eup87wm0qv3zyw4jfawqzchgyfltcw74v5edmr2veq0dvu4262jhendzee24ellgcamlqzsfzzfsq", // treasury 1
"addr1q8dhkxncaznxd66tq5npvuqxl87zdw0glpazysxckl9gxfecnrdy6frmvrk2szfx2wsg9wa3z3wzctfmgaw7hcts7g6quzkakx", // treasury 2
];

const fetcher: SupplyFetcher = async (options = defaultFetcherOptions) => {
const blockFrost = getBlockFrostInstance(options);
const total = 109e9; // 109 billion
const treasury =
Number(await getAmountInAddresses(blockFrost, ASHIB, TREASURY_ADDRESSES)) /
1e9;
return {
circulating: (total - treasury).toString(),
total: total.toString(),
};
};
Expand Down

0 comments on commit 1370d80

Please sign in to comment.