forked from jito-foundation/distributor
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgenerate_csv.py
More file actions
49 lines (35 loc) · 1.51 KB
/
Copy pathgenerate_csv.py
File metadata and controls
49 lines (35 loc) · 1.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/usr/bin/env python3
import csv
import random
from solders.keypair import Keypair
def generate_random_pubkey():
"""Generate a random Solana public key"""
keypair = Keypair()
return str(keypair.pubkey())
def main():
filename = "airdrop_100k.csv"
num_wallets = 100000
# Your specific wallet should get 10 USDC
target_wallet = "F2pKXoQ6BL2Ex1PbDaKBv2DrNBgSvRRx8mTQU9ssmAqb"
target_amount = 10
categories = ["Staker", "Validator", "Searcher"]
with open(filename, 'w', newline='') as csvfile:
writer = csv.writer(csvfile)
# Write header
writer.writerow(["pubkey", "amount_unlocked", "amount_locked", "category"])
# Write your specific wallet first
writer.writerow([target_wallet, target_amount, 0, "Staker"])
# Generate remaining wallets
for i in range(num_wallets - 1):
pubkey = generate_random_pubkey()
# Random amounts between 1-1000 USDC
amount_unlocked = random.randint(1, 1000)
amount_locked = random.randint(0, 500)
category = random.choice(categories)
writer.writerow([pubkey, amount_unlocked, amount_locked, category])
if (i + 1) % 10000 == 0:
print(f"Generated {i + 1} wallets...")
print(f"Generated {filename} with {num_wallets} wallets")
print(f"Target wallet {target_wallet} can claim {target_amount} USDC")
if __name__ == "__main__":
main()