diff --git a/src/index.ts b/src/index.ts index a8726678..c16321e8 100644 --- a/src/index.ts +++ b/src/index.ts @@ -155,6 +155,7 @@ import tedyFetcher from "./tokens/tedy"; import tetFetcher from "./tokens/tet"; import toolFetcher from "./tokens/tool"; import trtlFetcher from "./tokens/trtl"; +import usaFetcher from "./tokens/usa"; import utilFetcher from "./tokens/util"; import viperFetcher from "./tokens/viper"; import vnmFetcher from "./tokens/vnm"; @@ -467,6 +468,7 @@ export const supplyFetchers: Record = { "07ccfad78099fef727bfc64de1cf2e684c0872aab3c3bb3bed5e1081": peepeeFetcher, "05c4bcecccff054c9aefff8bdc310e1edb8baa0756d912b47ae45d694d65656d": meemFetcher, + b9ae7e3566ad889aae93f500746869e7b3c71480329acd0a9bc01652555341: usaFetcher, "9d8c863907e6e58823c9af13759e196dbf5da172b7d4ce37d5d1147950494755": piguFetcher, }; diff --git a/src/tokens/usa.ts b/src/tokens/usa.ts new file mode 100644 index 00000000..c6117d37 --- /dev/null +++ b/src/tokens/usa.ts @@ -0,0 +1,30 @@ +import { defaultFetcherOptions, SupplyFetcher } from "../types"; +import { getAmountInAddresses, getBlockFrostInstance } from "../utils"; + +const USA = "b9ae7e3566ad889aae93f500746869e7b3c71480329acd0a9bc01652555341"; + +const TREASURY_VAULT = [ + "addr1qxzlnzupsj47z2adgkd25rd8mq2aygr8wtdxchxnv0k5x3an2puwhfn097ytnk6du50dp27mh570um832ek48gk4dzjsmx60ct ", // Treasury + "addr1v858vfzl7hdqduqqa4vsj58nfy9njtw5q98q8tzzds58uncqjezd7", // Casino +]; + +const FUTURE_BURN_ADDRESSES = [ + "addr1w8qmxkacjdffxah0l3qg8hq2pmvs58q8lcy42zy9kda2ylc6dy5r4", //To be burnt +]; + +const fetcher: SupplyFetcher = async (options = defaultFetcherOptions) => { + const blockFrost = getBlockFrostInstance(options); + const total = 1e9; // 1,000,000,000 + const treasury = Number( + await getAmountInAddresses(blockFrost, USA, TREASURY_VAULT) + ); + const burnt = Number( + await getAmountInAddresses(blockFrost, USA, FUTURE_BURN_ADDRESSES) + ); + return { + circulating: (total - treasury).toString(), + total: (total - burnt).toString(), + }; +}; + +export default fetcher;