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 Scale, Slop #345

Merged
merged 18 commits into from
Jul 10, 2024
6 changes: 6 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,12 @@ import rjvFetcher from "./tokens/rjv";
import rsbtcFetcher from "./tokens/rsbtc";
import rsergFetcher from "./tokens/rserg";
import rsrsnFetcher from "./tokens/rsrsn";
import scaleFetcher from "./tokens/scale";
import shardsFetcher from "./tokens/shards";
import sharkyFetcher from "./tokens/sharky";
import sharlFetcher from "./tokens/sharl";
import shenFetcher from "./tokens/shen";
import slopFetcher from "./tokens/slop";
import smokeFetcher from "./tokens/smoke";
import snekFetcher from "./tokens/snek";
import snepeFetcher from "./tokens/snepe";
Expand Down Expand Up @@ -438,4 +440,8 @@ export const supplyFetchers: Record<string, SupplyFetcher> = {
rausiFetcher,
a1ce0414d79b040f986f3bcd187a7563fd26662390dece6b12262b52464c45534820544f4b454e:
fleshFetcher,
"1f01188ffed79a9296d824c49eec851c21ea860e7c4f88324de50f2c7363616c65":
scaleFetcher,
ea02c99c0668891d6b7cdc49e075cbddf9cd5b89404e5a8a8e5d7016534c4f5020436f696e:
slopFetcher,
};
29 changes: 29 additions & 0 deletions src/tokens/scale.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import { defaultFetcherOptions, SupplyFetcher } from "../types";
import { getAmountInAddresses, getBlockFrostInstance } from "../utils";

const SCALE = "1f01188ffed79a9296d824c49eec851c21ea860e7c4f88324de50f2c7363616c65";

const fetcher: SupplyFetcher = async (options = defaultFetcherOptions) => {
const blockFrost = getBlockFrostInstance(options);
const total = 40_000_000;
const treasuryRaw = await getAmountInAddresses(blockFrost, SCALE, [
"stake1u8mceu7uqd943my6k3mmja9j7rm5kjg7ezgnzwcfqvranfsl0p2ku", // $scale.ipdholder
"stake1uy9tsassdgfqpkdxmtusnd7r39z3j5sp2judhl7g449jltgr4kkx5", // $partner.market
"stake1u86fxn5kx4s0qsh0zj4xkzs4xsrkl9pku3xjughdyhva86qhs4eem", // $scale.ispo.drip
"stake1u8sm7tl8u0n6yc8vlzpds06cpqclen490tptxn223zaq20scvlgtj", // $scale.vaultfeed
"stake1uykxdu30uduseadh5zwj43f88um8dr9y6renkf6e9mjerys84df64", // $scale.vesting
]);

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

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

export default fetcher;
26 changes: 26 additions & 0 deletions src/tokens/slop.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { defaultFetcherOptions, SupplyFetcher } from "../types";
import { getAmountInAddresses, getBlockFrostInstance } from "../utils";

const SLOP = "ea02c99c0668891d6b7cdc49e075cbddf9cd5b89404e5a8a8e5d7016534c4f5020436f696e";

const fetcher: SupplyFetcher = async (options = defaultFetcherOptions) => {
const blockFrost = getBlockFrostInstance(options);
const total = 1_000_000_000;
const treasuryRaw = await getAmountInAddresses(blockFrost, SLOP, [
"stake1u8ugkt7a7p8wl4635lsjamepma9dvtyhye378g6z8vuvrqqujky50", // $slop
"stake1u9l00ughh8q2v7a6gd20fl3z2nq2ft0g4c2rr4pvucjwmvs2a9vfs", // $hogsweeper
]);

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

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

export default fetcher;
Loading