Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add unclaimed MIN in MasterChef wallet to circ supply #93

Merged
merged 1 commit into from
Jul 20, 2023
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
13 changes: 10 additions & 3 deletions src/tokens/min.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
import { defaultFetcherOptions, SupplyFetcher } from "../types";
import { getAmountInAddresses, getBlockFrostInstance } from "../utils";
import {
getAmountInAddresses,
getAxiosInstance,
getBlockFrostInstance,
} from "../utils";

const MIN = "29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c64d494e";
const TREASURY_ADDRESSES = [
"addr1qxkmr0m22xeqludcg5rjdmecjxasu9fat0680qehtcsnftaadgykewa9ufvegeuca9yyq03d9v7ea2y2zthgu7hfgjtsddp6gr", // yield farming bot
"addr1vx00uxlpkzgkrga47zdypj40a3yjs0u3wad88kdy9l3rekcrmyz69", // vesting bot for MINt conversion
"addr1wx5p836jswavyfd3nuwscz53fkyu43kmn2wwje73qhf48mqw02kqx", // vesting contract
// TREASURY
"addr1vy5nz5a8lvrd294n4cachm7qmv5jsjal9etkpwyjvqhsunq70e3fe", // old treasury
"addr1zymeshes0pxnr2s4v95a4wchxs74l0lqt5n3f6rxynnepgjj2c79gy9l76sdg0xwhd7r0c0kna0tycz4y5s6mlenh8pq64anuz", // team
"addr1z87vw6ts32hywu4j4kyk9qfgd36zhzx3y7fc786vgzlc57zj2c79gy9l76sdg0xwhd7r0c0kna0tycz4y5s6mlenh8pq9rwl7c", // dev fund
"addr1z9wdv59sq7zzy2l6gchq3247lz7ssfsxs45nj4njhwsp5uzj2c79gy9l76sdg0xwhd7r0c0kna0tycz4y5s6mlenh8pqzygnta", // DAO
Expand All @@ -17,12 +20,16 @@ const TREASURY_ADDRESSES = [

const fetcher: SupplyFetcher = async (options = defaultFetcherOptions) => {
const blockFrost = getBlockFrostInstance(options);
const axios = getAxiosInstance(options);
const total = 5e9; // 5 billion
const treasury =
Number(await getAmountInAddresses(blockFrost, MIN, TREASURY_ADDRESSES)) /
1e6;
const unclaimed = await axios
.get("https://api-mainnet-prod.minswap.org/farm/unclaimed-rewards/min")
.then((res) => Number(res.data));
return {
circulating: (total - treasury).toString(),
circulating: (total - treasury + unclaimed).toString(),
total: total.toString(),
};
};
Expand Down
Loading