Git Product home page Git Product logo

transfer-hook-airdrop's Introduction

Transfer-Hook Airdrop Tool

This tool is designed to automate the process of airdropping tokens with the transfer-hook extension.

Features

  • Airdrop tokens to multiple recipients.
  • Read recipient addresses from a CSV file.
  • Utilize command-line arguments for dynamic operation.

Requirements

  • Rust programming language
  • Cargo (Rust's package manager)
  • Access to a Solana RPC endpoint
  • A Solana keypair file for transaction signing

Installation

Clone the repository and build the project:

git clone https://github.com/tonton-sol/transfer-hook-airdrop
cd transfer-hook-airdrop
cargo install --path .

Configuration

Before using the tool, you must have a Solana keypair file and access to an RPC endpoint. The keypair file can be specified on the command line or in a configuration file.

Usage

Run the tool with the following command:

thook [OPTIONS] COMMAND

Options

  • --rpc NETWORK_URL: Specify the network address of your Solana RPC provider.
  • --config PATH: Path to custom Solana configuration file.
  • --keypair KEYPAIR_FILEPATH: Filepath to the keypair used for signing transactions.
  • --priority_fee MICROLAMPORTS: Set the priority fee per transaction in microlamports. (Not implemented yet!)

Commands

Airdrop

Airdrop tokens to the addresses listed in a specified CSV file.

thook airdrop --token_address <TOKEN_ADDRESS> --recipients_csv_path <RECIPIENTS_CSV_PATH> --amount <AMOUNT>
  • TOKEN_ADDRESS: The address of the token to airdrop.
  • RECIPIENTS_CSV_PATH: Path to the CSV file containing the addresses of the airdrop recipients.
  • AMOUNT: The amount of the token to airdrop per address.

Example

thook --rpc https://api.mainnet-beta.solana.com --keypair /path/to/keypair.json airdrop --token_address So11111111111111111111111111111111111111112 --recipients_csv_path /path/to/recipients.csv --amount 100

This command will airdrop 100 units of the specified token to each address listed in the CSV file, using the specified keypair for transaction signing and the mainnet beta network for transaction processing.

Notes

  • The transfer-hook ExtraAccountMetas account derived from the transfer hook program and mint must be configured correctly. It must contain all of the extra accounts used in the transfer-hook program.

transfer-hook-airdrop's People

Contributors

tonton-sol avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.