Skip to content
This repository was archived by the owner on Dec 16, 2024. It is now read-only.

Commit

Permalink
Add $VIPER token (#236)
Browse files Browse the repository at this point in the history
* Added VIPER token

* added burn address
  • Loading branch information
snekper authored Jan 16, 2024
1 parent 28af419 commit e3f2fa6
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ import sundaeFetcher from "./tokens/sundae";
import tedyFetcher from "./tokens/tedy";
import trtlFetcher from "./tokens/trtl";
import utilFetcher from "./tokens/util";
import viperFetcher from "./tokens/viper";
import vnmFetcher from "./tokens/vnm";
import vyfiFetcher from "./tokens/vyfi";
import wmtFetcher from "./tokens/wmt";
Expand Down Expand Up @@ -266,4 +267,6 @@ export const supplyFetchers: Record<string, SupplyFetcher> = {
gokeyFetcher,
b166a1047a8cd275bf0a50201ece3d4f0b4da300094ffcc668a6f4084b49545550:
kitupFetcher,
caff93803e51c7b97bf79146790bfa3feb0d0b856ef16113b391b9975649504552:
viperFetcher,
};
28 changes: 28 additions & 0 deletions src/tokens/viper.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import { defaultFetcherOptions, SupplyFetcher } from "../types";
import { getAmountInAddresses, getBlockFrostInstance } from "../utils";

const VIPER =
"caff93803e51c7b97bf79146790bfa3feb0d0b856ef16113b391b9975649504552";

const fetcher: SupplyFetcher = async (options = defaultFetcherOptions) => {
const blockFrost = getBlockFrostInstance(options);
const total = 76_715_880_000;
const treasuryRaw = await getAmountInAddresses(blockFrost, VIPER, [
"addr1q8hcfzrpjde5geldv4a2lx9njms24f5afge2pgryd7avueaejeq5ph79pnsgh798h05ffe08a0ueq6rtxpxrx8ntxq8sjksh9n", // airdrop_2
"addr1qydndhsnzlhxtzazl5y4jaup40kk0ucv3njhdjrt5pspan97qptktvzfzy40dnc6544xpfckwlf8kkentendpql7z89qlcp444", // airdrop_3
"addr1q9knde3r2wvhk8fjajchlfuh52k2jc2df65m9ymnxv4v85fkymz384ls0rwxwzx74xh4xc5adfrmhp9lr5m7p8gzmljq0s30ne", // devwallet
]);

const burnRaw = await getAmountInAddresses(blockFrost, VIPER, [
"addr1w8qmxkacjdffxah0l3qg8hq2pmvs58q8lcy42zy9kda2ylc6dy5r4",
]);

const treasury = Number(treasuryRaw);
const burn = Number(burnRaw);
return {
circulating: (total - treasury - burn).toString(),
total: (total - burn).toString(),
};
};

export default fetcher;

0 comments on commit e3f2fa6

Please sign in to comment.