├── accounts.txt ├── proxy.txt ├── requirements.txt ├── README.md └── bot.py /accounts.txt: -------------------------------------------------------------------------------- 1 | your_private_key_1 2 | your_private_key_2 -------------------------------------------------------------------------------- /proxy.txt: -------------------------------------------------------------------------------- 1 | ip:port # Default Protcol HTTP. 2 | protocol://ip:port 3 | protocol://user:pass@ip:port -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | web3 2 | eth-account 3 | eth-utils 4 | eth-abi 5 | aiohttp 6 | colorama 7 | pytz -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # T1 Protocol BOT 2 | T1 Protocol BOT 3 | 4 | - Link Dex : [T1 Protocol](https://testnet.t1protocol.com/bridge/) 5 | - Connect New EVM Wallet 6 | 7 | ## Features 8 | 9 | - Auto Get Account Information 10 | - Auto Run With [Proxyscrape Free Proxy](https://proxyscrape.com/free-proxy-list) - `Choose 1` 11 | - Auto Run With Private Proxy - `Choose 2` 12 | - Auto Run Without Proxy - `Choose 3` 13 | - Auto Perfrom Bridge Tx 14 | - Multi Accounts 15 | 16 | ## Requiremnets 17 | 18 | - Make sure you have Python3.9 or higher installed and pip. 19 | - ARB Sepolia Faucet 20 | - Base Sepolia Faucet 21 | 22 | ## Instalation 23 | 24 | 1. **Clone The Repositories:** 25 | ```bash 26 | git clone https://github.com/vonssy/T1-BOT.git 27 | ``` 28 | ```bash 29 | cd T1-BOT 30 | ``` 31 | 32 | 2. **Install Requirements:** 33 | ```bash 34 | pip install -r requirements.txt #or pip3 install -r requirements.txt 35 | ``` 36 | 37 | ### Note: Check your web3, eth-utils, eth-abi and eth-account libraries version first. If not same with version in requirements.txt, u must uninstall that library. 38 | - **Check Library Version** 39 | ```bash 40 | pip show libary_name 41 | ``` 42 | - **Uninstall Library** 43 | ```bash 44 | pip uninstall libary_name 45 | ``` 46 | - **Install Library With Version** 47 | ```bash 48 | pip install libary_name==version 49 | ``` 50 | 51 | ## Configuration 52 | 53 | - **accounts.txt:** You will find the file `accounts.txt` inside the project directory. Make sure `accounts.txt` contains data that matches the format expected by the script. Here are examples of file formats: 54 | ```bash 55 | your_private_key_1 56 | your_private_key_2 57 | ``` 58 | 59 | - **proxy.txt:** You will find the file `proxy.txt` inside the project directory. Make sure `proxy.txt` contains data that matches the format expected by the script. Here are examples of file formats: 60 | ```bash 61 | ip:port # Default Protcol HTTP. 62 | protocol://ip:port 63 | protocol://user:pass@ip:port 64 | ``` 65 | 66 | ## Run 67 | 68 | ```bash 69 | python bot.py #or python3 bot.py 70 | ``` 71 | 72 | ## Buy Me a Coffee 73 | 74 | - **EVM:** 0xe3c9ef9a39e9eb0582e5b147026cae524338521a 75 | - **TON:** UQBEFv58DC4FUrGqinBB5PAQS7TzXSm5c1Fn6nkiet8kmehB 76 | - **SOL:** E1xkaJYmAFEj28NPHKhjbf7GcvfdjKdvXju8d8AeSunf 77 | - **SUI:** 0xa03726ecbbe00b31df6a61d7a59d02a7eedc39fe269532ceab97852a04cf3347 78 | 79 | Thank you for visiting this repository, don't forget to contribute in the form of follows and stars. 80 | If you have questions, find an issue, or have suggestions for improvement, feel free to contact me or open an *issue* in this GitHub repository. 81 | 82 | **vonssy** -------------------------------------------------------------------------------- /bot.py: -------------------------------------------------------------------------------- 1 | from web3 import Web3 2 | from eth_utils import keccak, to_hex 3 | from eth_abi.abi import encode 4 | from eth_account import Account 5 | from aiohttp import ClientSession, ClientTimeout 6 | from datetime import datetime 7 | from colorama import * 8 | import asyncio, json, random, time, os, pytz 9 | 10 | wib = pytz.timezone('Asia/Jakarta') 11 | 12 | class TOne: 13 | def __init__(self) -> None: 14 | self.ARB_SEPOLIA = { 15 | "Ticker": "ARB Sepolia", 16 | "ChainId": 421614, 17 | "RPC": "https://orbital-red-yard.arbitrum-sepolia.quiknode.pro/c41a8b649724b6ca9ee30e159fd273dde85e31b5", 18 | "Explorer": "https://sepolia.arbiscan.io/tx", 19 | "Router Address": "0x4727D2EC7b602628980BE1E1a4e99d39A45786A4" 20 | } 21 | self.BASE_SEPOLIA = { 22 | "Ticker": "Base Sepolia", 23 | "ChainId": 84532, 24 | "RPC": "https://smart-fabled-tab.base-sepolia.quiknode.pro/d88230d32fbb535dcd278e6c42da494ee1e464c7", 25 | "Explorer": "https://sepolia.basescan.org/tx", 26 | "Router Address": "0xf96B8CcB029E0932fe36da0CeDd2b035E2c1695d" 27 | } 28 | self.ERC20_CONTRACT_ABI = json.loads('''[ 29 | {"type":"function","name":"balanceOf","stateMutability":"view","inputs":[{"name":"address","type":"address"}],"outputs":[{"name":"","type":"uint256"}]} 30 | ]''') 31 | self.BRIDGE_CONTRACT_ABI = [ 32 | { 33 | "inputs": [ 34 | { 35 | "components": [ 36 | { "internalType": "uint32", "name": "fillDeadline", "type": "uint32" }, 37 | { "internalType": "bytes32", "name": "orderDataType", "type": "bytes32" }, 38 | { "internalType": "bytes", "name": "orderData", "type": "bytes" } 39 | ], 40 | "internalType": "struct Order", 41 | "name": "_order", 42 | "type": "tuple" 43 | } 44 | ], 45 | "name": "open", 46 | "outputs": [], 47 | "stateMutability": "payable", 48 | "type": "function" 49 | } 50 | ] 51 | self.proxies = [] 52 | self.proxy_index = 0 53 | self.account_proxies = {} 54 | self.bridge_count = 0 55 | self.arb_amount = 0 56 | self.base_SEPOLIA_amount = 0 57 | self.min_delay = 0 58 | self.max_delay = 0 59 | 60 | def clear_terminal(self): 61 | os.system('cls' if os.name == 'nt' else 'clear') 62 | 63 | def log(self, message): 64 | print( 65 | f"{Fore.CYAN + Style.BRIGHT}[ {datetime.now().astimezone(wib).strftime('%x %X %Z')} ]{Style.RESET_ALL}" 66 | f"{Fore.WHITE + Style.BRIGHT} | {Style.RESET_ALL}{message}", 67 | flush=True 68 | ) 69 | 70 | def welcome(self): 71 | print( 72 | f""" 73 | {Fore.GREEN + Style.BRIGHT}T1 Protocol{Fore.BLUE + Style.BRIGHT} Auto BOT 74 | """ 75 | f""" 76 | {Fore.GREEN + Style.BRIGHT}Rey? {Fore.YELLOW + Style.BRIGHT} 77 | """ 78 | ) 79 | 80 | def format_seconds(self, seconds): 81 | hours, remainder = divmod(seconds, 3600) 82 | minutes, seconds = divmod(remainder, 60) 83 | return f"{int(hours):02}:{int(minutes):02}:{int(seconds):02}" 84 | 85 | async def load_proxies(self, use_proxy_choice: int): 86 | filename = "proxy.txt" 87 | try: 88 | if use_proxy_choice == 1: 89 | async with ClientSession(timeout=ClientTimeout(total=30)) as session: 90 | async with session.get("https://raw.githubusercontent.com/vmheaven/VMHeaven-Free-Proxy-Updated/main/http.txt") as response: 91 | response.raise_for_status() 92 | content = await response.text() 93 | with open(filename, 'w') as f: 94 | f.write(content) 95 | self.proxies = [line.strip() for line in content.splitlines() if line.strip()] 96 | else: 97 | if not os.path.exists(filename): 98 | self.log(f"{Fore.RED + Style.BRIGHT}File {filename} Not Found.{Style.RESET_ALL}") 99 | return 100 | with open(filename, 'r') as f: 101 | self.proxies = [line.strip() for line in f.read().splitlines() if line.strip()] 102 | 103 | if not self.proxies: 104 | self.log(f"{Fore.RED + Style.BRIGHT}No Proxies Found.{Style.RESET_ALL}") 105 | return 106 | 107 | self.log( 108 | f"{Fore.GREEN + Style.BRIGHT}Proxies Total : {Style.RESET_ALL}" 109 | f"{Fore.WHITE + Style.BRIGHT}{len(self.proxies)}{Style.RESET_ALL}" 110 | ) 111 | 112 | except Exception as e: 113 | self.log(f"{Fore.RED + Style.BRIGHT}Failed To Load Proxies: {e}{Style.RESET_ALL}") 114 | self.proxies = [] 115 | 116 | def check_proxy_schemes(self, proxies): 117 | schemes = ["http://", "https://", "socks4://", "socks5://"] 118 | if any(proxies.startswith(scheme) for scheme in schemes): 119 | return proxies 120 | return f"http://{proxies}" 121 | 122 | def get_next_proxy_for_account(self, token): 123 | if token not in self.account_proxies: 124 | if not self.proxies: 125 | return None 126 | proxy = self.check_proxy_schemes(self.proxies[self.proxy_index]) 127 | self.account_proxies[token] = proxy 128 | self.proxy_index = (self.proxy_index + 1) % len(self.proxies) 129 | return self.account_proxies[token] 130 | 131 | def rotate_proxy_for_account(self, token): 132 | if not self.proxies: 133 | return None 134 | proxy = self.check_proxy_schemes(self.proxies[self.proxy_index]) 135 | self.account_proxies[token] = proxy 136 | self.proxy_index = (self.proxy_index + 1) % len(self.proxies) 137 | return proxy 138 | 139 | def generate_address(self, account: str): 140 | try: 141 | account = Account.from_key(account) 142 | address = account.address 143 | 144 | return address 145 | except Exception as e: 146 | return None 147 | 148 | def mask_account(self, account): 149 | try: 150 | mask_account = account[:6] + '*' * 6 + account[-6:] 151 | return mask_account 152 | except Exception as e: 153 | return None 154 | 155 | async def get_web3_with_check(self, address: str, option: str, use_proxy: bool, retries=3, timeout=60): 156 | request_kwargs = {"timeout": timeout} 157 | 158 | proxy = self.get_next_proxy_for_account(address) if use_proxy else None 159 | 160 | if use_proxy and proxy: 161 | request_kwargs["proxies"] = {"http": proxy, "https": proxy} 162 | 163 | if option == "Arbitrum to Base": 164 | rpc_url = self.ARB_SEPOLIA["RPC"] 165 | 166 | elif option == "Base to Arbitrum": 167 | rpc_url = self.BASE_SEPOLIA["RPC"] 168 | 169 | for attempt in range(retries): 170 | try: 171 | web3 = Web3(Web3.HTTPProvider(rpc_url, request_kwargs=request_kwargs)) 172 | web3.eth.get_block_number() 173 | return web3 174 | except Exception as e: 175 | if attempt < retries - 1: 176 | await asyncio.sleep(3) 177 | continue 178 | raise Exception(f"Failed to Connect to RPC: {str(e)}") 179 | 180 | async def get_token_balance(self, address: str, option: str, use_proxy: bool): 181 | try: 182 | web3 = await self.get_web3_with_check(address, option, use_proxy) 183 | balance = web3.eth.get_balance(address) 184 | 185 | token_balance = balance / (10 ** 18) 186 | 187 | return token_balance 188 | except Exception as e: 189 | self.log( 190 | f"{Fore.CYAN+Style.BRIGHT} Message :{Style.RESET_ALL}" 191 | f"{Fore.RED+Style.BRIGHT} {str(e)} {Style.RESET_ALL}" 192 | ) 193 | return None 194 | 195 | async def perform_bridge(self, account: str, address: str, option: str, use_proxy: bool): 196 | try: 197 | web3 = await self.get_web3_with_check(address, option, use_proxy) 198 | 199 | if option == "Arbitrum to Base": 200 | bridge_amount = self.arb_amount 201 | original_domain = self.ARB_SEPOLIA["ChainId"] 202 | destination_domain = self.BASE_SEPOLIA["ChainId"] 203 | original_settler = self.ARB_SEPOLIA["Router Address"] 204 | destination_settler = self.BASE_SEPOLIA["Router Address"] 205 | 206 | elif option == "Base to Arbitrum": 207 | bridge_amount = self.base_SEPOLIA_amount 208 | original_domain = self.BASE_SEPOLIA["ChainId"] 209 | destination_domain = self.ARB_SEPOLIA["ChainId"] 210 | original_settler = self.BASE_SEPOLIA["Router Address"] 211 | destination_settler = self.ARB_SEPOLIA["Router Address"] 212 | 213 | token_contract = web3.eth.contract(address=web3.to_checksum_address(original_settler), abi=self.BRIDGE_CONTRACT_ABI) 214 | 215 | amount_in = web3.to_wei(bridge_amount, "ether") 216 | fees_to_wei = int(amount_in * 0.0001) 217 | amount_out = amount_in - fees_to_wei 218 | sender_nonce = random.randint(10**15, 10**16 - 1) 219 | deadline = int(time.time() + 3000) 220 | 221 | order_data_type = to_hex(keccak(text=( 222 | "OrderData(" 223 | "bytes32 sender," 224 | "bytes32 recipient," 225 | "bytes32 inputToken," 226 | "bytes32 outputToken," 227 | "uint256 amountIn," 228 | "uint256 amountOut," 229 | "uint256 senderNonce," 230 | "uint32 originDomain," 231 | "uint32 destinationDomain," 232 | "bytes32 destinationSettler," 233 | "uint32 fillDeadline," 234 | "bytes data)" 235 | ))) 236 | 237 | order_data_bytes = encode( 238 | [ 239 | "bytes32", "bytes32", "bytes32", "bytes32", 240 | "uint256", "uint256", "uint256", "uint32", 241 | "uint32", "bytes32", "uint32", "bytes" 242 | ], 243 | [ 244 | 245 | web3.to_bytes(hexstr=address).rjust(32, b'\x00'), 246 | web3.to_bytes(hexstr=address).rjust(32, b'\x00'), 247 | b"\x00" * 32, 248 | b"\x00" * 32, 249 | amount_in, 250 | amount_out, 251 | sender_nonce, 252 | original_domain, 253 | destination_domain, 254 | web3.to_bytes(hexstr=destination_settler).rjust(32, b'\x00'), 255 | deadline, 256 | b"" 257 | ] 258 | ) 259 | 260 | order_data_hex = to_hex(order_data_bytes)[2:] 261 | offset = hex(32)[2:].zfill(64) 262 | final_data_bytes = bytes.fromhex(offset + order_data_hex) 263 | order_data = to_hex(final_data_bytes) 264 | 265 | _order = ( 266 | deadline, 267 | order_data_type, 268 | order_data 269 | ) 270 | 271 | bridge_data = token_contract.functions.open(_order) 272 | 273 | estimated_gas = bridge_data.estimate_gas({"from": address, "value":amount_in}) 274 | latest_block = web3.eth.get_block("latest") 275 | base_fee = latest_block.get("baseFeePerGas", 0) 276 | max_priority_fee = base_fee * 2 277 | max_fee = max_priority_fee 278 | 279 | bridge_tx = bridge_data.build_transaction({ 280 | "from": address, 281 | "value": int(amount_in), 282 | "gas": int(estimated_gas * 1.2), 283 | "maxFeePerGas": int(max_fee), 284 | "maxPriorityFeePerGas": int(max_priority_fee), 285 | "nonce": web3.eth.get_transaction_count(address, "pending"), 286 | "chainId": original_domain, 287 | }) 288 | 289 | signed_tx = web3.eth.account.sign_transaction(bridge_tx, account) 290 | raw_tx = web3.eth.send_raw_transaction(signed_tx.raw_transaction) 291 | tx_hash = web3.to_hex(raw_tx) 292 | receipt = await asyncio.to_thread(web3.eth.wait_for_transaction_receipt, tx_hash, timeout=300) 293 | block_number = receipt.blockNumber 294 | 295 | return tx_hash, block_number 296 | except Exception as e: 297 | self.log( 298 | f"{Fore.CYAN+Style.BRIGHT} Message :{Style.RESET_ALL}" 299 | f"{Fore.RED+Style.BRIGHT} {str(e)} {Style.RESET_ALL}" 300 | ) 301 | return None, None 302 | 303 | async def print_timer(self): 304 | for remaining in range(random.randint(self.min_delay, self.max_delay), 0, -1): 305 | print( 306 | f"{Fore.CYAN + Style.BRIGHT}[ {datetime.now().astimezone(wib).strftime('%x %X %Z')} ]{Style.RESET_ALL}" 307 | f"{Fore.WHITE + Style.BRIGHT} | {Style.RESET_ALL}" 308 | f"{Fore.BLUE + Style.BRIGHT}Wait For{Style.RESET_ALL}" 309 | f"{Fore.WHITE + Style.BRIGHT} {remaining} {Style.RESET_ALL}" 310 | f"{Fore.BLUE + Style.BRIGHT}Seconds For Next Tx...{Style.RESET_ALL}", 311 | end="\r", 312 | flush=True 313 | ) 314 | await asyncio.sleep(1) 315 | 316 | def print_question(self): 317 | while True: 318 | try: 319 | print(f"{Fore.GREEN + Style.BRIGHT}Select Option:{Style.RESET_ALL}") 320 | print(f"{Fore.WHITE + Style.BRIGHT}1. Bridge Arb to Base{Style.RESET_ALL}") 321 | print(f"{Fore.WHITE + Style.BRIGHT}2. Bridge Base to Arb{Style.RESET_ALL}") 322 | print(f"{Fore.WHITE + Style.BRIGHT}3. Run All Features (Random){Style.RESET_ALL}") 323 | option = int(input(f"{Fore.BLUE + Style.BRIGHT}Choose [1/2/3] -> {Style.RESET_ALL}").strip()) 324 | 325 | if option in [1, 2, 3]: 326 | option_type = ( 327 | "Bridge Arb to Base" if option == 1 else 328 | "Bridge Base to Arb" if option == 2 else 329 | "Run All Features (Random)" 330 | ) 331 | print(f"{Fore.GREEN + Style.BRIGHT}{option_type} Selected.{Style.RESET_ALL}") 332 | break 333 | else: 334 | print(f"{Fore.RED + Style.BRIGHT}Please enter either 1, 2, or 3.{Style.RESET_ALL}") 335 | except ValueError: 336 | print(f"{Fore.RED + Style.BRIGHT}Invalid input. Enter a number (1, 2, or 3).{Style.RESET_ALL}") 337 | 338 | if option == 1: 339 | while True: 340 | try: 341 | bridge_count = int(input(f"{Fore.YELLOW + Style.BRIGHT}Bridge Count For Each Wallet -> {Style.RESET_ALL}").strip()) 342 | if bridge_count > 0: 343 | self.bridge_count = bridge_count 344 | break 345 | else: 346 | print(f"{Fore.RED + Style.BRIGHT}Bridge Count must be > 0.{Style.RESET_ALL}") 347 | except ValueError: 348 | print(f"{Fore.RED + Style.BRIGHT}Invalid input. Enter a number.{Style.RESET_ALL}") 349 | 350 | while True: 351 | try: 352 | arb_amount = float(input(f"{Fore.YELLOW + Style.BRIGHT}Enter Arb Sepolia Amount [1 or 0.01 or 0.001, etc in decimals] -> {Style.RESET_ALL}").strip()) 353 | if arb_amount > 0: 354 | self.arb_amount = arb_amount 355 | break 356 | else: 357 | print(f"{Fore.RED + Style.BRIGHT}Arb Sepolia Amount must be > 0.{Style.RESET_ALL}") 358 | except ValueError: 359 | print(f"{Fore.RED + Style.BRIGHT}Invalid input. Enter a float or decimal number.{Style.RESET_ALL}") 360 | 361 | while True: 362 | try: 363 | min_delay = int(input(f"{Fore.YELLOW + Style.BRIGHT}Min Delay For Each Tx -> {Style.RESET_ALL}").strip()) 364 | if min_delay >= 0: 365 | self.min_delay = min_delay 366 | break 367 | else: 368 | print(f"{Fore.RED + Style.BRIGHT}Min Delay must be >= 0.{Style.RESET_ALL}") 369 | except ValueError: 370 | print(f"{Fore.RED + Style.BRIGHT}Invalid input. Enter a number.{Style.RESET_ALL}") 371 | 372 | while True: 373 | try: 374 | max_delay = int(input(f"{Fore.YELLOW + Style.BRIGHT}Max Delay For Each Tx -> {Style.RESET_ALL}").strip()) 375 | if max_delay >= min_delay: 376 | self.max_delay = max_delay 377 | break 378 | else: 379 | print(f"{Fore.RED + Style.BRIGHT}Max Delay must be >= Min Delay.{Style.RESET_ALL}") 380 | except ValueError: 381 | print(f"{Fore.RED + Style.BRIGHT}Invalid input. Enter a number.{Style.RESET_ALL}") 382 | 383 | elif option == 2: 384 | while True: 385 | try: 386 | bridge_count = int(input(f"{Fore.YELLOW + Style.BRIGHT}Bridge Count For Each Wallet -> {Style.RESET_ALL}").strip()) 387 | if bridge_count > 0: 388 | self.bridge_count = bridge_count 389 | break 390 | else: 391 | print(f"{Fore.RED + Style.BRIGHT}Bridge Count must be > 0.{Style.RESET_ALL}") 392 | except ValueError: 393 | print(f"{Fore.RED + Style.BRIGHT}Invalid input. Enter a number.{Style.RESET_ALL}") 394 | 395 | while True: 396 | try: 397 | base_amount = float(input(f"{Fore.YELLOW + Style.BRIGHT}Enter Base Sepolia Amount [1 or 0.01 or 0.001, etc in decimals] -> {Style.RESET_ALL}").strip()) 398 | if base_amount > 0: 399 | self.base_SEPOLIA_amount = base_amount 400 | break 401 | else: 402 | print(f"{Fore.RED + Style.BRIGHT}Base Sepolia Amount must be > 0.{Style.RESET_ALL}") 403 | except ValueError: 404 | print(f"{Fore.RED + Style.BRIGHT}Invalid input. Enter a float or decimal number.{Style.RESET_ALL}") 405 | 406 | while True: 407 | try: 408 | min_delay = int(input(f"{Fore.YELLOW + Style.BRIGHT}Min Delay For Each Tx -> {Style.RESET_ALL}").strip()) 409 | if min_delay >= 0: 410 | self.min_delay = min_delay 411 | break 412 | else: 413 | print(f"{Fore.RED + Style.BRIGHT}Min Delay must be >= 0.{Style.RESET_ALL}") 414 | except ValueError: 415 | print(f"{Fore.RED + Style.BRIGHT}Invalid input. Enter a number.{Style.RESET_ALL}") 416 | 417 | while True: 418 | try: 419 | max_delay = int(input(f"{Fore.YELLOW + Style.BRIGHT}Max Delay For Each Tx -> {Style.RESET_ALL}").strip()) 420 | if max_delay >= min_delay: 421 | self.max_delay = max_delay 422 | break 423 | else: 424 | print(f"{Fore.RED + Style.BRIGHT}Max Delay must be >= Min Delay.{Style.RESET_ALL}") 425 | except ValueError: 426 | print(f"{Fore.RED + Style.BRIGHT}Invalid input. Enter a number.{Style.RESET_ALL}") 427 | 428 | elif option == 3: 429 | while True: 430 | try: 431 | bridge_count = int(input(f"{Fore.YELLOW + Style.BRIGHT}Bridge Count For Each Wallet -> {Style.RESET_ALL}").strip()) 432 | if bridge_count > 0: 433 | self.bridge_count = bridge_count 434 | break 435 | else: 436 | print(f"{Fore.RED + Style.BRIGHT}Bridge Count must be > 0.{Style.RESET_ALL}") 437 | except ValueError: 438 | print(f"{Fore.RED + Style.BRIGHT}Invalid input. Enter a number.{Style.RESET_ALL}") 439 | 440 | while True: 441 | try: 442 | arb_amount = float(input(f"{Fore.YELLOW + Style.BRIGHT}Enter Arb Sepolia Amount [1 or 0.01 or 0.001, etc in decimals] -> {Style.RESET_ALL}").strip()) 443 | if arb_amount > 0: 444 | self.arb_amount = arb_amount 445 | break 446 | else: 447 | print(f"{Fore.RED + Style.BRIGHT}Arb Sepolia Amount must be > 0.{Style.RESET_ALL}") 448 | except ValueError: 449 | print(f"{Fore.RED + Style.BRIGHT}Invalid input. Enter a float or decimal number.{Style.RESET_ALL}") 450 | 451 | while True: 452 | try: 453 | base_amount = float(input(f"{Fore.YELLOW + Style.BRIGHT}Enter Base Sepolia Amount [1 or 0.01 or 0.001, etc in decimals] -> {Style.RESET_ALL}").strip()) 454 | if base_amount > 0: 455 | self.base_SEPOLIA_amount = base_amount 456 | break 457 | else: 458 | print(f"{Fore.RED + Style.BRIGHT}ARB Sepolia Amount must be > 0.{Style.RESET_ALL}") 459 | except ValueError: 460 | print(f"{Fore.RED + Style.BRIGHT}Invalid input. Enter a float or decimal number.{Style.RESET_ALL}") 461 | 462 | while True: 463 | try: 464 | min_delay = int(input(f"{Fore.YELLOW + Style.BRIGHT}Min Delay For Each Tx -> {Style.RESET_ALL}").strip()) 465 | if min_delay >= 0: 466 | self.min_delay = min_delay 467 | break 468 | else: 469 | print(f"{Fore.RED + Style.BRIGHT}Min Delay must be >= 0.{Style.RESET_ALL}") 470 | except ValueError: 471 | print(f"{Fore.RED + Style.BRIGHT}Invalid input. Enter a number.{Style.RESET_ALL}") 472 | 473 | while True: 474 | try: 475 | max_delay = int(input(f"{Fore.YELLOW + Style.BRIGHT}Max Delay For Each Tx -> {Style.RESET_ALL}").strip()) 476 | if max_delay >= min_delay: 477 | self.max_delay = max_delay 478 | break 479 | else: 480 | print(f"{Fore.RED + Style.BRIGHT}Max Delay must be >= Min Delay.{Style.RESET_ALL}") 481 | except ValueError: 482 | print(f"{Fore.RED + Style.BRIGHT}Invalid input. Enter a number.{Style.RESET_ALL}") 483 | 484 | while True: 485 | try: 486 | print(f"{Fore.WHITE + Style.BRIGHT}1. Run With Free Proxyscrape Proxy{Style.RESET_ALL}") 487 | print(f"{Fore.WHITE + Style.BRIGHT}2. Run With Private Proxy{Style.RESET_ALL}") 488 | print(f"{Fore.WHITE + Style.BRIGHT}3. Run Without Proxy{Style.RESET_ALL}") 489 | choose = int(input(f"{Fore.BLUE + Style.BRIGHT}Choose [1/2/3] -> {Style.RESET_ALL}").strip()) 490 | 491 | if choose in [1, 2, 3]: 492 | proxy_type = ( 493 | "With Free Proxyscrape" if choose == 1 else 494 | "With Private" if choose == 2 else 495 | "Without" 496 | ) 497 | print(f"{Fore.GREEN + Style.BRIGHT}Run {proxy_type} Proxy Selected.{Style.RESET_ALL}") 498 | break 499 | else: 500 | print(f"{Fore.RED + Style.BRIGHT}Please enter either 1, 2 or 3.{Style.RESET_ALL}") 501 | except ValueError: 502 | print(f"{Fore.RED + Style.BRIGHT}Invalid input. Enter a number (1, 2 or 3).{Style.RESET_ALL}") 503 | 504 | return option, choose 505 | 506 | async def process_perform_bridge(self, account: str, address: str, option: str, use_proxy: bool): 507 | if option == "Arbitrum to Base": 508 | explorer = self.ARB_SEPOLIA["Explorer"] 509 | 510 | elif option == "Base to Arbitrum": 511 | explorer = self.BASE_SEPOLIA["Explorer"] 512 | 513 | tx_hash, block_number = await self.perform_bridge(account, address, option, use_proxy) 514 | if tx_hash and block_number: 515 | self.log( 516 | f"{Fore.CYAN+Style.BRIGHT} Status :{Style.RESET_ALL}" 517 | f"{Fore.GREEN+Style.BRIGHT} Success {Style.RESET_ALL}" 518 | ) 519 | self.log( 520 | f"{Fore.CYAN+Style.BRIGHT} Block :{Style.RESET_ALL}" 521 | f"{Fore.WHITE+Style.BRIGHT} {block_number} {Style.RESET_ALL}" 522 | ) 523 | self.log( 524 | f"{Fore.CYAN+Style.BRIGHT} Tx Hash :{Style.RESET_ALL}" 525 | f"{Fore.WHITE+Style.BRIGHT} {tx_hash} {Style.RESET_ALL}" 526 | ) 527 | self.log( 528 | f"{Fore.CYAN+Style.BRIGHT} Explorer:{Style.RESET_ALL}" 529 | f"{Fore.WHITE+Style.BRIGHT} {explorer}/{tx_hash} {Style.RESET_ALL}" 530 | ) 531 | else: 532 | self.log( 533 | f"{Fore.CYAN+Style.BRIGHT} Status :{Style.RESET_ALL}" 534 | f"{Fore.RED+Style.BRIGHT} Perform On-Chain Failed {Style.RESET_ALL}" 535 | ) 536 | 537 | async def process_option_1(self, account: str, address: str, use_proxy: bool): 538 | self.log(f"{Fore.CYAN+Style.BRIGHT}Bridge :{Style.RESET_ALL}") 539 | 540 | for i in range(self.bridge_count): 541 | self.log( 542 | f"{Fore.GREEN+Style.BRIGHT} ● {Style.RESET_ALL}" 543 | f"{Fore.WHITE+Style.BRIGHT}{i+1}{Style.RESET_ALL}" 544 | f"{Fore.MAGENTA+Style.BRIGHT} Of {Style.RESET_ALL}" 545 | f"{Fore.WHITE+Style.BRIGHT}{self.bridge_count}{Style.RESET_ALL} " 546 | ) 547 | 548 | option = "Arbitrum to Base" 549 | ticker = self.ARB_SEPOLIA["Ticker"] 550 | amount = self.arb_amount 551 | 552 | balance = await self.get_token_balance(address, option, use_proxy) 553 | 554 | self.log( 555 | f"{Fore.CYAN+Style.BRIGHT} Option :{Style.RESET_ALL}" 556 | f"{Fore.BLUE+Style.BRIGHT} {option} {Style.RESET_ALL}" 557 | ) 558 | self.log( 559 | f"{Fore.CYAN+Style.BRIGHT} Balance :{Style.RESET_ALL}" 560 | f"{Fore.WHITE+Style.BRIGHT} {balance} {ticker} {Style.RESET_ALL}" 561 | ) 562 | self.log( 563 | f"{Fore.CYAN+Style.BRIGHT} Amount :{Style.RESET_ALL}" 564 | f"{Fore.WHITE+Style.BRIGHT} {amount} {ticker} {Style.RESET_ALL}" 565 | ) 566 | 567 | if not balance or balance <= amount: 568 | self.log( 569 | f"{Fore.CYAN+Style.BRIGHT} Status :{Style.RESET_ALL}" 570 | f"{Fore.YELLOW+Style.BRIGHT} Insufficient {ticker} Token Balance {Style.RESET_ALL}" 571 | ) 572 | return 573 | 574 | await self.process_perform_bridge(account, address, option, use_proxy) 575 | await self.print_timer() 576 | 577 | async def process_option_2(self, account: str, address: str, use_proxy: bool): 578 | self.log(f"{Fore.CYAN+Style.BRIGHT}Bridge :{Style.RESET_ALL}") 579 | 580 | for i in range(self.bridge_count): 581 | self.log( 582 | f"{Fore.GREEN+Style.BRIGHT} ● {Style.RESET_ALL}" 583 | f"{Fore.WHITE+Style.BRIGHT}{i+1}{Style.RESET_ALL}" 584 | f"{Fore.MAGENTA+Style.BRIGHT} Of {Style.RESET_ALL}" 585 | f"{Fore.WHITE+Style.BRIGHT}{self.bridge_count}{Style.RESET_ALL} " 586 | ) 587 | 588 | option = "Base to Arbitrum" 589 | ticker = self.BASE_SEPOLIA["Ticker"] 590 | amount = self.base_SEPOLIA_amount 591 | 592 | balance = await self.get_token_balance(address, option, use_proxy) 593 | 594 | self.log( 595 | f"{Fore.CYAN+Style.BRIGHT} Option :{Style.RESET_ALL}" 596 | f"{Fore.BLUE+Style.BRIGHT} {option} {Style.RESET_ALL}" 597 | ) 598 | self.log( 599 | f"{Fore.CYAN+Style.BRIGHT} Balance :{Style.RESET_ALL}" 600 | f"{Fore.WHITE+Style.BRIGHT} {balance} {ticker} {Style.RESET_ALL}" 601 | ) 602 | self.log( 603 | f"{Fore.CYAN+Style.BRIGHT} Amount :{Style.RESET_ALL}" 604 | f"{Fore.WHITE+Style.BRIGHT} {amount} {ticker} {Style.RESET_ALL}" 605 | ) 606 | 607 | if not balance or balance <= amount: 608 | self.log( 609 | f"{Fore.CYAN+Style.BRIGHT} Status :{Style.RESET_ALL}" 610 | f"{Fore.YELLOW+Style.BRIGHT} Insufficient {ticker} Token Balance {Style.RESET_ALL}" 611 | ) 612 | return 613 | 614 | await self.process_perform_bridge(account, address, option, use_proxy) 615 | await self.print_timer() 616 | 617 | async def process_option_3(self, account: str, address: str, use_proxy: bool): 618 | self.log(f"{Fore.CYAN+Style.BRIGHT}Bridge :{Style.RESET_ALL}") 619 | 620 | for i in range(self.bridge_count): 621 | self.log( 622 | f"{Fore.GREEN+Style.BRIGHT} ● {Style.RESET_ALL}" 623 | f"{Fore.WHITE+Style.BRIGHT}{i+1}{Style.RESET_ALL}" 624 | f"{Fore.MAGENTA+Style.BRIGHT} Of {Style.RESET_ALL}" 625 | f"{Fore.WHITE+Style.BRIGHT}{self.bridge_count}{Style.RESET_ALL} " 626 | ) 627 | 628 | option = random.choice(["Arbitrum to Base", "Base to Arbitrum"]) 629 | 630 | if option == "Arbitrum to Base": 631 | ticker = self.ARB_SEPOLIA["Ticker"] 632 | amount = self.arb_amount 633 | 634 | elif option == "Base to Arbitrum": 635 | ticker = self.BASE_SEPOLIA["Ticker"] 636 | amount = self.base_SEPOLIA_amount 637 | 638 | balance = await self.get_token_balance(address, option, use_proxy) 639 | 640 | self.log( 641 | f"{Fore.CYAN+Style.BRIGHT} Option :{Style.RESET_ALL}" 642 | f"{Fore.BLUE+Style.BRIGHT} {option} {Style.RESET_ALL}" 643 | ) 644 | self.log( 645 | f"{Fore.CYAN+Style.BRIGHT} Balance :{Style.RESET_ALL}" 646 | f"{Fore.WHITE+Style.BRIGHT} {balance} {ticker} {Style.RESET_ALL}" 647 | ) 648 | self.log( 649 | f"{Fore.CYAN+Style.BRIGHT} Amount :{Style.RESET_ALL}" 650 | f"{Fore.WHITE+Style.BRIGHT} {amount} {ticker} {Style.RESET_ALL}" 651 | ) 652 | 653 | if not balance or balance <= amount: 654 | self.log( 655 | f"{Fore.CYAN+Style.BRIGHT} Status :{Style.RESET_ALL}" 656 | f"{Fore.YELLOW+Style.BRIGHT} Insufficient {ticker} Token Balance {Style.RESET_ALL}" 657 | ) 658 | return 659 | 660 | await self.process_perform_bridge(account, address, option, use_proxy) 661 | await self.print_timer() 662 | 663 | async def process_accounts(self, account: str, address: str, option: str, use_proxy: bool): 664 | proxy = self.get_next_proxy_for_account(address) if use_proxy else None 665 | self.log( 666 | f"{Fore.CYAN + Style.BRIGHT}Proxy :{Style.RESET_ALL}" 667 | f"{Fore.WHITE + Style.BRIGHT} {proxy} {Style.RESET_ALL}" 668 | ) 669 | 670 | if option == 1: 671 | await self.process_option_1(account, address, use_proxy) 672 | 673 | elif option == 2: 674 | await self.process_option_2(account, address, use_proxy) 675 | 676 | elif option == 3: 677 | await self.process_option_3(account, address, use_proxy) 678 | 679 | async def main(self): 680 | try: 681 | with open('accounts.txt', 'r') as file: 682 | accounts = [line.strip() for line in file if line.strip()] 683 | 684 | option, use_proxy_choice = self.print_question() 685 | 686 | use_proxy = False 687 | if use_proxy_choice in [1, 2]: 688 | use_proxy = True 689 | 690 | while True: 691 | self.clear_terminal() 692 | self.welcome() 693 | self.log( 694 | f"{Fore.GREEN + Style.BRIGHT}Account's Total: {Style.RESET_ALL}" 695 | f"{Fore.WHITE + Style.BRIGHT}{len(accounts)}{Style.RESET_ALL}" 696 | ) 697 | 698 | if use_proxy: 699 | await self.load_proxies(use_proxy_choice) 700 | 701 | separator = "=" * 25 702 | for account in accounts: 703 | if account: 704 | address = self.generate_address(account) 705 | 706 | self.log( 707 | f"{Fore.CYAN + Style.BRIGHT}{separator}[{Style.RESET_ALL}" 708 | f"{Fore.WHITE + Style.BRIGHT} {self.mask_account(address)} {Style.RESET_ALL}" 709 | f"{Fore.CYAN + Style.BRIGHT}]{separator}{Style.RESET_ALL}" 710 | ) 711 | 712 | if not address: 713 | self.log( 714 | f"{Fore.CYAN + Style.BRIGHT}Status :{Style.RESET_ALL}" 715 | f"{Fore.RED + Style.BRIGHT} Invalid Private Key or Library Version Not Supported {Style.RESET_ALL}" 716 | ) 717 | continue 718 | 719 | await self.process_accounts(account, address, option, use_proxy_choice) 720 | await asyncio.sleep(3) 721 | 722 | self.log(f"{Fore.CYAN + Style.BRIGHT}={Style.RESET_ALL}"*72) 723 | seconds = 24 * 60 * 60 724 | while seconds > 0: 725 | formatted_time = self.format_seconds(seconds) 726 | print( 727 | f"{Fore.CYAN+Style.BRIGHT}[ Wait for{Style.RESET_ALL}" 728 | f"{Fore.WHITE+Style.BRIGHT} {formatted_time} {Style.RESET_ALL}" 729 | f"{Fore.CYAN+Style.BRIGHT}... ]{Style.RESET_ALL}" 730 | f"{Fore.WHITE+Style.BRIGHT} | {Style.RESET_ALL}" 731 | f"{Fore.BLUE+Style.BRIGHT}All Accounts Have Been Processed.{Style.RESET_ALL}", 732 | end="\r" 733 | ) 734 | await asyncio.sleep(1) 735 | seconds -= 1 736 | 737 | except FileNotFoundError: 738 | self.log(f"{Fore.RED}File 'accounts.txt' Not Found.{Style.RESET_ALL}") 739 | return 740 | except Exception as e: 741 | self.log(f"{Fore.RED+Style.BRIGHT}Error: {e}{Style.RESET_ALL}") 742 | raise e 743 | 744 | if __name__ == "__main__": 745 | try: 746 | bot = TOne() 747 | asyncio.run(bot.main()) 748 | except KeyboardInterrupt: 749 | print( 750 | f"{Fore.CYAN + Style.BRIGHT}[ {datetime.now().astimezone(wib).strftime('%x %X %Z')} ]{Style.RESET_ALL}" 751 | f"{Fore.WHITE + Style.BRIGHT} | {Style.RESET_ALL}" 752 | f"{Fore.RED + Style.BRIGHT}[ EXIT ] T1 Protocol - BOT{Style.RESET_ALL} " 753 | ) --------------------------------------------------------------------------------