Skip to content

Commit

Permalink
Add $CTV
Browse files Browse the repository at this point in the history
Initial add of ctv.ts and inclusion to index.ts
  • Loading branch information
ctvvaultkeeper committed Jun 22, 2024
1 parent e055a3b commit 3216c98
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import cnctFetcher from "./tokens/cnct";
import cnetaFetcher from "./tokens/cneta";
import copiFetcher from "./tokens/copi";
import cswapFetcher from "./tokens/cswap";
import cswapFetcher from "./tokens/ctv";
import daddyFetcher from "./tokens/daddy";
import danaFetcher from "./tokens/dana";
import derpFetcher from "./tokens/derp";
Expand Down
25 changes: 25 additions & 0 deletions src/tokens/ctv.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { defaultFetcherOptions, SupplyFetcher } from "../types";
import { getAmountInAddresses, getBlockFrostInstance } from "../utils";

const CTV = "9f452e23804df3040b352b478039357b506ad3b50d2ce0d7cbd5f806435456";

// Define the treasury addresses for the CTV token
const TREASURY_ADDRESSES = [
"addr1qyjwhsj246x8nf9evkadxtt0crgg2qjp7mk76zdnm38r0qp397a6yhn3qpzwt3ekwvtmptfxd8427egmlrrmufxvkgtsna5evs", // $ctv4vaults - Vault Seeker NFT Staking Rewards
"addr1qy5u9xul7vfhn3gvk68zzqfxxl6uxy5n7j3kq39aet06f4qh8u90v36crqhfj4stq2vmj98lyqzryd5nfg4j5ca6cjmqq9xzgt", // $ctv_reserve - Community controlled reserves
// Add more treasury addresses as needed
];

const fetcher: SupplyFetcher = async (options = defaultFetcherOptions) => {
const blockFrost = getBlockFrostInstance(options);
const total = 1e9; // Define the total supply of CTV, adjust as needed
const treasury =
Number(await getAmountInAddresses(blockFrost, CTV, TREASURY_ADDRESSES)) /
1e6; // Assuming 6 decimal places
return {
circulating: (total - treasury).toString(),
total: total.toString(),
};
};

export default fetcher;

0 comments on commit 3216c98

Please sign in to comment.