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

$VOL update for Policy and Wallet #377

Merged
merged 1 commit into from
Nov 1, 2024
Merged
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
9 changes: 7 additions & 2 deletions src/tokens/volume.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
import { defaultFetcherOptions, SupplyFetcher } from "../types";
import { getAmountInAddresses, getBlockFrostInstance } from "../utils";

const VOLUME = "8d94085182fb206c28850f194defe748e455a104d5ff7466d90f537c";
const VOLUME = "8d94085182fb206c28850f194defe748e455a104d5ff7466d90f537c566f6c756d65";

const fetcher: SupplyFetcher = async (options = defaultFetcherOptions) => {
const blockFrost = getBlockFrostInstance(options);
const total = 1_000_000_000;
const treasuryRaw = await getAmountInAddresses(blockFrost, VOLUME, [
"stake1uy9yuyvugtmfaaww3sxdk7fyat7tc8u2jf2q9lnqksjy5aq9veu76", // Treasury
]);

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

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