This will take a gib-holders export from cryptostraps, reformat the data, and airdrop SOL to the holders based on number of NFTs each holder holds.
If you are on mainnet, real funds will be transferred. Once you run the script, there will be no way to cancel the transactions. We are in no way responsible for your use or misuse of this. Use at your own risk.
Clone repo Install TypeScript and ts-node if you don't have it:
npm install -g typescript
npm install -g ts-nodeRun yarn install
Update input values for config/config.json:
{
"SOL_PER_DROP": 0.001,
"DROP_NAME": "Drop Name Identifier # XX",
"RPC": "https://example.solana.quiknode.pro/abc/",
"OUTPUT_DIR": "output",
"NUM_DROP_PER_TX": 16,
"TX_INTERVAL": 1000,
"EXCLUDE_LIST": ["EXCLUDE_WALLET_1","EXCLUDE_WALLET_2"]
}SOL_PER_DROPis the amount of SOL to be dropped per NFT heldDROP_NAMEis a name that will be used in the Solana transaction memo (viewable on Solana Explorer)RPCyour RPC provider. If you don't have one, you can get one free at quicknode.com- If you are on mainnet, real funds will be transferred. Once you run the script, there will be no way to cancel the transactions. We are in no way responsible for your use or misuse of this. Use at your own risk.
OUTPUT_DIRname of directory to save tx summary (make sure the directory exists--if it doesn't exist, the file won't be saved)NUM_DROP_PER_TXthe number of sol drops to include in a given transaction (don't mess with this unless you've done the math on tx size)TX_INTERVALnumber of ms to wait between submitting transactions to the network (done to prevent rate limits)--not recommeded to go lower than1000as it limits could impact success of some transactionsEXCLUDE_LISTlist of wallets to exclude (replace the strings with your own)
Add your wallet's private key array to config/privateKey.json.
Use Cryptostrap Tools to get holder list and save file to config/gib-holders.json.
Holder list must be of type GibExport:
//Format from Gib
export interface Holdings {
mints: string[];
amount: number;
}
export interface GibExport {
[wallet: string]: Holdings
}In terminal run npm run drop.
Terminal output should look like this:
Initiating SOL drop from YOUR_WALLET_ADDRESS.
Sending XXX ◎ per NFT (XXX ◎ Total).
Requesting Transaction 1/x
#...
Requesting Transaction x/x
AirDrop Complete!🎉
Transaction Summary written to: output/airdrop-YYYY-MM-DD.jsonModfied from: quicknode.com/guides/