├── .gitignore ├── package.json ├── README.MD └── index.js /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # Ignore node modules 3 | /node_modules/ 4 | 5 | # Ignore logs 6 | *.log 7 | 8 | # Ignore editor files 9 | .vscode/ 10 | 11 | # Ignore environment variables 12 | .env 13 | 14 | # Ignore git 15 | .git/ 16 | 17 | # Ignore npm 18 | npm-debug.log 19 | yarn-error.log 20 | 21 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "@solana/web3.js": "^1.93.0", 4 | "bip39": "^3.1.0", 5 | "dotenv": "^16.4.5", 6 | "ed25519-hd-key": "^1.3.0" 7 | }, 8 | "name": "bot-sonic-sol", 9 | "version": "1.0.0", 10 | "main": "index.js", 11 | "scripts": { 12 | "test": "echo \"Error: no test specified\" && exit 1", 13 | "start": "node index.js" 14 | }, 15 | "keywords": [], 16 | "author": "", 17 | "license": "ISC", 18 | "description": "" 19 | } 20 | -------------------------------------------------------------------------------- /README.MD: -------------------------------------------------------------------------------- 1 | Feel free donate to my EVM and Solana address 2 | 3 | EVM : 4 | 5 | ```bash 6 | 0x9902C3A98Df4b240ad5496cC26F89bAb8058f4aE 7 | ``` 8 | 9 | SOL : 10 | 11 | ```bash 12 | 8BzHRXhHK2ijuVe5VEG6BzyqF8rHSqx4LEeD4pnmpkDh 13 | ``` 14 | 15 | ## Langkah-langkah 16 | 17 | ### 1. Clone Repositori 18 | 19 | ```bash 20 | git clone https://github.com/Mnuralim/bot-sonic-sol.git 21 | cd bot-sonic-sol 22 | ``` 23 | 24 | ### 2. Instal Dependensi 25 | 26 | ```bash 27 | npm install 28 | ``` 29 | 30 | ### 3. Konfigurasi .env File 31 | 32 | buat file .env di root projek 33 | 34 | ```bash 35 | SEED_PHRASE="your seed phrase here" 36 | ``` 37 | 38 | ### 4. Run script 39 | 40 | ```bash 41 | npm run start 42 | ``` 43 | 44 | \*pastikan udah install node js 45 | 46 | by : 47 | github : [Mnuralim](https://github.com/Mnuralim) 48 | twitter : @Izzycracker04 49 | telegram : @fitriay19 50 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | const { 2 | Connection, 3 | PublicKey, 4 | LAMPORTS_PER_SOL, 5 | Transaction, 6 | SystemProgram, 7 | sendAndConfirmTransaction, 8 | Keypair, 9 | } = require('@solana/web3.js') 10 | const bip39 = require('bip39') 11 | const { derivePath } = require('ed25519-hd-key') 12 | require('dotenv').config() 13 | 14 | const DEVNET_URL = 'https://devnet.sonic.game/' 15 | const connection = new Connection(DEVNET_URL, 'confirmed') 16 | 17 | async function sendSol(fromKeypair, toPublicKey, amount) { 18 | const transaction = new Transaction().add( 19 | SystemProgram.transfer({ 20 | fromPubkey: fromKeypair.publicKey, 21 | toPubkey: toPublicKey, 22 | lamports: amount * LAMPORTS_PER_SOL, 23 | }) 24 | ) 25 | 26 | const signature = await sendAndConfirmTransaction(connection, transaction, [fromKeypair]) 27 | 28 | console.log('Transaction confirmed with signature:', signature) 29 | } 30 | 31 | function generateRandomAddresses(count) { 32 | const addresses = [] 33 | for (let i = 0; i < count; i++) { 34 | const keypair = Keypair.generate() 35 | addresses.push(keypair.publicKey.toString()) 36 | } 37 | return addresses 38 | } 39 | 40 | async function getKeypairFromSeed(seedPhrase) { 41 | const seed = await bip39.mnemonicToSeed(seedPhrase) 42 | const derivedSeed = derivePath("m/44'/501'/0'/0'", seed.toString('hex')).key 43 | return Keypair.fromSeed(derivedSeed.slice(0, 32)) 44 | } 45 | 46 | async function delay(ms) { 47 | return new Promise((resolve) => setTimeout(resolve, ms)) 48 | } 49 | 50 | ;(async () => { 51 | const seedPhrase = process.env.SEED_PHRASE 52 | if (!seedPhrase) { 53 | throw new Error('SEED_PHRASE is not set in the .env file') 54 | } 55 | const fromKeypair = await getKeypairFromSeed(seedPhrase) 56 | 57 | const randomAddresses = generateRandomAddresses(100) 58 | console.log('Generated 100 random addresses:', randomAddresses) 59 | 60 | const amountToSend = 0.001 61 | const delayBetweenRequests = 5000 62 | 63 | for (const address of randomAddresses) { 64 | const toPublicKey = new PublicKey(address) 65 | try { 66 | await sendSol(fromKeypair, toPublicKey, amountToSend) 67 | console.log(`Successfully sent ${amountToSend} SOL to ${address}`) 68 | } catch (error) { 69 | console.error(`Failed to send SOL to ${address}:`, error) 70 | } 71 | await delay(delayBetweenRequests) 72 | } 73 | })() 74 | --------------------------------------------------------------------------------