Skip to content

Commit

Permalink
REIT token circulating supply (#337)
Browse files Browse the repository at this point in the history
* script for circulating supply

* added the reit fetcher in index script

* removed option as it was giving build errors

---------

Co-authored-by: Nilay Saha <[email protected]>
  • Loading branch information
reitcircles and nilaysaha authored Jul 1, 2024
1 parent dbef3b4 commit af4d24b
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 @@ -116,6 +116,7 @@ import pugchipFetcher from "./tokens/pugchip";
import punksFetcher from "./tokens/punks";
import rakerFetcher from "./tokens/raker";
import rausiFetcher from "./tokens/rausi";
import reitFetcher from "./tokens/reit";
import revuFetcher from "./tokens/revu";
import rexFetcher from "./tokens/rex";
import rjvFetcher from "./tokens/rjv";
Expand Down Expand Up @@ -322,6 +323,8 @@ export const supplyFetchers: Record<string, SupplyFetcher> = {
"2d587111358801114f04df83dc0015de0a740b462b75cce5170fc935434749": cgiFetcher,
fc11a9ef431f81b837736be5f53e4da29b9469c983d07f321262ce614652454e: frenFetcher,
"61fe4feee9d051c75b20d11701c3154ae95d9857bd429ffb85087eae526578": rexFetcher,
"52d4b39c2407ce020ab4abb785d820a3ad5a2fa07600d07a205e509f52454954":
reitFetcher,
"20cd68533b47565f3c61efb39c30fdace9963bfa4c0060b613448e3c50524f584945":
proxiesFetcher,
f6ac48c64aa7af16434d9f84e014d11fba38525b436acc338ff20b0d4d7463: mtcFetcher,
Expand Down
26 changes: 26 additions & 0 deletions src/tokens/reit.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import axios from "axios";

import { SupplyFetcher } from "../types";

const REIT = "52d4b39c2407ce020ab4abb785d820a3ad5a2fa07600d07a205e509f";
const REIT_ASSET = `${REIT}52454954`;

const fetcher: SupplyFetcher = async () => {
const total = 50_000_000;

const instance = axios.create({
baseURL: `https://cardano-mainnet.blockfrost.io/api/v0/`,
timeout: 1000,
headers: { project_id: process.env["BLOCKFROST_PROJECT_ID"] },
});

const assetInfo = await instance.get(`assets/${REIT_ASSET}`);
const total_mint = assetInfo.data.quantity;

return {
circulating: total_mint,
total: total.toString(),
};
};

export default fetcher;

0 comments on commit af4d24b

Please sign in to comment.