-
Notifications
You must be signed in to change notification settings - Fork 126
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add GUMMY market cap and circulating supply (#327)
Co-authored-by: Patrik <51710571+shadowkora@users.noreply.github.com>
- Loading branch information
1 parent
581d8f7
commit 255db9f
Showing
2 changed files
with
29 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,26 @@ | ||
import { defaultFetcherOptions, SupplyFetcher } from "../types"; | ||
import { getAmountInAddresses, getBlockFrostInstance } from "../utils"; | ||
|
||
const GUMMY = | ||
"394d8a0021c8825ad9385c1112009994e37b7b53c0c406d389d452db47756d6d79"; | ||
|
||
const fetcher: SupplyFetcher = async (options = defaultFetcherOptions) => { | ||
const blockFrost = getBlockFrostInstance(options); | ||
const total = 10_000_000_000; | ||
const treasuryRaw = await getAmountInAddresses(blockFrost, GUMMY, [ | ||
"stake1u8szpq85z7f9jv3nvtltzzkv025hpgaql2ec82v7lffse2cjg6lam", // $gummy-treasury | ||
]); | ||
|
||
const burnRaw = await getAmountInAddresses(blockFrost, GUMMY, [ | ||
"addr1w8qmxkacjdffxah0l3qg8hq2pmvs58q8lcy42zy9kda2ylc6dy5r4", // $burnsnek | ||
]); | ||
|
||
const treasury = Number(treasuryRaw); | ||
const burn = Number(burnRaw); | ||
return { | ||
circulating: (total - treasury - burn).toString(), | ||
total: (total - burn).toString(), | ||
}; | ||
}; | ||
|
||
export default fetcher; |