The Layer Zero Bridger is a Python script that automates the process of transferring USDC or USDT (stablecoin cryptocurrencies) between different blockchains (Polygon->Avalanche->BSC->Polygon). It uses a set of pre-configured wallet addresses to perform transfers in both directions and repeat the process a configurable number of times.
- Polygon (USDC, USDT)
- Fantom (USDC)
- Avalanche (USDC, USDT)
- BSC (USDT)
- Python 3.10 or higher
- An understanding of blockchain, cryptocurrency, and how to handle wallets and private keys securely.
-
Clone the repository:
git clone https://github.com/tmlnv/layer_zero_bridger.git cd layer_zero_bridger
-
Install the required dependencies:
pip install -r requirements.txt
-
Configure your wallets and number of cycles:
In the
private_keys.txt
file, specify the wallet keys. Do not leave empty lines.In the
config.py
file, specify the wallet keys and the number of transfer cycles you want to run.TIMES = 10 # Number of transfer cycles
Warning: Never disclose your private keys. They are sensitive information.
Execute the main.py
script:
python main.py
Optional:
Execute only separated one-time bridging runs if you want just to transfer assets. Consider token availability on both departure and destination chains. Execute the chain_to_chain.py
script using --mode
flag with one of possible options:
pf
to bridge from Polygon to Fantompa
to bridge from Polygon to Avalanchepb
to bridge from Polygon to BSCfp
to bridge from Fantom to Polygonfa
to bridge from Fantom to Avalanchefb
to bridge from Fantom to BSCap
to bridge from Avalanche to Polygonaf
to bridge from Avalanche to Fantomab
to bridge from Avalanche to BSCbp
to bridge from BSC to Polygonbf
to bridge from BSC to Fantomba
to bridge from BSC to Avalanche
Example:
python chain_to_chain.py --mode pf
The main script performs the following actions for each wallet:
- After a random delay of 1 to 200 seconds, it initiates a USDC transfer from Polygon to Avalanche.
- It waits for a random period between 1200 and 1500 seconds.
- Then, it initiates a USDC transfer from Avalanche to BSC. USDT tokens are received on BSC.
- It waits for a random period between 1200 and 1500 seconds.
- Then, it initiates a USDT transfer from BSC back to Polygon. USDC tokens are received on Polygon.
- It waits for a random period between 100 and 300 seconds.
- These steps are repeated a predefined number of times (
TIMES
inconfig.py
).
The script logs all its actions and reports when each wallet's transfers are done and when all tasks are finished.
This script is meant for educational purposes. Always ensure you're keeping your private keys secure.