Skip to content

Commit

Permalink
Add AWOO Token (#89)
Browse files Browse the repository at this point in the history
feat: add awoo token
  • Loading branch information
yHSJ authored Jul 16, 2023
1 parent 02c603e commit 7aa09cb
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import aadaFetcher from "./tokens/aada";
import agcFetcher from "./tokens/agc";
import agixFetcher from "./tokens/agix";
import ashibFetcher from "./tokens/ashib";
import awooFetcher from "./tokens/awoo";
import bankFetcher from "./tokens/bank";
import bubbleFetcher from "./tokens/bubble";
import c3Fetcher from "./tokens/c3";
Expand Down Expand Up @@ -152,4 +153,6 @@ export const supplyFetchers: Record<string, SupplyFetcher> = {
wrtFetcher,
"4fde92c2f6dbcfa2879b44f7453872b31394cfb2f70f1d4c411169ac427562626c65":
bubbleFetcher,
"09f5f55fcad17503e6b7acc81de7c80f84b76e76d17085f0e32f1ce241574f4f":
awooFetcher,
};
25 changes: 25 additions & 0 deletions src/tokens/awoo.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 AWOO = "09f5f55fcad17503e6b7acc81de7c80f84b76e76d17085f0e32f1ce241574f4f";

const fetcher: SupplyFetcher = async (options = defaultFetcherOptions) => {
const blockFrost = getBlockFrostInstance(options);
const total = 69_000_000;
const treasuryRaw = await getAmountInAddresses(blockFrost, AWOO, [
"stake1uy2s0etue4vgt6gz66t84zzgf8r6fgggc0prf4hsay3rvfcam00kg", // $unbothered
]);

const burnRaw = await getAmountInAddresses(blockFrost, AWOO, [
"addr1w8qmxkacjdffxah0l3qg8hq2pmvs58q8lcy42zy9kda2ylc6dy5r4", //$burnawoo
]);

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

export default fetcher;

0 comments on commit 7aa09cb

Please sign in to comment.