Skip to content

Commit

Permalink
Create bpt.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
NFTKri authored Jun 17, 2024
1 parent 7ef79fd commit cd67731
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions src/tokens/bpt.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 BPT = "d42729a8559b38c5d13009d653e4086404234bdb535a97b945c6ea78425054";

const fetcher: SupplyFetcher = async (options = defaultFetcherOptions) => {
const blockFrost = getBlockFrostInstance(options);
const total = 155_000_000_000_000_000;
const treasuryRaw = await getAmountInAddresses(blockFrost, BPT, [
"stake1uypqrgwhdktwdc0735wvtclvttu5nxp48fvq6mv742gmmhcjh0xu8", // Treasury
]);

const burnRaw = await getAmountInAddresses(blockFrost, BPT, [
"addr1w8qmxkacjdffxah0l3qg8hq2pmvs58q8lcy42zy9kda2ylc6dy5r4", // burn address
]);

const treasury = Number(treasuryRaw);
const burn = Number(burnRaw);
return {
circulating: (total - treasury - burn).toString(),
total: (total - burn).toString(),
};
};

export default fetcher;

0 comments on commit cd67731

Please sign in to comment.