sol_sweep

Crates.iosol_sweep
lib.rssol_sweep
version0.1.2
sourcesrc
created_at2024-10-26 18:10:01.837143
updated_at2024-10-26 19:07:01.227169
descriptionA lightweight CLI indexer for the Solana blockchain.
homepagehttps://github.com/SOLindexer
repositoryhttps://github.com/SOLindexer
max_upload_size
id1424031
size131,421
Sangeet (andropixels)

documentation

README

SolSweep

SolSweep is a lightweight command-line interface (CLI) tool designed for efficient indexing and retrieving data from the Solana blockchain. This tool helps developers easily access program accounts and other relevant data, making it an essential utility for Solana-based applications.

SolSweep Logo

Features

  • Lightweight and Fast: Designed to be resource-efficient and quick, ensuring minimal overhead.
  • Easy Data Access: Fetch program accounts and other relevant data with simple commands.
  • Supports Custom Program IDs: Easily specify the program ID to index specific accounts.

Installation

To install SolSweep, you need to have Rust and Cargo installed on your machine. If you haven't installed them yet, follow the instructions here.

Once Rust and Cargo are installed, run the following command:

cargo install solsweep

Usage

sol_sweep --rpc-url <RPC_URL> --program-id <PROGRAM_ID>

Example

solana_sweep --rpc-url https://api.mainnet-beta.solana.com --program-id 4Nd1m1eeEwGC1QFi7dZerzyi3LAa1JxpCFdDnJEL6ZjD

outpu Options

sol_sweep --rpc-url <RPC_URL> --program-id <PROGRAM_ID>

sol_sweep --rpc-url <RPC_URL> --program-id <PROGRAM_ID> --output .json

Parameters

  • --rpc-url The URL of the Solana RPC endpoint

  • --program-id Program ID to fetch accounts from

  • --output (Optional) Filename to save JSON output

Example Output

[
  {
    "account_pubkey": "2Utt8kPL2eSfezk4CZmHwh7DiEz1FyH8bWfp6A3xstC7",
    "account_data": {
      "lamports": 2039280,
      "owner": "4Nd1m1eeEwGC1QFi7dZerzyi3LAa1JxpCFdDnJEL6ZjD",
      "executable": false,
      "rent_epoch": 192
    }
  }
]

How it works

The SolSweep CLI connects to the specified Solana RPC endpoint and retrieves all accounts associated with a given Program ID. It formats the data and displays it in the console or saves it as a JSON file.

Development

Licence

  • This project is licensed under the MIT License.

Commit count: 0

cargo fmt