Skip to content

This repository contains a script for automating transactions on the Sonic testnet on Solana. The bot generates random addresses and sends SOL from configured accounts to these addresses.

Notifications You must be signed in to change notification settings

jawikas/sonictestnet-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

image

Sonic Testnet Automated (Transactions) Bot

This repository contains a script for automating transactions on the Sonic testnet on Solana. The bot generates random addresses and sends SOL from configured accounts to these addresses.

Website : https://odyssey.sonic.game/?join=WSdeGi

Buy me Coffee ☕

0x705C71fc031B378586695c8f888231e9d24381b4

Features

  • Multi accounts executions
  • Run the selected account only
  • Generate random addresses
  • Send SOL transactions to generated addresses
  • Configurable delay and transaction amounts
  • Track successful and failed transactions

Prerequisites

  • Node.js (v12 or higher)
  • npm (v6 or higher)

Installation

  1. Clone the repository:

    git clone https://github.com/jawikas/sonictestnet-bot.git
    cd sonictestnet-bot

Install the required npm modules:

npm install

Create a .env file in the root directory and add your seed phrases :

SEED_PHRASES='[
{"name": "nameAccount1", "phrase": "phraseAccount1"},
{"name": "nameAccount2", "phrase": "phraseAccount2"}
]'

Create a config.json file in the root directory and add your configuration:

{
"minAmount": 0.00105,
"maxAmount": 0.00135,
"minDelay": 7000,
"maxDelay": 13000,
"delayEachAccount": 1500
}
  • minAmount : minimum amount to send in sol

  • maxAmount : maximum amount to send in sol

  • minDelay : minimum delay for each transactions

  • maxDelay : maximum delay for each transactions

  • delayEachAccount : delay for each account to execute transactions

    Note : make sure not to lower the 'minAmount' to an amount lower than '0.001'

Usage

Run the script:

node index.js
Follow the prompts to execute transactions:

Choose whether to execute transactions for all accounts or select specific accounts Enter the number of transactions to execute for each account

Functions

sendSol(fromKeypair, toPublicKey, amount, transactionIndex, accountName)
- Sends SOL from fromKeypair to toPublicKey
- Logs the transaction status

generateRandomAddresses(count)
- Generates random Solana public addresses

getKeypairFromSeed(seedPhrase)
- Derives a keypair from a seed phrase

getKeypairFromPrivateKey(privateKey)
- Gets a keypair from a private key

parseEnvArray(envVar, defaultValue)
- Parses environment variables as JSON arrays

getSolanaBalance(fromKeypair)
- Retrieves the SOL balance of a keypair

delay(ms)
- Delays execution for a specified number of milliseconds

listAccounts()
- Lists available accounts

main()
- Main function to execute the script

executeTransactions(selectedAccount, numTransactions, config)
- Executes transactions for a selected account

Modules to Install

The script requires the following npm modules:

  • @solana/web3.js
  • bip39
  • ed25519-hd-key
  • bs58
  • prompt
  • dotenv

Install these modules using:

npm install @solana/web3.js bip39 ed25519-hd-key bs58 prompt dotenv

License

This project is licensed under the NONE License.

Contact

If you have any questions or suggestions, please feel free to contact at [ https://t.me/itsjaw_real ].