This is a script to airdrop jettons or tons to the receipients in batches
-
Clone the repository:
git clone https://github.com/AnishRane/JettonAirdrop
-
Install Dependencies
npm install
-
Configure your hot wallet menmonic and toncenter RPC url with token in .env file Refer example environment file
-
In Airdrop Script on line 50 you will fine Jetton Config:
const JETTONS_INFO = { '<JETTON_NAME>': { address: '', decimals: 9 } }
- Replace '<JETTON_NAME>' to actual jetton name and configure jetton address and decimals.
-
In Airdrop Script from line 224:
// Withdrawal requests queue const withdrawalRequests = [ // Contains example withdrawal request // In real system `withdrawalRequests` is table in your persistent database { jettonName: "", // pass the Jetton Name you want to Airdrop, it should match to <JETTON_NAME> from point 4 above amount: toNano("<amount_to_airdrop>"), toAddress: "<recipient1_address>" }, { jettonName: "", amount: toNano("<amount_to_airdrop>"), toAddress: "<recipient2_address>" }, { jettonName: "", amount: toNano("<amount_to_airdrop>"), toAddress: "<recipient3_address>" }, ..... ];
- As you see in above code snippet you can enqueue token transfer requests in array of objects.
- Function tick() at line 238, is the entery point to script, it manages the transaction execution one by one, and ensures next transaction is processed after the previous is completed successfully.