Pharos Network Automation ๐Ÿš€

Hey, Cat Lovers! ๐Ÿฏ This Python script helps you create wallets, claim faucet tokens, and send tokens on the Pharos Testnet. Itโ€™s got a smooth CLI with rounded tables, proxy support, and a simple menu. Whether youโ€™re testing or just messing around, this toolโ€™s here to help! ๐Ÿ˜Ž


Whatโ€™s This For? ๐Ÿค”

This script does three main things:

  • Claim Faucet ๐Ÿ’ง: Makes wallets, logs in, and grabs testnet tokens with invite codes.

  • Send Tokens ๐Ÿ’ธ: Sends tokens from your wallets to someone else.

  • Exit ๐Ÿšช: Closes the app when youโ€™re done.

Itโ€™s built with Python, uses rich for pretty tables, aiohttp for async API calls, and web3 for blockchain stuff. Proxy support is included if you need it! ๐Ÿ•ต๏ธโ€โ™‚๏ธ


Project Structure ๐Ÿ“‚

pharos_automation/
โ”œโ”€โ”€ config/
โ”‚   โ””โ”€โ”€ settings.py        # API, RPC, proxy config
โ”œโ”€โ”€ models/
โ”‚   โ””โ”€โ”€ wallet.py          # Wallet dataclass
โ”œโ”€โ”€ utils/
โ”‚   โ””โ”€โ”€ ui.py              # Rounded table UI
โ”œโ”€โ”€ helpers/
โ”‚   โ”œโ”€โ”€ api.py             # Login & faucet API calls
โ”‚   โ””โ”€โ”€ wallet.py          # Wallet creation & token sending
โ”œโ”€โ”€ main.py                # Main script (menu)
โ”œโ”€โ”€ requirements.txt       # Dependencies
โ”œโ”€โ”€ wallets.json           # Wallet data
โ”œโ”€โ”€ .gitignore             # Ignore stuff
โ”œโ”€โ”€ README.md              # This file!

What You Need ๐Ÿ› ๏ธ

  • Python 3.8+ (python --version)

  • Proxy (optional, for API calls)

  • Git (to clone the repo)

  • Pharos Testnet invite code


Setup โš™๏ธ

  1. Clone the Repo

  2. Make a Virtual Environment

  3. Install Stuff

    (Installs web3, rich, aiohttp, eth-account, python-dotenv, tenacity.)

  4. Set Up .env Make a .env file in the project folder:

    Change PROXY_URL, RECIPIENT_ADDRESS, and INVITE_CODES to your own values.

  5. Run It


How To Use ๐ŸŽฎ

When you run python main.py, youโ€™ll see a menu like this:

Claim Faucet ๐Ÿ’ง

  • Enter how many wallets per invite code (default: 10)

  • Enter how many threads (default: 4)

  • The script makes wallets, logs in, and claims faucet tokens

  • Youโ€™ll see rounded tables with wallet addresses and status (Success/Failed)

  • Successful wallets get saved to wallets.json

  • You get a summary table at the end

Send Tokens ๐Ÿ’ธ

  • Enter how many threads (default: 4)

  • Loads wallets from wallets.json, checks balances, and sends FAUCET_AMOUNT to RECIPIENT_ADDRESS

  • Shows tables with address, balance, tx hash, and status

  • Ends with a summary table

Exit ๐Ÿšช

  • Just closes the script


Example Output ๐Ÿ–ฅ๏ธ

Hereโ€™s what the tables look like:

And the summary:


Troubleshooting ๐Ÿ›

Proxy not working?

  • Check your PROXY_URL in .env

  • Test: curl --proxy http://your-proxy:port https://api.pharosnetwork.xyz/user/login

  • Try without a proxy: leave PROXY_URL empty

Invite code invalid?

  • Make sure INVITE_CODES is right in .env

  • Test the API with curl

Tables not rounded?

  • Make sure you have rich==14.0.0

  • Check utils/ui.py uses box=box.ROUNDED

Dependency issues?

  • Check versions: pip show web3 rich aiohttp eth-account python-dotenv tenacity

  • Reinstall: pip install -r requirements.txt

Still stuck?

  • Share your .env (hide sensitive stuff)

  • Share console output or screenshots

  • Run python --version and pip --version


Contributing ๐Ÿค

Got ideas? Fork the repo, make changes, and send a pull request! Add new features, UI tweaks, or whatever you think is cool. Letโ€™s make it awesome! ๐ŸŒŸ


License ๐Ÿ“œ

MIT License. Use it, share it, enjoy it! ๐Ÿ’–


Thanks ๐Ÿ™Œ

Happy automating, Cat Lovers! ๐Ÿฏ๐Ÿš€

Last updated

Was this helpful?