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 SupplyFetcher for FIGHT token * Updated index.ts with fightFetcher * Added $burnsnek wallet
- Loading branch information
1 parent
46b14e7
commit 07b6595
Showing
2 changed files
with
26 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,23 @@ | ||
import { defaultFetcherOptions, SupplyFetcher } from "../types"; | ||
import { getAmountInAddresses, getBlockFrostInstance } from "../utils"; | ||
|
||
const FIGHT = "7d869e0e6f936c3299a8b8df2b8f13d5233801e11676ff06e78e8dbe4649474854"; | ||
|
||
const fetcher: SupplyFetcher = async (options = defaultFetcherOptions) => { | ||
const blockFrost = getBlockFrostInstance(options); | ||
const total = 450_000_000_000; | ||
const treasuryRaw = await getAmountInAddresses(blockFrost, FIGHT, [ | ||
"stake1uygzdup55m354t6nx9nlj9eqhquh5rfue4tzm3yppaxr6vgz6cspc", // $fight.coin | ||
]); | ||
const burnRaw = await getAmountInAddresses(blockFrost, FIGHT, [ | ||
"addr1w8qmxkacjdffxah0l3qg8hq2pmvs58q8lcy42zy9kda2ylc6dy5r4", // $burnsnek | ||
]); | ||
const treasury = Number(treasuryRaw); | ||
const burn = Number(burnRaw); | ||
return { | ||
circulating: (total - treasury - burn).toString(), | ||
total: (total - burn).toString(), | ||
}; | ||
}; | ||
|
||
export default fetcher; |