Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

REIT token circulating supply #337

Merged
merged 3 commits into from
Jul 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,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 @@ -321,6 +322,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;
Loading