Skip to content

Commit

Permalink
add DDoS (#336)
Browse files Browse the repository at this point in the history
* add  token

* Add $TRTL burn addresses

* add $mr.hankey

* add DDoS

---------

Co-authored-by: Patrik <[email protected]>
  • Loading branch information
BenElferink and shadowkora authored Jun 27, 2024
1 parent e21f784 commit 3a61fa5
Show file tree
Hide file tree
Showing 2 changed files with 32 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 @@ -39,6 +39,7 @@ import ctvFetcher from "./tokens/ctv";
import daddyFetcher from "./tokens/daddy";
import danaFetcher from "./tokens/dana";
import danzoFetcher from "./tokens/danzo";
import ddosFetcher from "./tokens/ddos";
import derpFetcher from "./tokens/derp";
import dgafFetcher from "./tokens/dgaf";
import dingFetcher from "./tokens/ding";
Expand Down Expand Up @@ -361,6 +362,8 @@ export const supplyFetchers: Record<string, SupplyFetcher> = {
sharkyFetcher,
"7507734918533b3b896241b4704f3d4ce805256b01da6fcede43043642616279534e454b":
babysnekFetcher,
"94bb5aa2fedb3a4097c91934c79634407f4634aa192587699ef927b744446f53":
ddosFetcher,
"6e6098846537ca48ff18eac70b7f5040c69ba2c5570521b6eb00fdf56461646479":
daddyFetcher,
ea153b5d4864af15a1079a94a0e2486d6376fa28aafad272d15b243a0014df10536861726473:
Expand Down
29 changes: 29 additions & 0 deletions src/tokens/ddos.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import { defaultFetcherOptions, SupplyFetcher } from "../types";
import { getAmountInAddresses, getBlockFrostInstance } from "../utils";

const DDOS = "94bb5aa2fedb3a4097c91934c79634407f4634aa192587699ef927b744446f53";

const fetcher: SupplyFetcher = async (options = defaultFetcherOptions) => {
const blockFrost = getBlockFrostInstance(options);

const total = 10_000_000;

const burnRaw = await getAmountInAddresses(blockFrost, DDOS, [
"addr1w8qmxkacjdffxah0l3qg8hq2pmvs58q8lcy42zy9kda2ylc6dy5r4", // SNEK burn address
]);

const burn = Number(burnRaw);

const teamRaw = await getAmountInAddresses(blockFrost, DDOS, [
"addr1qxt6fmumauv24fszmfngncs695yj0e9etqsr7lm5ym4zude4alypnn0x8ckrucs8tga0lfl5v48ec656shce0fgpa3fq3dq4hq", // $ddosfund
]);

const team = Number(teamRaw);

return {
circulating: (total - burn - team).toString(),
total: total.toString(),
};
};

export default fetcher;

0 comments on commit 3a61fa5

Please sign in to comment.