Skip to content

Commit

Permalink
Initial Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaammerr committed Apr 15, 2024
0 parents commit 6ae9ea9
Show file tree
Hide file tree
Showing 18 changed files with 888 additions and 0 deletions.
161 changes: 161 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
# Byte-compiled / optimized / DLL files
__pycache__/
.idea/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/#use-with-ide
.pdm.toml

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
56 changes: 56 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Bungee MultiSender via Socket
<img src="/console/images/img.png" alt="Alt text" title="Optional title">

## 🔗 Links

🔔 CHANNEL: https://t.me/JamBitPY

💬 CHAT: https://t.me/JamBitChat

💰 DONATION EVM ADDRESS: 0x08e3fdbb830ee591c0533C5E58f937D312b07198

## 📝 Description
``` This script allows you to send stablecoins to multiple addresses from your main wallet. The main advantage is that the sending occurs through the Bungee Socket contract, so the transaction fee will be minimal and it is impossible to find out the original address of the sender. ```

Supported sub-accounts format:

```You will be able to drop TXT with accounts while working with the console```
- address (static amount)
- address, amount (dynamic amount)

Supported networks:
- Binance Smart Chain
- Ethereum
- Polygon
- Avalanche
- Arbitrium
- Optimism
- Base
- ZkSync Era


## 📦 Installation
```bash
git clone this repository and open CMD in the folder
install the required packages: pip install -r requirements.txt
start the script: python run.py
```


## ⚙️ Config (config > settings.yaml)

```It is highly recommended to use your own RPCs via https://www.ankr.com/```

| Name | Description |
|---------|-------------------------------------------------------------|
| eth_rpc | ETH RPC URL (if not have, leave the default value) |
| op_rpc | OPTIMISM RPC URL (if not have, leave the default value) |
| bsc_rpc | Binance Smart RPC URL(if not have, leave the default value) |
| polygon_rpc | POLYGON RPC URL (if not have, leave the default value) |
| zk_era_rpc | ZKSYNC ERA RPC URL(if not have, leave the default value) |
| avax_rpc | AVALANCHE RPC URL (if not have, leave the default value) |
| base_rpc | BASE RPC URL (if not have, leave the default value) |


## 📄 Results
```After the script is completed, you will be able to see txt files with success/failed wallets in the <<results>> folder```
1 change: 1 addition & 0 deletions abi/socket.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"destinationReceiver","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"destinationChainId","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Donation","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"sender","type":"address"}],"name":"GrantSender","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"sender","type":"address"}],"name":"RevokeSender","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"srcChainTxHash","type":"bytes32"}],"name":"Send","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdrawal","type":"event"},{"inputs":[{"components":[{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"bool","name":"isEnabled","type":"bool"}],"internalType":"struct GasMovr.ChainData[]","name":"_routes","type":"tuple[]"}],"name":"addRoutes","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable[]","name":"receivers","type":"address[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes32[]","name":"srcChainTxHashes","type":"bytes32[]"},{"internalType":"uint256","name":"perUserGasAmount","type":"uint256"},{"internalType":"uint256","name":"maxLimit","type":"uint256"}],"name":"batchSendNativeToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"chainConfig","outputs":[{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"bool","name":"isEnabled","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"destinationChainId","type":"uint256"},{"internalType":"address","name":"_to","type":"address"}],"name":"depositNativeToken","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"chainId","type":"uint256"}],"name":"getChainData","outputs":[{"components":[{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"bool","name":"isEnabled","type":"bool"}],"internalType":"struct GasMovr.ChainData","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"name":"grantSenderRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"processedHashes","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"name":"revokeSenderRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"receiver","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes32","name":"srcChainTxHash","type":"bytes32"},{"internalType":"uint256","name":"perUserGasAmount","type":"uint256"},{"internalType":"uint256","name":"maxLimit","type":"uint256"}],"name":"sendNativeToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"senders","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"bool","name":"_isEnabled","type":"bool"}],"name":"setIsEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"setPause","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"setUnPause","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdrawBalance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"}],"name":"withdrawFullBalance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
39 changes: 39 additions & 0 deletions config/load_config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import os
import yaml

from loguru import logger
from models import Config


def load_config() -> Config:
settings_path = os.path.join(os.path.dirname(__file__), "settings.yaml")
variables = (
"eth_rpc",
"op_rpc",
"bsc_rpc",
"polygon_rpc",
"zk_era_rpc",
"arb_rpc",
"avax_rpc",
"base_rpc",
"max_priority_fee_per_gas",
)

if not os.path.exists(settings_path):
logger.error(
f"Config file not found. Please create a config.yaml file in the config directory."
)
exit(1)

if not all(
variable in yaml.safe_load(open(settings_path)) for variable in variables
):
logger.error(
f"Config file is missing some variables. Please check the settings.yaml file in the config directory."
)
exit(1)

with open(settings_path) as file:
config = yaml.safe_load(file)

return Config(**config)
9 changes: 9 additions & 0 deletions config/settings.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
eth_rpc: https://mainnet.infura.io/v3
op_rpc: https://rpc.ankr.com/optimism
bsc_rpc: https://bsc-dataseed.binance.org
polygon_rpc: https://polygon-rpc.com
zk_era_rpc: https://mainnet.era.zksync.io
arb_rpc: https://arbitrum-mainnet.infura.io
avax_rpc: https://rpc.ankr.com/avalanche
base_rpc: https://1rpc.io/base
max_priority_fee_per_gas: 0.5
72 changes: 72 additions & 0 deletions config/variables.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
from loader import config
from models import SocketContracts


CHAINS = [
"Ethereum",
"Optimism",
"Arbitrium",
"Binance Smart",
"Polygon",
"ZkSync Era",
"Avalanche",
"Base",
]

RPC_URLS = {
"Ethereum": config.eth_rpc,
"Optimism": config.op_rpc,
"Arbitrium": config.arb_rpc,
"Binance Smart": config.bsc_rpc,
"Polygon": config.polygon_rpc,
"ZkSync Era": config.zk_era_rpc,
"Avalanche": config.avax_rpc,
"Base": config.base_rpc,
}

CHAIN_IDS = {
"Ethereum": 1,
"Optimism": 10,
"Arbitrium": 42161,
"Binance Smart": 56,
"Polygon": 137,
"ZkSync Era": 324,
"Avalanche": 43114,
"Base": 8453,
}


CHAIN_SYMBOLS = {
"Ethereum": "ETH",
"Optimism": "ETH",
"Arbitrium": "ETH",
"Binance Smart": "BNB",
"Polygon": "MATIC",
"ZkSync Era": "ETH",
"Avalanche": "AVAX",
"Base": "ETH",
}


CHAIN_CONTRACTS = {
"Ethereum": SocketContracts.eth,
"Optimism": SocketContracts.op,
"Arbitrium": SocketContracts.arb,
"Binance Smart": SocketContracts.bsc,
"Polygon": SocketContracts.polygon,
"ZkSync Era": SocketContracts.zk_era,
"Avalanche": SocketContracts.avax,
"Base": SocketContracts.base,
}


CHAINS_EXPLORERS = {
"Ethereum": "https://etherscan.io/tx/",
"Optimism": "https://optimistic.etherscan.io/tx/",
"Arbitrium": "https://arbiscan.io/tx/",
"Binance Smart": "https://bscscan.com/tx/",
"Polygon": "https://polygonscan.com/tx/",
"ZkSync Era": "https://explorer.zksync.io/tx/",
"Avalanche": "https://snowtrace.io/tx/",
"Base": "https://basescan.org/tx/",
}
1 change: 1 addition & 0 deletions console/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from .main import Console
Binary file added console/images/img.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions console/logger.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
from colorama import Fore


def error_log(message: str):
print(Fore.RED + ">> ERROR |" + Fore.LIGHTBLACK_EX + f" {message}")


def success_log(message: str):
print(Fore.GREEN + ">> SUCCESS |" + Fore.LIGHTBLACK_EX + f" {message}")


def info_log(message: str):
print(Fore.LIGHTBLACK_EX + f">> INFO | {message}")
Loading

0 comments on commit 6ae9ea9

Please # to comment.