Skip to content

vanmuse/Union-Auto-Bot

ย 
ย 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

16 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

IMG_20250709_232943_431

๐Ÿš€ Union V3.5 Comple 150 Stars And I will Drop Asap ๐ŸŒŒ

Union Auto Bot is a cutting-edge Node.js automation tool crafted for seamless cross-chain token transfers on testnet networks like SEI, XION, Babylon, Corn, Sepolia, and Holesky. With a sleek command-line interface (CLI) and robust functionality, it empowers users to execute token swaps effortlessly using the Union protocol. Whether you're a developer testing interoperability or a blockchain enthusiast exploring testnets, this bot is your ultimate companion! ๐Ÿ› ๏ธ

โš ๏ธ Important: This tool is for testnet use only. Ensure you have testnet tokens for gas and transfers. Use responsibly!


โœจ Key Features

  • Cross-Chain Magic ๐ŸŒ: Transfer tokens between SEI, XION, Babylon, and destinations like Corn, Sepolia, and Holesky.
  • Interactive CLI ๐Ÿ–ฅ๏ธ: Navigate a vibrant menu with arrow keys and Enter to select options.
  • Flexible Token Support ๐Ÿ’ฐ: Swap native tokens (SEI, XION, BBN) or stablecoins (USDC).
  • Customizable Transfers โš™๏ธ: Set transfer amounts, transaction counts, and delays with ease.
  • Real-Time Feedback ๐Ÿ“Š: Enjoy a loading spinner, color-coded outputs, and transaction summaries.
  • Error Resilience ๐Ÿ›ก๏ธ: Handles wallet misconfigurations, insufficient balances, and network hiccups gracefully.
  • Transaction Insights ๐Ÿ”: View transaction hashes, packet hashes, and block explorer links for transparency.
  • Wallet Integration ๐Ÿ”: Supports EVM (SEI) and Cosmos (XION, Babylon) wallets for secure operations.

๐ŸŒ Supported Networks & Destinations

Network Chain ID RPC Endpoint Denom Gas Price
SEI Testnet 1328 https://evm-rpc-testnet.sei-apis.com SEI Dynamic
XION Testnet xion-testnet-2 https://rpc.xion-testnet-2.burnt.com/ uxion 0.025uxion
Babylon Testnet bbn-test-3 https://babylon-testnet-rpc.nodes.guru ubbn 0.0025ubbn

๐ŸŽฏ Transfer Destinations

  • Corn ๐Ÿฟ: Channel ID 3, Token Address: e53dcec07d16d88e386ae0710e86d9a400f83c31
  • Sepolia ๐Ÿงช: Channel ID 1, Token Address: bd030914ab8d7ab1bd626f09e47c7cc2881550a3
  • Holesky ๐Ÿ•ณ๏ธ: Channel ID 2, Token Address: 77b99a27a5fed3bc8fb3e2f1063181f82ec48637

๐Ÿ› ๏ธ Prerequisites

Before diving in, ensure you have:

  • Node.js (v16+): Download here ๐Ÿ“ฆ
  • npm: Comes with Node.js
  • Testnet Wallets: Private keys for SEI, XION, and Babylon with testnet funds
  • Testnet Tokens: Grab tokens from testnet faucets for gas and transfers ๐Ÿ’ง
  • Git: For cloning the repository Install Git

๐Ÿ“ฅ Installation

  1. Clone the Repository ๐Ÿ™:

    git clone https://github.com/Kazuha787/Union-Auto-Bot.git
    cd Union-Auto-Bot
  2. Install Dependencies ๐Ÿ“š:

    npm install

    Key dependencies include:

    • ethers: Ethereum-compatible transactions
    • @cosmjs/proto-signing, @cosmjs/stargate: Cosmos SDK support
    • axios: GraphQL queries for packet hashes
    • viem: Hex conversions
    • crypto: Random salt generation
    • readline: CLI input handling
  3. Configure Wallets ๐Ÿ”‘:

    • Create a wallet.json file in the project root:
      {
        "wallets": [
          {
            "sei_privatekey": "0xYourSeiPrivateKey",
            "xion_privatekey": "0xYourXionPrivateKey",
            "babylon_privatekey": "0xYourBabylonPrivateKey",
            "babylon_address": "bbnYourBabylonAddress"
          }
        ]
      }
    • Pro Tip: Use testnet private keys only and ensure sufficient funds.
  4. Union Instruction Builder ๐Ÿงฉ:

    • The bot requires union-instruction-builder.js for token configs and messages. If missing, a placeholder is used. For custom logic, add union-instruction-builder.js with:
      • getTokenConfig(type): Returns token details (e.g., USDC, XION)
      • createSendMessage(params): Builds Cosmos transfer messages

๐Ÿš€ Usage

  1. Launch the Bot:

    node main.js
  2. Navigate the Menu ๐ŸŽฎ:

    • Use Up โฌ†๏ธ and Down โฌ‡๏ธ arrow keys to highlight options.
    • Press Enter โŽ to select.
    • Menu options:
      • ๐ŸŒ‰ SEI to XION SWAP
      • ๐ŸŒฝ SEI to CORN SWAP
      • ๐Ÿ›๏ธ XION to Babylon SWAP
      • ๐ŸŒ Babylon to Others SWAPS
      • ๐Ÿšช Exit
  3. Configure Transfers ๐Ÿ› ๏ธ:

    • SEI to XION/CORN:
      • Amount: Enter SEI amount (default: 0.0001 SEI)
      • Count: Number of transfers (default: 1)
    • XION to Babylon:
      • Token: Choose USDC or XION
      • Amount: Token amount (e.g., 0.01)
      • Count: Number of transfers (default: 1)
    • Babylon to Others:
      • Destination: Select Corn, Sepolia, or Holesky
      • Amount: BBN amount (e.g., 0.001)
      • Count: Number of transfers (default: 1)
      • Delay: Seconds between transactions (default: 0)
  4. Track Progress ๐Ÿ“ก:

    • Watch the CLI for:
      • Transaction hashes with block explorer links (e.g., seitrace.com)
      • Packet hashes (polled via GraphQL)
      • Color-coded status: ๐ŸŸข Success, ๐Ÿ”ด Failure
    • A detailed summary shows successful/failed transfers and hashes.
  5. Exit Gracefully:

    • Select Exit or press Ctrl+C to stop the bot. ๐Ÿ›‘

โš™๏ธ Advanced Configuration

Network Settings

Modify network configurations in the script if needed:

  • XION Testnet:
    const XION_TESTNET = {
      chainId: "xion-testnet-2",
      rpcEndpoint: "https://rpc.xion-testnet-2.burnt.com/",
      prefix: "xion",
      denom: "uxion",
      gasPrice: GasPrice.fromString("0.025uxion")
    };
  • Babylon Testnet:
    const BABYLON_TESTNET = {
      chainId: "bbn-test-3",
      rpcEndpoint: "https://babylon-testnet-rpc.nodes.guru",
      prefix: "bbn",
      denom: "ubbn",
      gasPrice: GasPrice.fromString("0.0025ubbn")
    };
  • SEI Testnet:
    const provider = new ethers.JsonRpcProvider("https://evm-rpc-testnet.sei-apis.com");

Customizing Destinations

Update DESTINATIONS to add or modify transfer destinations:

const DESTINATIONS = {
  corn: { name: "Corn", channelId: 3, tokenAddress: "e53dcec07d16d88e386ae0710e86d9a400f83c31" },
  sepolia: { name: "Sepolia", channelId: 1, tokenAddress: "bd030914ab8d7ab1bd626f09e47c7cc2881550a3" },
  holesky: { name: "Holesky", channelId: 2, tokenAddress: "77b99a27a5fed3bc8fb3e2f1063181f82ec48637" }
};

Gas and Fees

  • SEI: Dynamic gas pricing using provider.getFeeData().
  • XION: Fixed gas of 696861 and 697 uxion per transfer.
  • Babylon: Fixed gas of 500000 and 1000 ubbn per transfer.

๐Ÿ›ก๏ธ Error Handling

The bot is built to handle errors gracefully:

  • Wallet Errors ๐Ÿšซ: Validates private keys and addresses in wallet.json.
  • Balance Checks ๐Ÿ’ธ: Ensures sufficient tokens and gas before transfers.
  • Network Failures ๐ŸŒ: Retries packet hash queries (50 attempts, 5s delay).
  • User Input โŒจ๏ธ: Validates amounts, counts, and delays with clear error messages.
  • Transaction Failures ๐Ÿ”ด: Logs detailed errors and continues with remaining transfers.

Errors are displayed in red with prompts to continue, ensuring a smooth experience.


๐Ÿง‘โ€๐Ÿ’ป Contributing

We love contributions! Here's how to get started:

  1. Fork the Repo ๐Ÿด: https://github.com/Kazuha787/Union-Auto-Bot
  2. Create a Branch ๐ŸŒฟ:
    git checkout -b feature/your-awesome-feature
  3. Make Changes โœ๏ธ: Add features, fix bugs, or improve docs.
  4. Commit ๐Ÿ“:
    git commit -m "Add your awesome feature"
  5. Push ๐Ÿš€:
    git push origin feature/your-awesome-feature
  6. Submit a Pull Request ๐Ÿ“ฌ: Include a clear description of your changes.

Contribution Ideas:

  • Add support for new testnet networks ๐ŸŒ
  • Enhance the CLI with progress bars or ASCII art ๐ŸŽจ
  • Implement batch transaction optimization โšก
  • Improve error logging with file outputs ๐Ÿ“„

๐ŸŒŸ Community & Support

Join our vibrant community for help and updates:


๐Ÿ“œ License

This project is licensed under the MIT License. See the LICENSE file for details. ๐Ÿ“„


โš ๏ธ Disclaimer

Union Auto Bot is for testnet environments only. Using it on mainnet may lead to loss of funds. The author is not liable for any misuse or unintended consequences. Always verify wallet configurations and test thoroughly. ๐Ÿ›‘


๐Ÿ™Œ Acknowledgments

  • Union Protocol: For enabling cross-chain interoperability
  • Cosmos SDK & Ethers.js: For robust blockchain interactions
  • Community: For feedback and support on Telegram

Built with ๐Ÿ’– by Kazuha
๐Ÿ“ GitHub | ๐Ÿ“ฉ Telegram

Let's conquer the testnet together! ๐Ÿš€


Enhancements in This README

  1. Visual Appeal:

    • Added emojis (๐Ÿš€, ๐ŸŒŒ, ๐Ÿ› ๏ธ, etc.) for engagement.
    • Used modern Markdown formatting with tables, badges, and callouts.
    • Color-coded CLI feedback mirrored in documentation (๐ŸŸข, ๐Ÿ”ด).
  2. Advanced Sections:

    • Added Supported Networks & Destinations with a table.
    • Included Advanced Configuration for developers.
    • Expanded Contributing with specific ideas.
    • Added Acknowledgments for a professional touch.
  3. User-Friendly:

    • Clear installation steps with code blocks and links.
    • Detailed usage instructions with menu navigation.
    • Comprehensive error handling section.
  4. Professional Tone:

    • Maintained a balance between technical accuracy and accessibility.
    • Included a disclaimer for legal clarity.
    • Linked to community resources for support.

To use this README, create a README.md file in your repository and paste the content above. If you need a LICENSE file or further customization (e.g., badges for build status, npm version), let me know! ๐Ÿ˜Š

About

๐Ÿš€ Automate Sepolia-Holesky And Other Tokens bridge transactions with Union Testnet Auto Bot! ๐Ÿค– Real-time dashboard ๐Ÿ“Š, multi-wallet support ๐Ÿ”‘, USDC approvals ๐Ÿ’ฐ, and performance charts ๐Ÿ“ˆ. Secure, customizable, and user-friendly! ๐ŸŒ‰ #Testnet #Blockchain

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Julia 97.0%
  • JavaScript 3.0%