-
Notifications
You must be signed in to change notification settings - Fork 127
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: jacobwarren44 <[email protected]>
- Loading branch information
1 parent
a4aa0a0
commit 2e65ad2
Showing
2 changed files
with
21 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,19 @@ | ||
import { defaultFetcherOptions, SupplyFetcher } from "../types"; | ||
import { getAmountInAddresses, getBlockFrostInstance } from "../utils"; | ||
|
||
const VNM = "2d92af60ee429bce238d3fd9f2531b45457301d74dad1bcf3f9d1dca564e4d"; | ||
|
||
const fetcher: SupplyFetcher = async (options = defaultFetcherOptions) => { | ||
const total = 150e6; | ||
const blockFrost = getBlockFrostInstance(options); | ||
const treasuryRaw = await getAmountInAddresses(blockFrost, VNM, [ | ||
"stake1u8uv6eaj6ulpymd7ua6ag203fet6ypv9xj7aj8525vnjwyqlqyqsp", | ||
]); | ||
const treasury = Number(treasuryRaw) / 1e4; | ||
return { | ||
circulating: (total - treasury).toString(), | ||
total: total.toString(), | ||
}; | ||
}; | ||
|
||
export default fetcher; |