Skip to content

Commit

Permalink
add LOBSTER (#91)
Browse files Browse the repository at this point in the history
* Update index.ts

Added LobsterFetcher

* Create lobster.ts

* Add files via upload

* add LOBSTER

Signed-off-by: Nguyen Le Vu Long <vulongvn98@gmail.com>

---------

Signed-off-by: Nguyen Le Vu Long <vulongvn98@gmail.com>
Co-authored-by: LOBSTER COIN <97616313+LOGAN-LOBSTER@users.noreply.github.com>
  • Loading branch information
longngn and LOGAN-LOBSTER authored Jul 17, 2023
1 parent bf20d22 commit 4ff5d20
Show file tree
Hide file tree
Showing 2 changed files with 36 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 @@ -30,6 +30,7 @@ import ibtcFetcher from "./tokens/ibtc";
import iethFetcher from "./tokens/ieth";
import indyFetcher from "./tokens/indy";
import iusdFetcher from "./tokens/iusd";
import lobsterFetcher from "./tokens/lobster";
import liqwidFetcher from "./tokens/lq";
import meldFetcher from "./tokens/meld";
import milkFetcher from "./tokens/milk";
Expand Down Expand Up @@ -151,6 +152,8 @@ export const supplyFetchers: Record<string, SupplyFetcher> = {
stableFetcher,
c0ee29a85b13209423b10447d3c2e6a50641a15c57770e27cb9d507357696e67526964657273:
wrtFetcher,
"8654e8b350e298c80d2451beb5ed80fc9eee9f38ce6b039fb8706bc34c4f4253544552":
lobsterFetcher,
"4fde92c2f6dbcfa2879b44f7453872b31394cfb2f70f1d4c411169ac427562626c65":
bubbleFetcher,
"09f5f55fcad17503e6b7acc81de7c80f84b76e76d17085f0e32f1ce241574f4f":
Expand Down
33 changes: 33 additions & 0 deletions src/tokens/lobster.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import { defaultFetcherOptions, SupplyFetcher } from "../types";
import { getAmountInAddresses, getBlockFrostInstance } from "../utils";

const LOBSTER =
"8654e8b350e298c80d2451beb5ed80fc9eee9f38ce6b039fb8706bc34c4f4253544552";

const TREASURY_ADDRESSES = [
"addr1qxkmr0m22xeqludcg5rjdmecjxasu9fat0680qehtcsnftaadgykewa9ufvegeuca9yyq03d9v7ea2y2zthgu7hfgjtsddp6gr", // yield farming bot
"addr1w94tcvd04rvkpa7c6057fq6sfxqcpu7q539gdskvx8jz0zgld4mju", // STAKING
"addr1q9cxpyew4ejyamjk5ycg95lhkswpsdkta36sjdx4p8e6hg2a0cwj8v3hjkj5era0dtpjtw5zema9lsfz80wu7kt3sxusyv58nf", // Treasury vault
];

const BURN_ADDRESSES = [
"addr1w93rz3ae8p3elzn0sqfu37hyzw0up98r2kgjjdmdq9wshmck40yr8", // $cardanoburn
"addr1qx5lyl2rww7h84xhup9ge22h42vnwurcfucrk3w3x7nyh9lfaquqs0f48akca9kvukqsp3cax4whwmj792dlelq7lymsk2mn3f", // $lobster.burn
];

const fetcher: SupplyFetcher = async (options = defaultFetcherOptions) => {
const blockFrost = getBlockFrostInstance(options);
const total = 1e15; // 1T
const treasury = Number(
await getAmountInAddresses(blockFrost, LOBSTER, TREASURY_ADDRESSES)
);
const burnt = Number(
await getAmountInAddresses(blockFrost, LOBSTER, BURN_ADDRESSES)
);
return {
circulating: (total - burnt - treasury).toString(),
total: (total - burnt).toString(),
};
};

export default fetcher;

0 comments on commit 4ff5d20

Please sign in to comment.