This Python script automates bridging BNB from the BNB Chain to opBNB using the official opBNB bridge contract.
🌐 Bridge Website: https://opbnb-bridge.bnbchain.org/deposit
- Private key-based wallet control
- Proxy support
- Send either:
- fixed BNB amount, or
- a percentage of current balance (e.g., 90–95%)
- Random delay between wallets
- Dry-run mode (safe simulation)
- Dynamic gas price from BNB network
- Retry logic and error logging
- Logs failed wallets to
failed_wallets.log
-
Create virtual environment:
python -m venv venv
-
Activate it:
- Windows:
venv\Scripts\activate
- macOS/Linux:
source venv/bin/activate
- Windows:
-
Install dependencies:
pip install -r requirements.txt
-
Run script:
python main.py
priv.txt
– list of private keys (one per line)proxy.txt
– list of proxies (optional)requirements.txt
– Python libraries required
Этот скрипт на Python автоматически бриджит BNB из сети BNB Chain в opBNB через официальный смарт-контракт моста.
🌐 Сайт моста: https://opbnb-bridge.bnbchain.org/deposit
- Работа с кошельками по приватным ключам
- Поддержка прокси
- Отправка:
- фиксированной суммы BNB
- или процента от баланса (например, 90–95%)
- Случайная задержка между кошельками
- Dry-run режим (тест без транзакций)
- Динамическая цена газа с сети BNB
- Повторные попытки при ошибках
- Лог неудачных кошельков в
failed_wallets.log
-
Создайте виртуальное окружение:
python -m venv venv
-
Активируйте его:
- Windows:
venv\Scripts\activate
- macOS/Linux:
source venv/bin/activate
- Windows:
-
Установите зависимости:
pip install -r requirements.txt
-
Запустите скрипт:
python main.py
You can adjust these values at the top of the bnb_to_opbnb_bridge.py
script:
Parameter | Description |
---|---|
USE_PERCENT_MODE |
If True , sends a percentage of the wallet balance instead of a fixed range |
PERCENT_MIN / PERCENT_MAX |
The min and max percentage of the balance to send (used only if USE_PERCENT_MODE = True ) |
SEND_MIN / SEND_MAX |
Minimum and maximum amount in BNB to send (used if USE_PERCENT_MODE = False ) |
USE_PROXY |
If True , uses proxy from proxy.txt file (supports http/socks5) |
USE_DRY_RUN |
If True , script only simulates transactions without sending real ones |