Tools for running airdrop and token distribution campaigns on the Solana blockchain.

Overview

samoyed logo

Overview

This repository contains some of the scripts we have used for running our airdrop campaigns and other distributions.

Initially, all of these were made purely for internal use and there were little to none UI considerations. However, as we decided to release these publicly, we have made some improvements on that front. We also created accompanying README documents that will hopefully allow you to use these in your own projects without issues.

Before using our scripts, we strongly recommend that you get to grips with the mechanics of using the tools on Solana's testnet/devnet before doing any live mainnet transactions. Any mistakes you make there are completely harmless and will serve as a learning experience.

Built with

Everything was written and tested on a Linux-based 64-bit system running Ubuntu 20.04 and Python 3.8.5. These tools should also work on other Linux distros and MacOS systems, but they will definitely not run on Windows. If you are on a Windows machine, we recommend looking into WSL and WSL2.

All tools currently available are built with python3 and no external modules or packages, but they are dependant on having local installations of Solana CLI tools available on the PATH.

Below are links on the installation steps for solana-cli and spl-token-cli tools:

If you haven't used these tools before, we would recommend following along with the documentation, as it explains some basic usage scenarios that will familiarize you with them.

Available tools

Tools Description
address-fetcher Fetching addresses of token holders and accounts
flat-distributor Distribute a fixed amount of tokens
proportional-distributor Distribute a proportional amount of tokens

The accompanying README for each tool is located in its directory. Refer to them for usage examples.

Issues

Feel free to report any issues you encounter while using these tools, or ideas you may have for improvement. We will try to help out with any problems when we can, but understand that these tools were made for private use and there might be usage scenarios that we never thought of or got around to testing.

License

Distributed under the MIT License

Links

Contact me on Discord: praskOo#0892

Comments
  • fix flat-distributor.py

    fix flat-distributor.py

    Fix options

    context

    If my understanding is correct, this options leaves flexibilities to add arguments like --fund-recipient and --allow-unfunded-recipient for spl-token command.

    issue

    Without this modification, the to_str() will fail because the self.options is always None It is not a critical bug, but maybe worth to fix it.

    Fix csv header of unconfirmed log:

    lu.write('recipient,amount,error') -> lu.write('recipient,amount,error\n')

    opened by leafwind 3
  • Flat-distributor: cancelling airdrop

    Flat-distributor: cancelling airdrop

    Hi, it seems that I'm not able to perform the airdrop with flat-distributor, I've double checked everything and the env is correct, mint address, solana address etc.

    The error I'm getting is:

    Running the airdrop in non-interactive mode. The airdrop will run without additional confirmations.
    --------------------------------------------------
    Enter Y to proceed
    > y
    Log file handlers closed.
    Cancelling the airdrop.
    

    this happens instantly and quits. Nothing in the logs

    opened by k666-bit 2
  • Merge funding-options feature

    Merge funding-options feature

    Allow users to use --fund-recipient and --allow-unfunded-recipient flags in the transfer sub-command of distributor tools. Both flags behave in the same manner as they do in the spl-token transfer command.

    • --fund-recipient - if an address doesn't own an associated token account, the sender will create one (and fund it, this costs a bit of SOL!)
    • --allow-unfunded-recipient - complete the transaction, even if the recipient has 0 SOL on their balance.

    check-before and check-after sub-commands have been adjusted to better account for this use-case.

    enhancement 
    opened by praskoson 1
  • fix proportional-distributor.py

    fix proportional-distributor.py

    FYI, all the fixes are the same as #1

    Fix options

    context

    If my understanding is correct, this options leaves flexibilities to add arguments like --fund-recipient and --allow-unfunded-recipient for spl-token command.

    issue

    Without this modification, the to_str() will fail because the self.options is always None It is not a critical bug, but maybe worth to fix it.

    Fix csv header of unconfirmed log:

    lu.write('recipient,amount,error') -> lu.write('recipient,amount,error\n')

    opened by leafwind 1
  • Improved duplicate removal code.

    Improved duplicate removal code.

    Duplication removal is now done immediately after fetching the raw address data.

    This still only affects owner type addresses. A different solution is needed to better handle multiple token addresses that belong to the same account.

    Resolves #5

    bug 
    opened by praskoson 0
  • Hotfix handle 429 timeout

    Hotfix handle 429 timeout

    Implement a --retry-on-429 option for distributors when using transfer sub-command.

    This was previously the default behaviour, but we learned that if spl-token transfer returns a HTTP Too Many Requests error (429), this is not a guarantee of a failed transaction. This is a bug in how spl-token handles those errors and according to Solana developer support, a fix is on the way.

    A transaction happening despite this error is rare, but it can happen. The safe way to treat this error is to consider the transaction as unconfirmed, until the error is fixed in spl-token. The --retry-on-429 option will use the old behaviour, where the tool retried the transaction if it encountered this error.

    bug 
    opened by praskoson 0
  • Issue when handling HTTP Too Many Requests (429) error

    Issue when handling HTTP Too Many Requests (429) error

    When a HTTP 429 error is received while transferring tokens, the distributor attempts to retry the transfer. In rare cases, the transaction is completed regardless of the error. A possible explanation is that the error happens while polling the transaction status, according to Solana developer support.

    ATM there is no clear solution other than to handle a 429 error as an unconfirmed transaction, even though this happens very rarely.

    opened by praskoson 0
  • Estimated drop

    Estimated drop

    Print the number of addresses that are being dropped to (flat-distributor and proportional-distributor) and print the estimated total tokens to be dropped (flat-distributorห™).

    enhancement 
    opened by praskoson 0
  • Address fetcher sorting issue

    Address fetcher sorting issue

    address-fetcher is supposed to sort the address - balance pairs by the current balance amount in the address-list-balance.txt file.

    When using owner type addresses, the tool sums up the balances of all pairs that have the same owner address (this happens when an owner account owns multiple token accounts, likely because of trading on some dex). Those address - balance pairs are sometimes not sorted properly.

    E.g. when fetching Samoyed owner addresses:

    3o35HGWTqvkTUX77CZN4VrFg1xAzZrTqs2oEGxRSvjNm,6472.0
    AVYXwvrJLCdqJ1dEKieTnpQHvndT2ef5wwhPTULqfFBd,10431.0
    2bn5FRNy3SD2udDxkW6oQY1ghSY3buxForh6BKsagyis,6459.0
    

    AVYX... account owns 2 SAMO token accounts.

    A simple solution would be to sort the list again after summing up the duplicate balances, but this might impact performance.

    bug 
    opened by praskoson 0
  • App doesn't exit when missing parameters

    App doesn't exit when missing parameters

    When either distribution tool (proportional-distributor or flat-distributor) is started without any parameters and without a config file, it will still prompt for the RPC API URL, token address and token decimals before exiting.

    ./flat-distributor.py
    
    Select an endpoint
    1. https://api.mainnet-beta.solana.com
    2. https://api.testnet.solana.com
    3. https://api.devnet.solana.com
    Select an option:
    > 1
    
    Enter the token mint address:
    > aaaa
    
    Enter the number of token decimals:
    > 8
    No mode selected, use -h
    
    bug 
    opened by praskoson 0
  • Can't start the address-fetcher.py

    Can't start the address-fetcher.py

    I use macOs 11.6 (Big Sur) When running the python script I got this error

    % ./address-fetcher.py 
    Traceback (most recent call last):
      File "./address-fetcher.py", line 4, in <module>
        import requests
    ModuleNotFoundError: No module named 'requests'
    

    Do I need to deploy some depencies to be able to run the script?

    opened by cdric 1
Releases(v0.2.1)
  • v0.2.1(Jun 15, 2021)

    Includes address-fetcher, flat-distributor and proportional-distributor. This is not a build, just a package with all the tools and readmes.

    Changelog

    • Bugfixes
      • address-fetcher will correctly eliminate duplicates and sort owner type addresses according to their total balance (#5)
      • Added a --retry-on-429 option (this was previously the default behaviour) to distributors when using transfer sub-command (#13)

    Check the PR #14 for more information on the --retry-on-429 option. Using it will keep the old behaviour of transfer, but in rare cases it can result in a duplicate transaction. When Solana rolls out their fix, this will not be an issue anymore.

    UPDATE Solana released spl-token version 2.0.12 which handles 429 Too Many Request errors with exponential backoff, meaning that the --retry-on-429 option is obsoleted. You can update spl-token with solana-install update and you shouldn't see those errors any more.

    Source code(tar.gz)
    Source code(zip)
    distribution-tools-v0.2.1.zip(23.89 KB)
  • v0.2.0(Jun 12, 2021)

    Includes address-fetcher, flat-distributor and proportional-distributor. This is not a build, just a package with all the tools and readmes.

    Changelog

    • Features
      • Short option (-t) for specifying address type (available in all tools, #11)
      • Show the estimated total drop amount when running distributors (#7)
      • Allow usage of --fund-recipient and --allow-unfunded-recipient options with distributors (#8)
    • Bugfixes
      • Fixed CSV headers in log files for unconfirmed transfers (thanks @leafwind, #3)
      • Exit immediately when there is no config or console params in distributors (#4)
    Source code(tar.gz)
    Source code(zip)
    distribution-tools-v0.2.0.zip(23.52 KB)
  • v0.1.0(Jun 4, 2021)

Owner
Hello there
Fully configurable automated python script to collect most visted pages based on google dork

Ranked pages collector Fully configurable automated python script to collect most visted pages based on google dork Usage This project is still under

Security Analyzer 9 Sep 10, 2022
Simple one-time pad (OTP) encryption

Introduction What you will make In this resource you will learn how to create and use an encryption technique known as the one-time pad. This method o

Rabih ND 6 Nov 06, 2022
Privfiles - Encrypted file storage using Fernet with zero Javascript

Privfiles - Encrypted file storage using Fernet with zero Javascript Source code for the onion service: l3n6v6dm63frml22tlmzacnasvp7co7wylu4hhcs34ukxe

5 Jul 30, 2022
Vaulty - Encrypt/Decrypt with ChaCha20-Poly1305

Vaulty Encrypt/Decrypt with ChaCha20-Poly1305 Vaulty is an extremely lightweight encryption/decryption tool which uses ChaCha20-Poly1305 to provide 25

Chris Mason 1 Jul 04, 2022
Salted Crypto Python library

Salted Crypto Python library. Allows to encrypt and decrypt files and directories using popular cryptographic algorithms with salty key(s).

7 Jul 18, 2022
keyring MITkeyring (๐Ÿฅ‰27 ยท โญ 630) - Store and access your passwords safely. MIT

The Python keyring library provides an easy way to access the system keyring service from python. It can be used in any application that needs safe pa

Jason R. Coombs 948 Dec 18, 2022
Distributed, blockchain based hashtables middleware for deduplication of file uploads to the cloud

distributed-blockchain-based-secure-file-dedupe Searching is Distributed, Block and Access List for each upload is unique and it is stored in a single

Abhishek Tangod 1 Dec 02, 2021
A bot written in Python to automatically buy tokens on the Binance Smart Chain as soon as liquidity is provided

A bot written in Python to automatically buy tokens on the Binance Smart Chain as soon as liquidity is provided. If youโ€™ve found this bot useful and have profited from it please consider donating any

473 Dec 25, 2022
๐Ÿ˜ˆ Shining is a tool that enables engineers to remotely pull smart contract code in multi-file situations.

๐Ÿ‘‘ Shining ๐Ÿ˜ˆ Shining is a tool that enables engineers to remotely pull smart contract code in multi-file situations. Shining is the name of one of my

xxxeyJ 15 Jun 17, 2022
How to setup a multi-client ethereum Eth1-Eth2 merge testnet

Mergenet tutorial Let's set up a local eth1-eth2 merge testnet! Preparing the setup environment In this tutorial, we use a series of scripts to genera

Diederik Loerakker 24 Jun 17, 2022
A python script for AES Angecryption in Steganography

Angecryption is an encryption or an decryption result from a file to create an other file with the same / or not type.

ISIS 3 Jul 25, 2022
A really, really bad way to encrypt your text

deoxyencryptingnucleicacids A really, really bad way to encrypt your text. A general description of the scheme Encoding: The ascii plaintext is first

Sam Pinkerton 1 Nov 01, 2021
The (Python-based) mining software required for the Game Boy mining project.

The (Python-based) mining software required for the Game Boy mining project.

Ghidra Ninja 31 Nov 04, 2022
A Python module to encrypt and decrypt data with AES-128 CFB mode.

cryptocfb A Python module to encrypt and decrypt data with AES-128 CFB mode. This module supports 8/64/128-bit CFB mode. It can encrypt and decrypt la

Quan Lin 2 Sep 23, 2022
This is a simple Bitcoin non-deterministic wallet address generator coded in Python 3.

This is a simple Bitcoin non-deterministic wallet address generator coded in Python 3. It generates a Private Key in different formats (hex, wif and compressed wif) and corresponding Public Addresses

7 Dec 22, 2022
Tron Wallet (TRX) Crack Finder With Python Just 64 Line

TRXGEN Tron Wallet Finder and Crack With Python Tron Wallet (TRX) Crack Finder With Python Just 64 Line My tools [pycharm + anaconda3 + python3.8 + vi

MMDRZA 6 Dec 18, 2022
RSI Algorithmic Trading with Python

In this repository you can see my first algorithhmic trading script. I use 5 cryptocurrencies: Bitcoin (BTC), Ethereum (ETH), Bitcoin Cash (BCH), Litecoin (LTC) and Chainlink (LINK).

Jon Aldekoa 4 Mar 16, 2022
Simple python program to encrypt files with AES-256 encryption

simple-enc Simple python program to encrypt files with AES-256 encryption Setup First install "pyAesCrypt" using pip. Thats it! Optionally you can add

Hashm 2 Jan 19, 2022
offline half-random brute force script for Ethereum private keys

eth200swinger offline half-random brute force script for Ethereum private keys, goes from the beginning to end of range and vice versa, saves any foun

2 Oct 06, 2022
A Python library to wrap age and minisign to provide key management, encryption/decryption and signing/verification functionality.

A Python library to wrap age and minisign to provide key management, encryption/decryption and signing/verification functionality.

Vinay Sajip 3 Feb 01, 2022