Solana Script Debugging for Pump.fun Trading Bot

Job ID: 39629492

Budget: $100 – $300 USD

Expert Solana Developer Needed to Fix and Optimize Pump.fun Volume Bot Script (Python, Solders, Solana-py)

**Project Overview:**
I have a Python script for a Solana volume bot that interacts with Pump.fun tokens to generate trading volume through buys and sells. The script is mostly complete but has persistent errors in transaction construction, signing, and confirmation, particularly in the `pump_fun_buy` and `pump_fun_sell` methods. It uses libraries like `solders`, `solana-py`, and `asyncio` for asynchronous RPC calls. The bot supports simulation mode, multiple wallets, presets for trade sizes/intervals, and auto-detection of token graduation (bonding curve vs. DEX).

The script works in simulation mode but fails in live mode with errors like:
- "'solders.transaction.Transaction' object has no attribute 'recent_blockhash'"
- "Transaction.__new__() missing 3 required positional arguments: 'from_keypairs', 'message', and 'recent_blockhash'"
- Confirmation check failures: "'AsyncClient' object has no attribute 'get_signature_status'"

I've tried multiple fixes (e.g., switching between `solders.transaction` and `solana.transaction`, using `Message.new_with_blockhash`, `VersionedTransaction`, `sign_partial`, etc.), but it still fails to send and confirm transactions on mainnet for Pump.fun bonding curve trades. I need an expert to debug, fix, and optimize the script for reliable live trading on Pump.fun tokens.

**Key Features Already Implemented:**
- Load multiple wallets from JSON.
- User prompts for token mint, preset selection, simulation mode, and platform (auto/pump).
- Auto-detect if token is on Pump.fun bonding curve or graduated (using RPC account info).
- Simulation mode with mock balances and delays.
- Random trade sizes, intervals, buy/sell ratios.
- Jupiter API for graduated tokens (works).
- Logging, progress tracking, and final stats.
- Presets like 'tiny' (0.001-0.005 SOL trades for 1 SOL volume).

**Issues to Fix:**
- Transaction building and signing in `pump_fun_buy` and `pump_fun_sell` (using `solders` preferred).
- Confirmation polling in `confirm_transaction` (update to use `get_signature_statuses` correctly).
- Ensure ATA creation works if needed.
- Handle small trade amounts (0.001-0.005 SOL) without failures due to fees or blockhash issues.
- Optimize for mainnet congestion (increase max_retries to 3, add more robust error handling).
- Pylance/IDE warning: "import solana.transaction could not be resolved" (cosmetic, but fix if possible).

**Additional Requirements:**
- Add optional manual override for platform (already there, but ensure it forces Pump.fun correctly).
- Improve fee estimation (currently hardcoded 0.005 SOL; make it dynamic if possible).
- Ensure the script only uses funded wallets and stops gracefully if balances are low.
- Test on a Pump.fun token (e.g., UZaQro67N7RQ4vaSf6LbXw9LBBtuDhbHiM8Fo7cpump) in simulation and live (provide test logs/video).
- Clean code, add comments, and ensure compatibility with Python 3.10+.

**Deliverables:**
- Fixed script with all errors resolved.
- Detailed explanation of changes (no full code dumps unless requested).
- Test run logs (simulation and live with small amounts).
- Updated README or comments in code for setup (e.g., RPC keys, wallet funding).
- Optional: Integrate parts from PumpDotFun SDK (e.g., buy/sell methods) if it simplifies the code.

**Required Skills:**
- Expert in Solana development (RPC, transactions, program interactions).
- Proficiency with `solders`, `solana-py`, and async Python.
- Experience with Pump.fun program (bonding curves, buy/sell instructions).
- Familiar with Jupiter API for DEX trades.
- Debugging blockchain scripts on mainnet.


Please provide your Solana experience, past projects (e.g., bots, dApps), and how you'd approach the transaction signing fix. No bids from beginners. Thanks!