This repository has been archived by the owner on Dec 16, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 132
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* added catnip * Update index.ts * Update catnip.ts * added catnip.ts and inxed --------- Co-authored-by: NFTKri <[email protected]>
- Loading branch information
1 parent
8675bda
commit dbd6ec7
Showing
2 changed files
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 CATNIP = "633f2e2c5280417c6b76055eda54fc07de984c122c01573ea4a9e8234361746e6970"; | ||
|
||
const fetcher: SupplyFetcher = async (options = defaultFetcherOptions) => { | ||
const blockFrost = getBlockFrostInstance(options); | ||
const total = 900_000_000; | ||
const treasuryRaw = await getAmountInAddresses(blockFrost, CATNIP, [ | ||
"stake178lgmc2vgwkvr9dll5keap2fvga7f6sanu0rt0902skr3ms56772e", // Treasury | ||
]); | ||
|
||
const burnRaw = await getAmountInAddresses(blockFrost, CATNIP, [ | ||
"addr1w8qmxkacjdffxah0l3qg8hq2pmvs58q8lcy42zy9kda2ylc6dy5r4", // burn address | ||
]); | ||
|
||
const treasury = Number(treasuryRaw); | ||
const burn = Number(burnRaw); | ||
return { | ||
circulating: (total - treasury - burn).toString(), | ||
total: (total - burn).toString(), | ||
}; | ||
}; | ||
|
||
export default fetcher; |