diff --git a/src/index.ts b/src/index.ts index 2148ac88..30414ad2 100644 --- a/src/index.ts +++ b/src/index.ts @@ -17,6 +17,7 @@ import boonFetcher from "./tokens/boon"; import boxFetcher from "./tokens/box"; import bptFetcher from "./tokens/bpt"; import btnFetcher from "./tokens/btn"; +import burnzFetcher from "./tokens/burnz"; import bubbleFetcher from "./tokens/bubble"; import c3Fetcher from "./tokens/c3"; import c4Fetcher from "./tokens/c4"; @@ -481,4 +482,5 @@ export const supplyFetchers: Record = { piguFetcher, "30d2ebdb2fec06142ee84e5120c2717b4d68a91bffd924420d94ddea43484950": chipFetcher, + "86340a33acf14b5c967584c9a20e984695ab3289696d138048f572be4255524e5a": burnzFetcher, }; diff --git a/src/tokens/burnz.ts b/src/tokens/burnz.ts new file mode 100644 index 00000000..a31f8544 --- /dev/null +++ b/src/tokens/burnz.ts @@ -0,0 +1,21 @@ +import { defaultFetcherOptions, SupplyFetcher } from "../types"; +import { getAmountInAddresses, getBlockFrostInstance } from "../utils"; + +const TOKEN = + "86340a33acf14b5c967584c9a20e984695ab3289696d138048f572be4255524e5a"; + +const fetcher: SupplyFetcher = async (options = defaultFetcherOptions) => { + const blockFrost = getBlockFrostInstance(options); + const total = 1_000_000_000; + const treasuryRaw = await getAmountInAddresses(blockFrost, TOKEN, [ + "addr1qxc6u2d5ppeuhg7tkj5quf3csxp2022g98az65hpad9m6yreuxes6p3hhg880tegsg95xqwek6srgac5jq04x9rcm2qq6a6md7", // TREASURY + "addr1qxtqu8cvxjxrh035s6f9k698rglpguz4xs8gw5edja2z6fp4x79ct53d3gpl0g3w4eyvnlv09nkjqvrkspfxjza3h0eqy34flk", // team + ]); + const treasury = Number(treasuryRaw); + return { + circulating: (total - treasury).toString(), + total: total.toString(), + }; +}; + +export default fetcher;