Created
January 25, 2023 13:26
-
-
Save crypt0miester/9d04e8c21c6b2bfd7b0369c61842a38c to your computer and use it in GitHub Desktop.
solana devnet airdropper. airdrops 199.991 sols to the receiver address.
This file contains hidden or 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
#!/bin/bash | |
# Airdrop amount | |
amount=2 | |
# Number of addresses to generate | |
num_addresses=10 | |
# Address to transfer all tokens to | |
receiver_address="CHANGE ME" | |
# Loop to generate addresses and airdrop tokens | |
for i in $(seq 1 $num_addresses) | |
do | |
# Generate new address and store the address in a variable | |
filepath="address-$i.json" | |
solana-keygen new --no-bip39-passphrase -s --force --outfile $filepath | |
address=$(solana-keygen pubkey $filepath) | |
for i in $(seq 1 $num_addresses) | |
do | |
# Airdrop tokens to the address0 | |
solana airdrop $amount $address | |
# Sleep for a second to avoid request limitation | |
sleep 5 | |
done | |
done | |
# Loop to transfer all tokens to the specified address | |
for i in $(seq 1 $num_addresses) | |
do | |
# Get the filepath of the address | |
filepath="address-$i.json" | |
# Transfer all tokens from the address to the specified address | |
solana transfer $receiver_address 19.99910412 -k $filepath | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment