Skip to content

Commit

Permalink
Add RAUSI (#330)
Browse files Browse the repository at this point in the history
* Create rausi.ts

* Update index.ts

* Update index.ts

* Update index.ts
  • Loading branch information
rausi committed Jun 27, 2024
1 parent e055a3b commit d0f2420
Show file tree
Hide file tree
Showing 2 changed files with 29 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 @@ -107,6 +107,7 @@ import prsprFetcher from "./tokens/prspr";
import pugchipFetcher from "./tokens/pugchip";
import punksFetcher from "./tokens/punks";
import rakerFetcher from "./tokens/raker";
import rausiFetcher from "./tokens/rausi";
import revuFetcher from "./tokens/revu";
import rexFetcher from "./tokens/rex";
import rjvFetcher from "./tokens/rjv";
Expand Down Expand Up @@ -405,4 +406,6 @@ export const supplyFetchers: Record<string, SupplyFetcher> = {
rsbtcFetcher,
"04b95368393c821f180deee8229fbd941baaf9bd748ebcdbf7adbb14727352534e":
rsrsnFetcher,
c80d335ae2206381ae3dfe07b1ef38e43af95736e7f5d4f150663c255241555349:
rausiFetcher,
};
26 changes: 26 additions & 0 deletions src/tokens/rausi.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 RAUSI = "c80d335ae2206381ae3dfe07b1ef38e43af95736e7f5d4f150663c255241555349";

const fetcher: SupplyFetcher = async (options = defaultFetcherOptions) => {
const blockFrost = getBlockFrostInstance(options);
const total = 8_000_000_000;
const treasuryRaw = await getAmountInAddresses(blockFrost, RAUSI, [
"addr1wypryvmw8z8yn9yqlyact9njtrkndu0g0gvq9q5llq4rppc549g39", // Reserve, locked until 01-2025
"addr1w9szsx54qadp2yqe2xqrh6fmta6vuvqwtd5zsk7ec6j9sasmxhv3w", // Reserve, locked until 06-2028
]);

const burnRaw = await getAmountInAddresses(blockFrost, RAUSI, [
"addr1w8qmxkacjdffxah0l3qg8hq2pmvs58q8lcy42zy9kda2ylc6dy5r4", // burnsnek 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 d0f2420

Please sign in to comment.