npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

solana-bulk-transfer

v3.0.3

Published

A simple npm package for bulk transferring tokens on the Solana blockchain.

Downloads

21

Readme

Solana Batch Transfer Script Updates

Update Overview

This document provides a summary of two optimization updates made to the Solana batch transfer script.

Update

  • Error Handling: Added more detailed error handling to provide more information when transactions fail.

  • Logging: Implemented logging functionality to track the transaction process and outcomes.

  • Configuration File: Introduced a configuration file to manage private keys and transfer targets, enhancing security and flexibility.

  • Transaction Confirmation: Added checks for transaction confirmation status to ensure successful submission to the blockchain.

  • Configuration Validation: Ensured all necessary information in the configuration file is complete and valid.

  • Enhanced Security: Avoided direct use of private keys in the code, instead introducing them through environment variables or external secure storage.

  • Transaction Building Optimization: Implemented logic to create multiple transactions in batches for a large number of transfers to avoid transactions being too large.

  • Transaction Status Monitoring: Added monitoring of transaction status after sending until final confirmation.

Update

Balance Check Before Transactions

  • Implemented a balance check to ensure the sender's account has sufficient funds to cover the total transfer amounts and transaction fees.

Real-Time Transaction Feedback

  • Added real-time feedback on the status of transactions, providing updates until each transaction is confirmed or fails.

Retry Mechanism

  • Introduced an automatic retry mechanism for transactions that fail due to network issues or other non-permanent errors.

Memory Usage Optimization

  • Optimized memory usage for handling large numbers of transfers, particularly during transaction construction.

Dynamic Configuration File Loading

  • Allowed users to specify the configuration file path via command-line arguments, rather than hardcoding it within the script.

Concurrent Batch Processing

  • Utilized Promise.all to process multiple transfers in parallel, improving efficiency.

Summary Report

  • Provided a summary report after all transfers are completed, detailing the number of successful and failed transfers.

Security Enhancements

  • Encouraged the use of environment variables for sensitive information such as private keys, avoiding direct storage in the codebase.

Usage

To use the updated script:

  1. Install the necessary dependencies.
  2. Set up the .env file with the PRIVATE_KEY variable.
  3. Adjust the config.json file with the desired transfer targets.
  4. Run the script with the optional command-line argument for the config file path.

Security Tips

  • Do not store private keys directly in the code repository.
  • Use environment variables or a secure key management system to handle private keys.
  • Ensure the .env file is not committed to the version control system.

How to Use

  1. Install necessary dependencies, such as @solana/web3.js and dotenv.
  2. Create a .env file and set the PRIVATE_KEY environment variable.
  3. Adjust the transfer targets in the config.json file as needed.
  4. Run the script to perform batch transfers.

Support

Thank you for using our Solana batch transfer script!