Skip to content

Commit

Permalink
udpate CLAP
Browse files Browse the repository at this point in the history
Signed-off-by: Nguyen Le Vu Long <[email protected]>
  • Loading branch information
longngn committed Apr 28, 2022
1 parent 0d2b1ee commit 3288853
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import aadaFetcher from "./tokens/aada";
import agixFetcher from "./tokens/agix";
import clapFetcher from "./tokens/clap";
import liqwidFetcher from "./tokens/lq";
import meldFetcher from "./tokens/meld";
import milkFetcher from "./tokens/milk";
Expand All @@ -25,4 +26,5 @@ export const supplyFetchers: Record<string, SupplyFetcher> = {
sundaeFetcher,
"8fef2d34078659493ce161a6c7fba4b56afefa8535296a5743f6958741414441":
aadaFetcher,
db30c7905f598ed0154de14f970de0f61f0cb3943ed82c891968480a434c4150: clapFetcher,
};
18 changes: 18 additions & 0 deletions src/tokens/clap.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { SupplyFetcher } from "..";
import { getAmountInAddresses } from "../utils";

const CLAP = "db30c7905f598ed0154de14f970de0f61f0cb3943ed82c891968480a434c4150";

const fetcher: SupplyFetcher = async () => {
const total = 1e9; // 1 billion
const treasuryRaw = await getAmountInAddresses(CLAP, [
"addr1qxkcc74fpfvdenelc7m4zxtezrgvnhmd7z78jlkgr4gy9x9cjxt7rq9rfwqqh3wv24adfv2hex0ttwu3zh7e276xmcesgw34jc",
]);
const treasury = Number(treasuryRaw) / 1e3;
return {
circulating: (total - treasury).toString(),
total: total.toString(),
};
};

export default fetcher;

0 comments on commit 3288853

Please sign in to comment.