forked from minswap/market-cap
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add proxies token * add formatting --------- Co-authored-by: Patrik <[email protected]>
- Loading branch information
1 parent
dcae3f8
commit a310905
Showing
3 changed files
with
24 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,21 @@ | ||
import { defaultFetcherOptions, SupplyFetcher } from "../types"; | ||
import { getAmountInAddresses, getBlockFrostInstance } from "../utils"; | ||
|
||
const PROXIES = "20cd68533b47565f3c61efb39c30fdace9963bfa4c0060b613448e3c50524f584945"; | ||
|
||
const fetcher: SupplyFetcher = async (options = defaultFetcherOptions) => { | ||
const blockFrost = getBlockFrostInstance(options); | ||
const total = Number(21000000000000); | ||
const treasuryRaw = await getAmountInAddresses(blockFrost, PROXIES, [ | ||
"stake1uxrtzq4epgjxz7xulm97ups30rml843trc5x8zulxxzf2rq7effsj", // Treasury | ||
]); | ||
const treasury = Number(treasuryRaw); | ||
|
||
return { | ||
circulating: (total - treasury).toString(), | ||
total: total.toString(), | ||
}; | ||
}; | ||
|
||
|
||
export default fetcher; |