Skip to content

Commit

Permalink
randomize spendings
Browse files Browse the repository at this point in the history
  • Loading branch information
killroy192 committed Jul 27, 2024
1 parent a127649 commit e9df93f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/core/distribution/distributeNative.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ import { getEVMWallets } from "src/libs/configs";
import { sleep, getRandomArbitrary } from "src/libs/shared";
import { logger } from "src/logger";

const MIN_SPEND = parseEther("0.0015");

export const distributeNative = async (chain: Chain) => {
const wallets = await getEVMWallets();

Expand All @@ -24,7 +22,8 @@ export const distributeNative = async (chain: Chain) => {

const config = wallets.slice(1).map(({ address }, index) => {
const amount = (valueLeft / 100n) * BigInt(index + 1);
const amountToSpend = amount > MIN_SPEND ? amount : MIN_SPEND;
const minSpend = parseEther(`0.00${getRandomArbitrary(13, 175)}`);
const amountToSpend = amount > minSpend ? amount : minSpend;
valueLeft -= amountToSpend;
return {
to: address,
Expand Down

0 comments on commit e9df93f

Please sign in to comment.