Full Code of realaskaer/BeraMachine for AI

main 4a51b346106a cached
20 files
216.4 KB
59.0k tokens
146 symbols
1 requests
Download .txt
Showing preview only (227K chars total). Download the full file or copy to clipboard to get everything.
Repository: realaskaer/BeraMachine
Branch: main
Commit: 4a51b346106a
Files: 20
Total size: 216.4 KB

Directory structure:
gitextract_f008ug3n/

├── .gitignore
├── LICENSE
├── README.md
├── config.py
├── data/
│   └── services/
│       ├── bad_wallets.json
│       └── wallets_progress.json
├── functions.py
├── main.py
├── modules/
│   ├── __init__.py
│   ├── berachain.py
│   ├── client.py
│   ├── cutsom_module.py
│   ├── faucets.py
│   ├── galxe.py
│   └── interfaces.py
├── requirements.txt
└── utils/
    ├── modules_runner.py
    ├── networks.py
    ├── route_generator.py
    └── tools.py

================================================
FILE CONTENTS
================================================

================================================
FILE: .gitignore
================================================

*.xlsx
general_settings.py
*.iml
*.xml
*.pyc
*.log


================================================
FILE: LICENSE
================================================
MIT License

Copyright (c) 2024 askaer

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


================================================
FILE: README.md
================================================

# 🐻 BeraMachine

## Общая информация

Софт для отработки тестнета Berachain. Все настройки простые и понятные, ничего лишнего.
> Путь осилит идущий, а софт осилит любой деген🕵️

## Основные особенности 

* **Поддержка прокси (включая мобильные)**
* **Плотнейшее логирование, даже ваш чих залогируется**
* **Сохранение процесса для аккаунтов**
* **Повторитель (при ошибках в модулях)**
* **Сбор не отработавших кошельков**
* **Сохранение логов в файлы по дням**
* **Параллельный запуск**
* **Асинхронный ООП код**
* **EIP-1559**

## 🧩Модули

    1.  Faucet       (получение токенов с крана)                                       
    2.  BEX          (свапы $BERA в $STGUSDC, $BTC, $ETH, ликвидность в пулл $BERA/$STGUSDC)
    3.  Bend         (добавление и вывод $HONEY, $BTC, $ETH ликвидности)
    4.  Berps        (добавление и вывод $HONEY ликвидности)
    5.  Station      (делегирование $BGT и голосование)
    6.  Honey        (минт $HONEY за $STGUSDC)    
    7.  BeraNames    (минт домена)    
    8.  Merkly       (деплой контракта)    
    9.  BOOGA        (минт OOGA BOOGA TICKET)    
    10. Galxe        (выполнение кампании на 55 поинтов и дейлика на 5 поинтов за посещение Faucet)

## ♾️Основные функции

1.  **🚀Запуск прогона всех аккаунтов по подготовленным классическим маршрутам**

    Эта функция запустит выполнение маршрутов для всех аккаунтов. Чтобы она заработала, нужно сгенерировать маршрут, с помощью запуска функций №2 (Генерация маршрутов) 

2.  **📄Генерация классических маршрутов для каждого аккаунта**

    Классический генератор, работает по дедовской методике. Вам нужно указать списки модулей в настройке `CLASSIC_ROUTES_MODULES_USING` и при запуске этой функции софт соберет вам маршрут по этой настройке. Поддерживается 
    `None` как один из модулей в списке, при его попадании в маршрут, софт пропустит этот список.

3. **✅Проверка всех прокси на работоспособность**

    Быстрая проверка прокси(реально быстрая, как с цепи срывается)

## 📄Ввод своих данных

### Все нужные данные необходимо указать в таблицу `accounts_data` в папке `/data`. 
   1. **Name** - имена ваших аккаунтов, каждое название должно быть уникальным
   2. **Private Key** - приватные ключи от кошельков
   3. **Proxy** - прокси для каждого аккаунта. Если их будет меньше, софт будет брать их по кругу. Если прокси мобильные, то можно указать одну проксю.
   4. **Email address** - адрес почты для аккаунта.
   5. **Email password** - пароль от почты для аккаунта.

Вы можете установить пароль на вашу таблицу и включить настройку `EXCEL_PASSWORD = True`. При активации пароля, софт будет требовать его ввести для дальнейшей работы. Полезно при работе на сервере.

## ⚙️Настройка софта

Все настройки вынесены в файл `general_settings.py`.
Самые важные настройки продублирую здесь. 

1. Ключ `TWO_CAPTCHA_API_KEY`. Укажите ваш API ключ от **2captcha**. В файле есть ссылка на сайт, где это можно получить ключ
2. Настройка `EXCEL_PAGE_NAME`. Название листа в таблице Excel. 
3. В настройке `CLASSIC_ROUTES_MODULES_USING` указать маршрут для работы аккаунтов. 

## 🛠️Установка и запуск проекта

> Устанавливая проект, вы принимаете риски использования софта для добывания денег(потерять жопу, деньги, девственность).

Как только вы скачаете проект, **убедитесь**, что у вас Python 3.10.11

Установка проекта

```bash
  git clone https://github.com/realaskaer/BeraMachine.git
```

Для установки необходимых библиотек, пропишите в консоль

```bash
  pip install -r requirements.txt
```

Запуск проекта

```bash
  cd beramachine
  python main.py
```

## 🔗 Ссылки на установку Python и PyCharm

 - [Установка PyCharm](https://www.jetbrains.com/pycharm/download/?section=windows)
 - [Установка Python](https://www.python.org/downloads/windows/) (Вам нужна версия 3.10.11)

## ❔Куда писать свой вопрос?

- [@askaer.foundation](https://t.me/askaer) - мой канал в телеграм  
- [@askaer.chat](https://t.me/askaerchat) - ответы на любой вопрос
- [@askaer](https://t.me/realaskaer) - **при обнаружении бомбы в коде**  

## ❤️‍🔥Donate (Any EVM)

### `0x000000a679C2FB345dDEfbaE3c42beE92c0Fb7A5`
> Спасибо за поддержку❤️


================================================
FILE: config.py
================================================
from utils.tools import get_accounts_data

BEX_ABI = {
    'router': [{'inputs': [{'internalType': 'address', 'name': 'pool', 'type': 'address'}, {'internalType': 'address', 'name': 'receiver', 'type': 'address'}, {'internalType': 'address[]', 'name': 'assetsIn', 'type': 'address[]'}, {'internalType': 'uint256[]', 'name': 'amountsIn', 'type': 'uint256[]'}], 'name': 'addLiquidity', 'outputs': [{'internalType': 'address[]', 'name': 'shares', 'type': 'address[]'}, {'internalType': 'uint256[]', 'name': 'shareAmounts', 'type': 'uint256[]'}, {'internalType': 'address[]', 'name': 'liquidity', 'type': 'address[]'}, {'internalType': 'uint256[]', 'name': 'liquidityAmounts', 'type': 'uint256[]'}], 'stateMutability': 'payable', 'type': 'function'}, {'inputs': [{'internalType': 'enum IERC20DexModule.SwapKind', 'name': 'kind', 'type': 'uint8'}, {'components': [{'internalType': 'address', 'name': 'poolId', 'type': 'address'}, {'internalType': 'address', 'name': 'assetIn', 'type': 'address'}, {'internalType': 'uint256', 'name': 'amountIn', 'type': 'uint256'}, {'internalType': 'address', 'name': 'assetOut', 'type': 'address'}, {'internalType': 'uint256', 'name': 'amountOut', 'type': 'uint256'}, {'internalType': 'bytes', 'name': 'userData', 'type': 'bytes'}], 'internalType': 'struct IERC20DexModule.BatchSwapStep[]', 'name': 'swaps', 'type': 'tuple[]'}, {'internalType': 'uint256', 'name': 'deadline', 'type': 'uint256'}], 'name': 'batchSwap', 'outputs': [{'internalType': 'address[]', 'name': 'assets', 'type': 'address[]'}, {'internalType': 'uint256[]', 'name': 'amounts', 'type': 'uint256[]'}], 'stateMutability': 'payable', 'type': 'function'}, {'inputs': [{'internalType': 'string', 'name': 'name', 'type': 'string'}, {'internalType': 'address[]', 'name': 'assetsIn', 'type': 'address[]'}, {'internalType': 'uint256[]', 'name': 'amountsIn', 'type': 'uint256[]'}, {'internalType': 'string', 'name': 'poolType', 'type': 'string'}, {'components': [{'components': [{'internalType': 'address', 'name': 'asset', 'type': 'address'}, {'internalType': 'uint256', 'name': 'weight', 'type': 'uint256'}], 'internalType': 'struct IERC20DexModule.AssetWeight[]', 'name': 'weights', 'type': 'tuple[]'}, {'internalType': 'uint256', 'name': 'swapFee', 'type': 'uint256'}], 'internalType': 'struct IERC20DexModule.PoolOptions', 'name': 'options', 'type': 'tuple'}], 'name': 'createPool', 'outputs': [{'internalType': 'address', 'name': '', 'type': 'address'}], 'stateMutability': 'payable', 'type': 'function'}, {'inputs': [{'internalType': 'address', 'name': 'pool', 'type': 'address'}, {'internalType': 'address', 'name': 'baseAsset', 'type': 'address'}, {'internalType': 'address', 'name': 'quoteAsset', 'type': 'address'}], 'name': 'getExchangeRate', 'outputs': [{'internalType': 'uint256', 'name': '', 'type': 'uint256'}], 'stateMutability': 'view', 'type': 'function'}, {'inputs': [{'internalType': 'address', 'name': 'pool', 'type': 'address'}], 'name': 'getLiquidity', 'outputs': [{'internalType': 'address[]', 'name': 'asset', 'type': 'address[]'}, {'internalType': 'uint256[]', 'name': 'amounts', 'type': 'uint256[]'}], 'stateMutability': 'view', 'type': 'function'}, {'inputs': [{'internalType': 'address', 'name': 'pool', 'type': 'address'}], 'name': 'getPoolName', 'outputs': [{'internalType': 'string', 'name': '', 'type': 'string'}], 'stateMutability': 'view', 'type': 'function'}, {'inputs': [{'internalType': 'address', 'name': 'pool', 'type': 'address'}], 'name': 'getPoolOptions', 'outputs': [{'components': [{'components': [{'internalType': 'address', 'name': 'asset', 'type': 'address'}, {'internalType': 'uint256', 'name': 'weight', 'type': 'uint256'}], 'internalType': 'struct IERC20DexModule.AssetWeight[]', 'name': 'weights', 'type': 'tuple[]'}, {'internalType': 'uint256', 'name': 'swapFee', 'type': 'uint256'}], 'internalType': 'struct IERC20DexModule.PoolOptions', 'name': '', 'type': 'tuple'}], 'stateMutability': 'view', 'type': 'function'}, {'inputs': [{'internalType': 'address', 'name': 'pool', 'type': 'address'}, {'internalType': 'address[]', 'name': 'assets', 'type': 'address[]'}, {'internalType': 'uint256[]', 'name': 'amounts', 'type': 'uint256[]'}], 'name': 'getPreviewAddLiquidityNoSwap', 'outputs': [{'internalType': 'address[]', 'name': 'shares', 'type': 'address[]'}, {'internalType': 'uint256[]', 'name': 'shareAmounts', 'type': 'uint256[]'}, {'internalType': 'address[]', 'name': 'liqOut', 'type': 'address[]'}, {'internalType': 'uint256[]', 'name': 'liquidityAmounts', 'type': 'uint256[]'}], 'stateMutability': 'view', 'type': 'function'}, {'inputs': [{'internalType': 'address', 'name': 'pool', 'type': 'address'}, {'internalType': 'address[]', 'name': 'liquidity', 'type': 'address[]'}, {'internalType': 'uint256[]', 'name': 'amounts', 'type': 'uint256[]'}], 'name': 'getPreviewAddLiquidityStaticPrice', 'outputs': [{'internalType': 'address[]', 'name': 'shares', 'type': 'address[]'}, {'internalType': 'uint256[]', 'name': 'shareAmounts', 'type': 'uint256[]'}, {'internalType': 'address[]', 'name': 'liqOut', 'type': 'address[]'}, {'internalType': 'uint256[]', 'name': 'liquidityAmounts', 'type': 'uint256[]'}], 'stateMutability': 'view', 'type': 'function'}, {'inputs': [{'internalType': 'enum IERC20DexModule.SwapKind', 'name': 'kind', 'type': 'uint8'}, {'components': [{'internalType': 'address', 'name': 'poolId', 'type': 'address'}, {'internalType': 'address', 'name': 'assetIn', 'type': 'address'}, {'internalType': 'uint256', 'name': 'amountIn', 'type': 'uint256'}, {'internalType': 'address', 'name': 'assetOut', 'type': 'address'}, {'internalType': 'uint256', 'name': 'amountOut', 'type': 'uint256'}, {'internalType': 'bytes', 'name': 'userData', 'type': 'bytes'}], 'internalType': 'struct IERC20DexModule.BatchSwapStep[]', 'name': 'swaps', 'type': 'tuple[]'}], 'name': 'getPreviewBatchSwap', 'outputs': [{'internalType': 'address', 'name': 'asset', 'type': 'address'}, {'internalType': 'uint256', 'name': 'amount', 'type': 'uint256'}], 'stateMutability': 'view', 'type': 'function'}, {'inputs': [{'internalType': 'address', 'name': 'pool', 'type': 'address'}, {'internalType': 'address', 'name': 'asset', 'type': 'address'}, {'internalType': 'uint256', 'name': 'amount', 'type': 'uint256'}], 'name': 'getPreviewBurnShares', 'outputs': [{'internalType': 'address[]', 'name': 'assets', 'type': 'address[]'}, {'internalType': 'uint256[]', 'name': 'amounts', 'type': 'uint256[]'}], 'stateMutability': 'view', 'type': 'function'}, {'inputs': [{'internalType': 'address', 'name': 'pool', 'type': 'address'}, {'internalType': 'address[]', 'name': 'assets', 'type': 'address[]'}, {'internalType': 'uint256[]', 'name': 'amounts', 'type': 'uint256[]'}], 'name': 'getPreviewSharesForLiquidity', 'outputs': [{'internalType': 'address[]', 'name': 'shares', 'type': 'address[]'}, {'internalType': 'uint256[]', 'name': 'shareAmounts', 'type': 'uint256[]'}, {'internalType': 'address[]', 'name': 'liquidity', 'type': 'address[]'}, {'internalType': 'uint256[]', 'name': 'liquidityAmounts', 'type': 'uint256[]'}], 'stateMutability': 'view', 'type': 'function'}, {'inputs': [{'internalType': 'address', 'name': 'pool', 'type': 'address'}, {'internalType': 'address', 'name': 'asset', 'type': 'address'}, {'internalType': 'uint256', 'name': 'amount', 'type': 'uint256'}], 'name': 'getPreviewSharesForSingleSidedLiquidityRequest', 'outputs': [{'internalType': 'address[]', 'name': 'assets', 'type': 'address[]'}, {'internalType': 'uint256[]', 'name': 'amounts', 'type': 'uint256[]'}], 'stateMutability': 'view', 'type': 'function'}, {'inputs': [{'internalType': 'enum IERC20DexModule.SwapKind', 'name': 'kind', 'type': 'uint8'}, {'internalType': 'address', 'name': 'pool', 'type': 'address'}, {'internalType': 'address', 'name': 'baseAsset', 'type': 'address'}, {'internalType': 'uint256', 'name': 'baseAssetAmount', 'type': 'uint256'}, {'internalType': 'address', 'name': 'quoteAsset', 'type': 'address'}], 'name': 'getPreviewSwapExact', 'outputs': [{'internalType': 'address', 'name': 'asset', 'type': 'address'}, {'internalType': 'uint256', 'name': 'amount', 'type': 'uint256'}], 'stateMutability': 'view', 'type': 'function'}, {'inputs': [{'internalType': 'address', 'name': 'pool', 'type': 'address'}, {'internalType': 'address', 'name': 'assetIn', 'type': 'address'}, {'internalType': 'uint256', 'name': 'assetAmount', 'type': 'uint256'}], 'name': 'getRemoveLiquidityExactAmountOut', 'outputs': [{'internalType': 'address[]', 'name': 'assets', 'type': 'address[]'}, {'internalType': 'uint256[]', 'name': 'amounts', 'type': 'uint256[]'}], 'stateMutability': 'view', 'type': 'function'}, {'inputs': [{'internalType': 'address', 'name': 'pool', 'type': 'address'}, {'internalType': 'address', 'name': 'assetOut', 'type': 'address'}, {'internalType': 'uint256', 'name': 'sharesIn', 'type': 'uint256'}], 'name': 'getRemoveLiquidityOneSideOut', 'outputs': [{'internalType': 'address[]', 'name': 'assets', 'type': 'address[]'}, {'internalType': 'uint256[]', 'name': 'amounts', 'type': 'uint256[]'}], 'stateMutability': 'view', 'type': 'function'}, {'inputs': [{'internalType': 'address', 'name': 'pool', 'type': 'address'}], 'name': 'getTotalShares', 'outputs': [{'internalType': 'address[]', 'name': 'assets', 'type': 'address[]'}, {'internalType': 'uint256[]', 'name': 'amounts', 'type': 'uint256[]'}], 'stateMutability': 'view', 'type': 'function'}, {'inputs': [{'internalType': 'address', 'name': 'pool', 'type': 'address'}, {'internalType': 'address', 'name': 'withdrawAddress', 'type': 'address'}, {'internalType': 'address', 'name': 'assetIn', 'type': 'address'}, {'internalType': 'uint256', 'name': 'amountIn', 'type': 'uint256'}], 'name': 'removeLiquidityBurningShares', 'outputs': [{'internalType': 'address[]', 'name': 'liquidity', 'type': 'address[]'}, {'internalType': 'uint256[]', 'name': 'liquidityAmounts', 'type': 'uint256[]'}], 'stateMutability': 'payable', 'type': 'function'}, {'inputs': [{'internalType': 'address', 'name': 'pool', 'type': 'address'}, {'internalType': 'address', 'name': 'withdrawAddress', 'type': 'address'}, {'internalType': 'address', 'name': 'assetOut', 'type': 'address'}, {'internalType': 'uint256', 'name': 'amountOut', 'type': 'uint256'}, {'internalType': 'address', 'name': 'sharesIn', 'type': 'address'}, {'internalType': 'uint256', 'name': 'maxSharesIn', 'type': 'uint256'}], 'name': 'removeLiquidityExactAmount', 'outputs': [{'internalType': 'address[]', 'name': 'shares', 'type': 'address[]'}, {'internalType': 'uint256[]', 'name': 'shareAmounts', 'type': 'uint256[]'}, {'internalType': 'address[]', 'name': 'liquidity', 'type': 'address[]'}, {'internalType': 'uint256[]', 'name': 'liquidityAmounts', 'type': 'uint256[]'}], 'stateMutability': 'payable', 'type': 'function'}, {'inputs': [{'internalType': 'enum IERC20DexModule.SwapKind', 'name': 'kind', 'type': 'uint8'}, {'internalType': 'address', 'name': 'poolId', 'type': 'address'}, {'internalType': 'address', 'name': 'assetIn', 'type': 'address'}, {'internalType': 'uint256', 'name': 'amountIn', 'type': 'uint256'}, {'internalType': 'address', 'name': 'assetOut', 'type': 'address'}, {'internalType': 'uint256', 'name': 'amountOut', 'type': 'uint256'}, {'internalType': 'uint256', 'name': 'deadline', 'type': 'uint256'}], 'name': 'swap', 'outputs': [{'internalType': 'address[]', 'name': 'assets', 'type': 'address[]'}, {'internalType': 'uint256[]', 'name': 'amounts', 'type': 'uint256[]'}], 'stateMutability': 'payable', 'type': 'function'}]
}

HONEY_ABI = {
    'router': [{'inputs': [{'internalType': 'contract IERC20', 'name': '_honey', 'type': 'address'}], 'stateMutability': 'nonpayable', 'type': 'constructor'}, {'inputs': [], 'name': 'erc20Module', 'outputs': [{'internalType': 'contract IERC20Module', 'name': '', 'type': 'address'}], 'stateMutability': 'view', 'type': 'function'}, {'inputs': [{'internalType': 'string', 'name': 'amoType', 'type': 'string'}, {'internalType': 'address', 'name': 'amoAddr', 'type': 'address'}], 'name': 'getAMOCurrentLimit', 'outputs': [{'internalType': 'uint256', 'name': '', 'type': 'uint256'}], 'stateMutability': 'view', 'type': 'function'}, {'inputs': [], 'name': 'getExchangable', 'outputs': [{'components': [{'internalType': 'contract IERC20', 'name': 'collateral', 'type': 'address'}, {'internalType': 'bool', 'name': 'enabled', 'type': 'bool'}, {'internalType': 'uint256', 'name': 'mintRate', 'type': 'uint256'}, {'internalType': 'uint256', 'name': 'redemptionRate', 'type': 'uint256'}], 'internalType': 'struct ERC20Honey.ERC20Exchangable[]', 'name': '', 'type': 'tuple[]'}], 'stateMutability': 'nonpayable', 'type': 'function'}, {'inputs': [], 'name': 'getTotalCollateral', 'outputs': [{'internalType': 'address[]', 'name': '', 'type': 'address[]'}, {'internalType': 'uint256[]', 'name': '', 'type': 'uint256[]'}], 'stateMutability': 'view', 'type': 'function'}, {'inputs': [], 'name': 'getTotalSupply', 'outputs': [{'internalType': 'uint256', 'name': '', 'type': 'uint256'}], 'stateMutability': 'view', 'type': 'function'}, {'inputs': [], 'name': 'honey', 'outputs': [{'internalType': 'contract IERC20', 'name': '', 'type': 'address'}], 'stateMutability': 'view', 'type': 'function'}, {'inputs': [], 'name': 'honeyModule', 'outputs': [{'internalType': 'contract IHoneyModule', 'name': '', 'type': 'address'}], 'stateMutability': 'view', 'type': 'function'}, {'inputs': [{'internalType': 'address', 'name': 'to', 'type': 'address'}, {'internalType': 'contract IERC20', 'name': 'collateral', 'type': 'address'}, {'internalType': 'uint256', 'name': 'amount', 'type': 'uint256'}], 'name': 'mint', 'outputs': [{'internalType': 'uint256', 'name': '', 'type': 'uint256'}], 'stateMutability': 'nonpayable', 'type': 'function'}, {'inputs': [{'internalType': 'uint256', 'name': 'amountOut', 'type': 'uint256'}, {'internalType': 'address', 'name': 'assetOut', 'type': 'address'}], 'name': 'previewExactOutCollateral', 'outputs': [{'internalType': 'uint256', 'name': '', 'type': 'uint256'}], 'stateMutability': 'view', 'type': 'function'}, {'inputs': [{'internalType': 'contract IERC20', 'name': 'collateral', 'type': 'address'}, {'internalType': 'uint256', 'name': 'amount', 'type': 'uint256'}], 'name': 'previewMint', 'outputs': [{'internalType': 'uint256', 'name': '', 'type': 'uint256'}], 'stateMutability': 'view', 'type': 'function'}, {'inputs': [{'internalType': 'contract IERC20', 'name': 'collateral', 'type': 'address'}, {'internalType': 'uint256', 'name': 'amount', 'type': 'uint256'}], 'name': 'previewRedeem', 'outputs': [{'internalType': 'uint256', 'name': '', 'type': 'uint256'}], 'stateMutability': 'view', 'type': 'function'}, {'inputs': [{'internalType': 'uint256', 'name': 'honeyOut', 'type': 'uint256'}, {'internalType': 'address', 'name': 'assetIn', 'type': 'address'}], 'name': 'previewRequiredCollateral', 'outputs': [{'internalType': 'uint256', 'name': '', 'type': 'uint256'}], 'stateMutability': 'view', 'type': 'function'}, {'inputs': [{'internalType': 'address', 'name': 'to', 'type': 'address'}, {'internalType': 'uint256', 'name': 'amount', 'type': 'uint256'}, {'internalType': 'contract IERC20', 'name': 'collateral', 'type': 'address'}], 'name': 'redeem', 'outputs': [{'internalType': 'uint256', 'name': '', 'type': 'uint256'}], 'stateMutability': 'nonpayable', 'type': 'function'}]
}

HONEYJAR_ABI = {
    'router': [{'stateMutability': 'nonpayable', 'type': 'constructor', 'inputs': [{'name': 'allowlist_', 'internalType': 'bytes32', 'type': 'bytes32'}, {'name': 'name_', 'internalType': 'string', 'type': 'string'}, {'name': 'symbol_', 'internalType': 'string', 'type': 'string'}, {'name': 'paymentToken_', 'internalType': 'contract IERC20', 'type': 'address'}, {'name': 'mintCost_', 'internalType': 'struct Ticket.MintCost', 'type': 'tuple', 'components': [{'name': 'native', 'internalType': 'uint256', 'type': 'uint256'}, {'name': 'erc20', 'internalType': 'uint256', 'type': 'uint256'}]}]}, {'type': 'error', 'inputs': [], 'name': 'AccountBalanceOverflow'}, {'type': 'error', 'inputs': [], 'name': 'AlreadyClaimed'}, {'type': 'error', 'inputs': [], 'name': 'BalanceQueryForZeroAddress'}, {'type': 'error', 'inputs': [], 'name': 'InvalidProof'}, {'type': 'error', 'inputs': [], 'name': 'NotOwnerNorApproved'}, {'type': 'error', 'inputs': [{'name': 'owner', 'internalType': 'address', 'type': 'address'}], 'name': 'OwnableInvalidOwner'}, {'type': 'error', 'inputs': [{'name': 'account', 'internalType': 'address', 'type': 'address'}], 'name': 'OwnableUnauthorizedAccount'}, {'type': 'error', 'inputs': [], 'name': 'TokenAlreadyExists'}, {'type': 'error', 'inputs': [], 'name': 'TokenDoesNotExist'}, {'type': 'error', 'inputs': [], 'name': 'TransferFromIncorrectOwner'}, {'type': 'error', 'inputs': [], 'name': 'TransferToNonERC721ReceiverImplementer'}, {'type': 'error', 'inputs': [], 'name': 'TransferToZeroAddress'}, {'type': 'error', 'inputs': [], 'name': 'URIQueryForNonexistentToken'}, {'type': 'event', 'inputs': [{'name': 'owner', 'internalType': 'address', 'type': 'address'}, {'name': 'account', 'internalType': 'address', 'type': 'address'}, {'name': 'id', 'internalType': 'uint256', 'type': 'uint256'}], 'name': 'Approval'}, {'type': 'event', 'inputs': [{'name': 'owner', 'internalType': 'address', 'type': 'address'}, {'name': 'operator', 'internalType': 'address', 'type': 'address'}, {'name': 'isApproved', 'internalType': 'bool', 'type': 'bool'}], 'name': 'ApprovalForAll'}, {'type': 'event', 'inputs': [{'name': 'uri', 'internalType': 'string', 'type': 'string'}], 'name': 'BaseURISet'}, {'type': 'event', 'inputs': [{'name': 'user', 'internalType': 'address', 'type': 'address'}, {'name': 'root', 'internalType': 'bytes32', 'type': 'bytes32'}, {'name': 'index', 'internalType': 'uint256', 'type': 'uint256'}], 'name': 'Claimed'}, {'type': 'event', 'inputs': [{'name': 'previousOwner', 'internalType': 'address', 'type': 'address'}, {'name': 'newOwner', 'internalType': 'address', 'type': 'address'}], 'name': 'OwnershipTransferred'}, {'type': 'event', 'inputs': [{'name': 'generated', 'internalType': 'bool', 'type': 'bool'}], 'name': 'SetGenerated'}, {'type': 'event', 'inputs': [{'name': 'from', 'internalType': 'address', 'type': 'address'}, {'name': 'to', 'internalType': 'address', 'type': 'address'}, {'name': 'id', 'internalType': 'uint256', 'type': 'uint256'}], 'name': 'Transfer'}, {'stateMutability': 'view', 'type': 'function', 'inputs': [], 'name': 'allowlist', 'outputs': [{'name': '', 'internalType': 'bytes32', 'type': 'bytes32'}]}, {'stateMutability': 'payable', 'type': 'function', 'inputs': [{'name': 'account', 'internalType': 'address', 'type': 'address'}, {'name': 'id', 'internalType': 'uint256', 'type': 'uint256'}], 'name': 'approve', 'outputs': []}, {'stateMutability': 'view', 'type': 'function', 'inputs': [{'name': 'owner', 'internalType': 'address', 'type': 'address'}], 'name': 'balanceOf', 'outputs': [{'name': 'result', 'internalType': 'uint256', 'type': 'uint256'}]}, {'stateMutability': 'payable', 'type': 'function', 'inputs': [], 'name': 'buy', 'outputs': []}, {'stateMutability': 'payable', 'type': 'function', 'inputs': [{'name': 'index_', 'internalType': 'uint256', 'type': 'uint256'}, {'name': 'proof_', 'internalType': 'bytes32[]', 'type': 'bytes32[]'}], 'name': 'claim', 'outputs': []}, {'stateMutability': 'view', 'type': 'function', 'inputs': [], 'name': 'claimAmount', 'outputs': [{'name': '', 'internalType': 'uint256', 'type': 'uint256'}]}, {'stateMutability': 'view', 'type': 'function', 'inputs': [{'name': 'index_', 'internalType': 'uint256', 'type': 'uint256'}], 'name': 'claimed', 'outputs': [{'name': '', 'internalType': 'bool', 'type': 'bool'}]}, {'stateMutability': 'view', 'type': 'function', 'inputs': [{'name': 'id', 'internalType': 'uint256', 'type': 'uint256'}], 'name': 'getApproved', 'outputs': [{'name': 'result', 'internalType': 'address', 'type': 'address'}]}, {'stateMutability': 'view', 'type': 'function', 'inputs': [{'name': '', 'internalType': 'address', 'type': 'address'}], 'name': 'hasMinted', 'outputs': [{'name': '', 'internalType': 'bool', 'type': 'bool'}]}, {'stateMutability': 'view', 'type': 'function', 'inputs': [{'name': 'owner', 'internalType': 'address', 'type': 'address'}, {'name': 'operator', 'internalType': 'address', 'type': 'address'}], 'name': 'isApprovedForAll', 'outputs': [{'name': 'result', 'internalType': 'bool', 'type': 'bool'}]}, {'stateMutability': 'view', 'type': 'function', 'inputs': [], 'name': 'isGenerated', 'outputs': [{'name': '', 'internalType': 'bool', 'type': 'bool'}]}, {'stateMutability': 'view', 'type': 'function', 'inputs': [], 'name': 'mintCost', 'outputs': [{'name': 'native', 'internalType': 'uint256', 'type': 'uint256'}, {'name': 'erc20', 'internalType': 'uint256', 'type': 'uint256'}]}, {'stateMutability': 'view', 'type': 'function', 'inputs': [], 'name': 'name', 'outputs': [{'name': '', 'internalType': 'string', 'type': 'string'}]}, {'stateMutability': 'view', 'type': 'function', 'inputs': [], 'name': 'owner', 'outputs': [{'name': '', 'internalType': 'address', 'type': 'address'}]}, {'stateMutability': 'view', 'type': 'function', 'inputs': [{'name': 'id', 'internalType': 'uint256', 'type': 'uint256'}], 'name': 'ownerOf', 'outputs': [{'name': 'result', 'internalType': 'address', 'type': 'address'}]}, {'stateMutability': 'view', 'type': 'function', 'inputs': [], 'name': 'paymentToken', 'outputs': [{'name': '', 'internalType': 'contract IERC20', 'type': 'address'}]}, {'stateMutability': 'view', 'type': 'function', 'inputs': [], 'name': 'realOwner', 'outputs': [{'name': '', 'internalType': 'address', 'type': 'address'}]}, {'stateMutability': 'nonpayable', 'type': 'function', 'inputs': [], 'name': 'renounceOwnership', 'outputs': []}, {'stateMutability': 'payable', 'type': 'function', 'inputs': [{'name': 'from', 'internalType': 'address', 'type': 'address'}, {'name': 'to', 'internalType': 'address', 'type': 'address'}, {'name': 'id', 'internalType': 'uint256', 'type': 'uint256'}], 'name': 'safeTransferFrom', 'outputs': []}, {'stateMutability': 'payable', 'type': 'function', 'inputs': [{'name': 'from', 'internalType': 'address', 'type': 'address'}, {'name': 'to', 'internalType': 'address', 'type': 'address'}, {'name': 'id', 'internalType': 'uint256', 'type': 'uint256'}, {'name': 'data', 'internalType': 'bytes', 'type': 'bytes'}], 'name': 'safeTransferFrom', 'outputs': []}, {'stateMutability': 'nonpayable', 'type': 'function', 'inputs': [{'name': 'allowlist_', 'internalType': 'bytes32', 'type': 'bytes32'}], 'name': 'setAllowList', 'outputs': []}, {'stateMutability': 'nonpayable', 'type': 'function', 'inputs': [{'name': 'operator', 'internalType': 'address', 'type': 'address'}, {'name': 'isApproved', 'internalType': 'bool', 'type': 'bool'}], 'name': 'setApprovalForAll', 'outputs': []}, {'stateMutability': 'nonpayable', 'type': 'function', 'inputs': [{'name': 'baseURI_', 'internalType': 'string', 'type': 'string'}], 'name': 'setBaseURI', 'outputs': []}, {'stateMutability': 'nonpayable', 'type': 'function', 'inputs': [{'name': 'claimAmount_', 'internalType': 'uint256', 'type': 'uint256'}], 'name': 'setClaimAmount', 'outputs': []}, {'stateMutability': 'nonpayable', 'type': 'function', 'inputs': [{'name': 'generated_', 'internalType': 'bool', 'type': 'bool'}], 'name': 'setGenerated', 'outputs': []}, {'stateMutability': 'nonpayable', 'type': 'function', 'inputs': [{'name': 'mintCost_', 'internalType': 'struct Ticket.MintCost', 'type': 'tuple', 'components': [{'name': 'native', 'internalType': 'uint256', 'type': 'uint256'}, {'name': 'erc20', 'internalType': 'uint256', 'type': 'uint256'}]}], 'name': 'setMintCost', 'outputs': []}, {'stateMutability': 'nonpayable', 'type': 'function', 'inputs': [{'name': 'paymentToken_', 'internalType': 'contract IERC20', 'type': 'address'}], 'name': 'setPaymentToken', 'outputs': []}, {'stateMutability': 'view', 'type': 'function', 'inputs': [{'name': 'interfaceId', 'internalType': 'bytes4', 'type': 'bytes4'}], 'name': 'supportsInterface', 'outputs': [{'name': 'result', 'internalType': 'bool', 'type': 'bool'}]}, {'stateMutability': 'view', 'type': 'function', 'inputs': [], 'name': 'symbol', 'outputs': [{'name': '', 'internalType': 'string', 'type': 'string'}]}, {'stateMutability': 'view', 'type': 'function', 'inputs': [{'name': 'tokenId', 'internalType': 'uint256', 'type': 'uint256'}], 'name': 'tokenURI', 'outputs': [{'name': '', 'internalType': 'string', 'type': 'string'}]}, {'stateMutability': 'payable', 'type': 'function', 'inputs': [{'name': 'from', 'internalType': 'address', 'type': 'address'}, {'name': 'to', 'internalType': 'address', 'type': 'address'}, {'name': 'id', 'internalType': 'uint256', 'type': 'uint256'}], 'name': 'transferFrom', 'outputs': []}, {'stateMutability': 'nonpayable', 'type': 'function', 'inputs': [{'name': 'newOwner', 'internalType': 'address', 'type': 'address'}], 'name': 'transferLowerOwnership', 'outputs': []}, {'stateMutability': 'nonpayable', 'type': 'function', 'inputs': [{'name': 'newOwner', 'internalType': 'address', 'type': 'address'}], 'name': 'transferOwnership', 'outputs': []}, {'stateMutability': 'nonpayable', 'type': 'function', 'inputs': [{'name': 'newRealOwner', 'internalType': 'address', 'type': 'address'}], 'name': 'transferRealOwnership', 'outputs': []}, {'stateMutability': 'nonpayable', 'type': 'function', 'inputs': [], 'name': 'withdraw', 'outputs': []}, {'stateMutability': 'payable', 'type': 'receive'}]
}

BEND_ABI = {
    'router': [{'inputs': [{'internalType': 'contract IPoolAddressesProvider', 'name': 'provider', 'type': 'address'}], 'stateMutability': 'nonpayable', 'type': 'constructor'}, {'inputs': [{'internalType': 'address', 'name': 'reserve', 'type': 'address'}, {'internalType': 'address', 'name': 'backer', 'type': 'address'}, {'internalType': 'uint256', 'name': 'amount', 'type': 'uint256'}, {'internalType': 'uint256', 'name': 'fee', 'type': 'uint256'}], 'name': 'BackUnbacked', 'type': 'event'}, {'inputs': [{'internalType': 'address', 'name': 'reserve', 'type': 'address'}, {'internalType': 'address', 'name': 'user', 'type': 'address'}, {'internalType': 'address', 'name': 'onBehalfOf', 'type': 'address'}, {'internalType': 'uint256', 'name': 'amount', 'type': 'uint256'}, {'internalType': 'enum DataTypes.InterestRateMode', 'name': 'interestRateMode', 'type': 'uint8'}, {'internalType': 'uint256', 'name': 'borrowRate', 'type': 'uint256'}, {'internalType': 'uint16', 'name': 'referralCode', 'type': 'uint16'}], 'name': 'Borrow', 'type': 'event'}, {'inputs': [{'internalType': 'address', 'name': 'target', 'type': 'address'}, {'internalType': 'address', 'name': 'initiator', 'type': 'address'}, {'internalType': 'address', 'name': 'asset', 'type': 'address'}, {'internalType': 'uint256', 'name': 'amount', 'type': 'uint256'}, {'internalType': 'enum DataTypes.InterestRateMode', 'name': 'interestRateMode', 'type': 'uint8'}, {'internalType': 'uint256', 'name': 'premium', 'type': 'uint256'}, {'internalType': 'uint16', 'name': 'referralCode', 'type': 'uint16'}], 'name': 'FlashLoan', 'type': 'event'}, {'inputs': [{'internalType': 'address', 'name': 'asset', 'type': 'address'}, {'internalType': 'uint256', 'name': 'totalDebt', 'type': 'uint256'}], 'name': 'IsolationModeTotalDebtUpdated', 'type': 'event'}, {'inputs': [{'internalType': 'address', 'name': 'collateralAsset', 'type': 'address'}, {'internalType': 'address', 'name': 'debtAsset', 'type': 'address'}, {'internalType': 'address', 'name': 'user', 'type': 'address'}, {'internalType': 'uint256', 'name': 'debtToCover', 'type': 'uint256'}, {'internalType': 'uint256', 'name': 'liquidatedCollateralAmount', 'type': 'uint256'}, {'internalType': 'address', 'name': 'liquidator', 'type': 'address'}, {'internalType': 'bool', 'name': 'receiveAToken', 'type': 'bool'}], 'name': 'LiquidationCall', 'type': 'event'}, {'inputs': [{'internalType': 'address', 'name': 'reserve', 'type': 'address'}, {'internalType': 'address', 'name': 'user', 'type': 'address'}, {'internalType': 'address', 'name': 'onBehalfOf', 'type': 'address'}, {'internalType': 'uint256', 'name': 'amount', 'type': 'uint256'}, {'internalType': 'uint16', 'name': 'referralCode', 'type': 'uint16'}], 'name': 'MintUnbacked', 'type': 'event'}, {'inputs': [{'internalType': 'address', 'name': 'reserve', 'type': 'address'}, {'internalType': 'uint256', 'name': 'amountMinted', 'type': 'uint256'}], 'name': 'MintedToTreasury', 'type': 'event'}, {'inputs': [{'internalType': 'address', 'name': 'reserve', 'type': 'address'}, {'internalType': 'address', 'name': 'user', 'type': 'address'}], 'name': 'RebalanceStableBorrowRate', 'type': 'event'}, {'inputs': [{'internalType': 'address', 'name': 'reserve', 'type': 'address'}, {'internalType': 'address', 'name': 'user', 'type': 'address'}, {'internalType': 'address', 'name': 'repayer', 'type': 'address'}, {'internalType': 'uint256', 'name': 'amount', 'type': 'uint256'}, {'internalType': 'bool', 'name': 'useATokens', 'type': 'bool'}], 'name': 'Repay', 'type': 'event'}, {'inputs': [{'internalType': 'address', 'name': 'reserve', 'type': 'address'}, {'internalType': 'uint256', 'name': 'liquidityRate', 'type': 'uint256'}, {'internalType': 'uint256', 'name': 'stableBorrowRate', 'type': 'uint256'}, {'internalType': 'uint256', 'name': 'variableBorrowRate', 'type': 'uint256'}, {'internalType': 'uint256', 'name': 'liquidityIndex', 'type': 'uint256'}, {'internalType': 'uint256', 'name': 'variableBorrowIndex', 'type': 'uint256'}], 'name': 'ReserveDataUpdated', 'type': 'event'}, {'inputs': [{'internalType': 'address', 'name': 'reserve', 'type': 'address'}, {'internalType': 'address', 'name': 'user', 'type': 'address'}], 'name': 'ReserveUsedAsCollateralDisabled', 'type': 'event'}, {'inputs': [{'internalType': 'address', 'name': 'reserve', 'type': 'address'}, {'internalType': 'address', 'name': 'user', 'type': 'address'}], 'name': 'ReserveUsedAsCollateralEnabled', 'type': 'event'}, {'inputs': [{'internalType': 'address', 'name': 'reserve', 'type': 'address'}, {'internalType': 'address', 'name': 'user', 'type': 'address'}, {'internalType': 'address', 'name': 'onBehalfOf', 'type': 'address'}, {'internalType': 'uint256', 'name': 'amount', 'type': 'uint256'}, {'internalType': 'uint16', 'name': 'referralCode', 'type': 'uint16'}], 'name': 'Supply', 'type': 'event'}, {'inputs': [{'internalType': 'address', 'name': 'reserve', 'type': 'address'}, {'internalType': 'address', 'name': 'user', 'type': 'address'}, {'internalType': 'enum DataTypes.InterestRateMode', 'name': 'interestRateMode', 'type': 'uint8'}], 'name': 'SwapBorrowRateMode', 'type': 'event'}, {'inputs': [{'internalType': 'address', 'name': 'user', 'type': 'address'}, {'internalType': 'uint8', 'name': 'categoryId', 'type': 'uint8'}], 'name': 'UserEModeSet', 'type': 'event'}, {'inputs': [{'internalType': 'address', 'name': 'reserve', 'type': 'address'}, {'internalType': 'address', 'name': 'user', 'type': 'address'}, {'internalType': 'address', 'name': 'to', 'type': 'address'}, {'internalType': 'uint256', 'name': 'amount', 'type': 'uint256'}], 'name': 'Withdraw', 'type': 'event'}, {'inputs': [], 'name': 'ADDRESSES_PROVIDER', 'outputs': [{'internalType': 'contract IPoolAddressesProvider', 'name': '', 'type': 'address'}], 'stateMutability': 'view', 'type': 'function'}, {'inputs': [], 'name': 'BRIDGE_PROTOCOL_FEE', 'outputs': [{'internalType': 'uint256', 'name': '', 'type': 'uint256'}], 'stateMutability': 'view', 'type': 'function'}, {'inputs': [], 'name': 'FLASHLOAN_PREMIUM_TOTAL', 'outputs': [{'internalType': 'uint128', 'name': '', 'type': 'uint128'}], 'stateMutability': 'view', 'type': 'function'}, {'inputs': [], 'name': 'FLASHLOAN_PREMIUM_TO_PROTOCOL', 'outputs': [{'internalType': 'uint128', 'name': '', 'type': 'uint128'}], 'stateMutability': 'view', 'type': 'function'}, {'inputs': [], 'name': 'MAX_NUMBER_RESERVES', 'outputs': [{'internalType': 'uint16', 'name': '', 'type': 'uint16'}], 'stateMutability': 'view', 'type': 'function'}, {'inputs': [], 'name': 'MAX_STABLE_RATE_BORROW_SIZE_PERCENT', 'outputs': [{'internalType': 'uint256', 'name': '', 'type': 'uint256'}], 'stateMutability': 'view', 'type': 'function'}, {'inputs': [], 'name': 'POOL_REVISION', 'outputs': [{'internalType': 'uint256', 'name': '', 'type': 'uint256'}], 'stateMutability': 'view', 'type': 'function'}, {'inputs': [{'internalType': 'address', 'name': 'asset', 'type': 'address'}, {'internalType': 'uint256', 'name': 'amount', 'type': 'uint256'}, {'internalType': 'uint256', 'name': 'fee', 'type': 'uint256'}], 'name': 'backUnbacked', 'outputs': [{'internalType': 'uint256', 'name': '', 'type': 'uint256'}], 'stateMutability': 'nonpayable', 'type': 'function'}, {'inputs': [{'internalType': 'address', 'name': 'asset', 'type': 'address'}, {'internalType': 'uint256', 'name': 'amount', 'type': 'uint256'}, {'internalType': 'uint256', 'name': 'interestRateMode', 'type': 'uint256'}, {'internalType': 'uint16', 'name': 'referralCode', 'type': 'uint16'}, {'internalType': 'address', 'name': 'onBehalfOf', 'type': 'address'}], 'name': 'borrow', 'outputs': [], 'stateMutability': 'nonpayable', 'type': 'function'}, {'inputs': [{'internalType': 'uint8', 'name': 'id', 'type': 'uint8'}, {'components': [{'internalType': 'uint16', 'name': 'ltv', 'type': 'uint16'}, {'internalType': 'uint16', 'name': 'liquidationThreshold', 'type': 'uint16'}, {'internalType': 'uint16', 'name': 'liquidationBonus', 'type': 'uint16'}, {'internalType': 'address', 'name': 'priceSource', 'type': 'address'}, {'internalType': 'string', 'name': 'label', 'type': 'string'}], 'internalType': 'struct DataTypes.EModeCategory', 'name': 'category', 'type': 'tuple'}], 'name': 'configureEModeCategory', 'outputs': [], 'stateMutability': 'nonpayable', 'type': 'function'}, {'inputs': [{'internalType': 'address', 'name': 'asset', 'type': 'address'}, {'internalType': 'uint256', 'name': 'amount', 'type': 'uint256'}, {'internalType': 'address', 'name': 'onBehalfOf', 'type': 'address'}, {'internalType': 'uint16', 'name': 'referralCode', 'type': 'uint16'}], 'name': 'deposit', 'outputs': [], 'stateMutability': 'nonpayable', 'type': 'function'}, {'inputs': [{'internalType': 'address', 'name': 'asset', 'type': 'address'}], 'name': 'dropReserve', 'outputs': [], 'stateMutability': 'nonpayable', 'type': 'function'}, {'inputs': [{'internalType': 'address', 'name': 'asset', 'type': 'address'}, {'internalType': 'address', 'name': 'from', 'type': 'address'}, {'internalType': 'address', 'name': 'to', 'type': 'address'}, {'internalType': 'uint256', 'name': 'amount', 'type': 'uint256'}, {'internalType': 'uint256', 'name': 'balanceFromBefore', 'type': 'uint256'}, {'internalType': 'uint256', 'name': 'balanceToBefore', 'type': 'uint256'}], 'name': 'finalizeTransfer', 'outputs': [], 'stateMutability': 'nonpayable', 'type': 'function'}, {'inputs': [{'internalType': 'address', 'name': 'receiverAddress', 'type': 'address'}, {'internalType': 'address[]', 'name': 'assets', 'type': 'address[]'}, {'internalType': 'uint256[]', 'name': 'amounts', 'type': 'uint256[]'}, {'internalType': 'uint256[]', 'name': 'interestRateModes', 'type': 'uint256[]'}, {'internalType': 'address', 'name': 'onBehalfOf', 'type': 'address'}, {'internalType': 'bytes', 'name': 'params', 'type': 'bytes'}, {'internalType': 'uint16', 'name': 'referralCode', 'type': 'uint16'}], 'name': 'flashLoan', 'outputs': [], 'stateMutability': 'nonpayable', 'type': 'function'}, {'inputs': [{'internalType': 'address', 'name': 'receiverAddress', 'type': 'address'}, {'internalType': 'address', 'name': 'asset', 'type': 'address'}, {'internalType': 'uint256', 'name': 'amount', 'type': 'uint256'}, {'internalType': 'bytes', 'name': 'params', 'type': 'bytes'}, {'internalType': 'uint16', 'name': 'referralCode', 'type': 'uint16'}], 'name': 'flashLoanSimple', 'outputs': [], 'stateMutability': 'nonpayable', 'type': 'function'}, {'inputs': [{'internalType': 'address', 'name': 'asset', 'type': 'address'}], 'name': 'getConfiguration', 'outputs': [{'components': [{'internalType': 'uint256', 'name': 'data', 'type': 'uint256'}], 'internalType': 'struct DataTypes.ReserveConfigurationMap', 'name': '', 'type': 'tuple'}], 'stateMutability': 'view', 'type': 'function'}, {'inputs': [{'internalType': 'uint8', 'name': 'id', 'type': 'uint8'}], 'name': 'getEModeCategoryData', 'outputs': [{'components': [{'internalType': 'uint16', 'name': 'ltv', 'type': 'uint16'}, {'internalType': 'uint16', 'name': 'liquidationThreshold', 'type': 'uint16'}, {'internalType': 'uint16', 'name': 'liquidationBonus', 'type': 'uint16'}, {'internalType': 'address', 'name': 'priceSource', 'type': 'address'}, {'internalType': 'string', 'name': 'label', 'type': 'string'}], 'internalType': 'struct DataTypes.EModeCategory', 'name': '', 'type': 'tuple'}], 'stateMutability': 'view', 'type': 'function'}, {'inputs': [{'internalType': 'uint16', 'name': 'id', 'type': 'uint16'}], 'name': 'getReserveAddressById', 'outputs': [{'internalType': 'address', 'name': '', 'type': 'address'}], 'stateMutability': 'view', 'type': 'function'}, {'inputs': [{'internalType': 'address', 'name': 'asset', 'type': 'address'}], 'name': 'getReserveData', 'outputs': [{'components': [{'components': [{'internalType': 'uint256', 'name': 'data', 'type': 'uint256'}], 'internalType': 'struct DataTypes.ReserveConfigurationMap', 'name': 'configuration', 'type': 'tuple'}, {'internalType': 'uint128', 'name': 'liquidityIndex', 'type': 'uint128'}, {'internalType': 'uint128', 'name': 'currentLiquidityRate', 'type': 'uint128'}, {'internalType': 'uint128', 'name': 'variableBorrowIndex', 'type': 'uint128'}, {'internalType': 'uint128', 'name': 'currentVariableBorrowRate', 'type': 'uint128'}, {'internalType': 'uint128', 'name': 'currentStableBorrowRate', 'type': 'uint128'}, {'internalType': 'uint40', 'name': 'lastUpdateTimestamp', 'type': 'uint40'}, {'internalType': 'uint16', 'name': 'id', 'type': 'uint16'}, {'internalType': 'address', 'name': 'aTokenAddress', 'type': 'address'}, {'internalType': 'address', 'name': 'stableDebtTokenAddress', 'type': 'address'}, {'internalType': 'address', 'name': 'variableDebtTokenAddress', 'type': 'address'}, {'internalType': 'address', 'name': 'interestRateStrategyAddress', 'type': 'address'}, {'internalType': 'uint128', 'name': 'accruedToTreasury', 'type': 'uint128'}, {'internalType': 'uint128', 'name': 'unbacked', 'type': 'uint128'}, {'internalType': 'uint128', 'name': 'isolationModeTotalDebt', 'type': 'uint128'}], 'internalType': 'struct DataTypes.ReserveData', 'name': '', 'type': 'tuple'}], 'stateMutability': 'view', 'type': 'function'}, {'inputs': [{'internalType': 'address', 'name': 'asset', 'type': 'address'}], 'name': 'getReserveNormalizedIncome', 'outputs': [{'internalType': 'uint256', 'name': '', 'type': 'uint256'}], 'stateMutability': 'view', 'type': 'function'}, {'inputs': [{'internalType': 'address', 'name': 'asset', 'type': 'address'}], 'name': 'getReserveNormalizedVariableDebt', 'outputs': [{'internalType': 'uint256', 'name': '', 'type': 'uint256'}], 'stateMutability': 'view', 'type': 'function'}, {'inputs': [], 'name': 'getReservesList', 'outputs': [{'internalType': 'address[]', 'name': '', 'type': 'address[]'}], 'stateMutability': 'view', 'type': 'function'}, {'inputs': [{'internalType': 'address', 'name': 'user', 'type': 'address'}], 'name': 'getUserAccountData', 'outputs': [{'internalType': 'uint256', 'name': 'totalCollateralBase', 'type': 'uint256'}, {'internalType': 'uint256', 'name': 'totalDebtBase', 'type': 'uint256'}, {'internalType': 'uint256', 'name': 'availableBorrowsBase', 'type': 'uint256'}, {'internalType': 'uint256', 'name': 'currentLiquidationThreshold', 'type': 'uint256'}, {'internalType': 'uint256', 'name': 'ltv', 'type': 'uint256'}, {'internalType': 'uint256', 'name': 'healthFactor', 'type': 'uint256'}], 'stateMutability': 'view', 'type': 'function'}, {'inputs': [{'internalType': 'address', 'name': 'user', 'type': 'address'}], 'name': 'getUserConfiguration', 'outputs': [{'components': [{'internalType': 'uint256', 'name': 'data', 'type': 'uint256'}], 'internalType': 'struct DataTypes.UserConfigurationMap', 'name': '', 'type': 'tuple'}], 'stateMutability': 'view', 'type': 'function'}, {'inputs': [{'internalType': 'address', 'name': 'user', 'type': 'address'}], 'name': 'getUserEMode', 'outputs': [{'internalType': 'uint256', 'name': '', 'type': 'uint256'}], 'stateMutability': 'view', 'type': 'function'}, {'inputs': [{'internalType': 'address', 'name': 'asset', 'type': 'address'}, {'internalType': 'address', 'name': 'aTokenAddress', 'type': 'address'}, {'internalType': 'address', 'name': 'stableDebtAddress', 'type': 'address'}, {'internalType': 'address', 'name': 'variableDebtAddress', 'type': 'address'}, {'internalType': 'address', 'name': 'interestRateStrategyAddress', 'type': 'address'}], 'name': 'initReserve', 'outputs': [], 'stateMutability': 'nonpayable', 'type': 'function'}, {'inputs': [{'internalType': 'contract IPoolAddressesProvider', 'name': 'provider', 'type': 'address'}], 'name': 'initialize', 'outputs': [], 'stateMutability': 'nonpayable', 'type': 'function'}, {'inputs': [{'internalType': 'address', 'name': 'collateralAsset', 'type': 'address'}, {'internalType': 'address', 'name': 'debtAsset', 'type': 'address'}, {'internalType': 'address', 'name': 'user', 'type': 'address'}, {'internalType': 'uint256', 'name': 'debtToCover', 'type': 'uint256'}, {'internalType': 'bool', 'name': 'receiveAToken', 'type': 'bool'}], 'name': 'liquidationCall', 'outputs': [], 'stateMutability': 'nonpayable', 'type': 'function'}, {'inputs': [{'internalType': 'address[]', 'name': 'assets', 'type': 'address[]'}], 'name': 'mintToTreasury', 'outputs': [], 'stateMutability': 'nonpayable', 'type': 'function'}, {'inputs': [{'internalType': 'address', 'name': 'asset', 'type': 'address'}, {'internalType': 'uint256', 'name': 'amount', 'type': 'uint256'}, {'internalType': 'address', 'name': 'onBehalfOf', 'type': 'address'}, {'internalType': 'uint16', 'name': 'referralCode', 'type': 'uint16'}], 'name': 'mintUnbacked', 'outputs': [], 'stateMutability': 'nonpayable', 'type': 'function'}, {'inputs': [{'internalType': 'address', 'name': 'asset', 'type': 'address'}, {'internalType': 'address', 'name': 'user', 'type': 'address'}], 'name': 'rebalanceStableBorrowRate', 'outputs': [], 'stateMutability': 'nonpayable', 'type': 'function'}, {'inputs': [{'internalType': 'address', 'name': 'asset', 'type': 'address'}, {'internalType': 'uint256', 'name': 'amount', 'type': 'uint256'}, {'internalType': 'uint256', 'name': 'interestRateMode', 'type': 'uint256'}, {'internalType': 'address', 'name': 'onBehalfOf', 'type': 'address'}], 'name': 'repay', 'outputs': [{'internalType': 'uint256', 'name': '', 'type': 'uint256'}], 'stateMutability': 'nonpayable', 'type': 'function'}, {'inputs': [{'internalType': 'address', 'name': 'asset', 'type': 'address'}, {'internalType': 'uint256', 'name': 'amount', 'type': 'uint256'}, {'internalType': 'uint256', 'name': 'interestRateMode', 'type': 'uint256'}], 'name': 'repayWithATokens', 'outputs': [{'internalType': 'uint256', 'name': '', 'type': 'uint256'}], 'stateMutability': 'nonpayable', 'type': 'function'}, {'inputs': [{'internalType': 'address', 'name': 'asset', 'type': 'address'}, {'internalType': 'uint256', 'name': 'amount', 'type': 'uint256'}, {'internalType': 'uint256', 'name': 'interestRateMode', 'type': 'uint256'}, {'internalType': 'address', 'name': 'onBehalfOf', 'type': 'address'}, {'internalType': 'uint256', 'name': 'deadline', 'type': 'uint256'}, {'internalType': 'uint8', 'name': 'permitV', 'type': 'uint8'}, {'internalType': 'bytes32', 'name': 'permitR', 'type': 'bytes32'}, {'internalType': 'bytes32', 'name': 'permitS', 'type': 'bytes32'}], 'name': 'repayWithPermit', 'outputs': [{'internalType': 'uint256', 'name': '', 'type': 'uint256'}], 'stateMutability': 'nonpayable', 'type': 'function'}, {'inputs': [{'internalType': 'address', 'name': 'token', 'type': 'address'}, {'internalType': 'address', 'name': 'to', 'type': 'address'}, {'internalType': 'uint256', 'name': 'amount', 'type': 'uint256'}], 'name': 'rescueTokens', 'outputs': [], 'stateMutability': 'nonpayable', 'type': 'function'}, {'inputs': [{'internalType': 'address', 'name': 'asset', 'type': 'address'}], 'name': 'resetIsolationModeTotalDebt', 'outputs': [], 'stateMutability': 'nonpayable', 'type': 'function'}, {'inputs': [{'internalType': 'address', 'name': 'asset', 'type': 'address'}, {'components': [{'internalType': 'uint256', 'name': 'data', 'type': 'uint256'}], 'internalType': 'struct DataTypes.ReserveConfigurationMap', 'name': 'configuration', 'type': 'tuple'}], 'name': 'setConfiguration', 'outputs': [], 'stateMutability': 'nonpayable', 'type': 'function'}, {'inputs': [{'internalType': 'address', 'name': 'asset', 'type': 'address'}, {'internalType': 'address', 'name': 'rateStrategyAddress', 'type': 'address'}], 'name': 'setReserveInterestRateStrategyAddress', 'outputs': [], 'stateMutability': 'nonpayable', 'type': 'function'}, {'inputs': [{'internalType': 'uint8', 'name': 'categoryId', 'type': 'uint8'}], 'name': 'setUserEMode', 'outputs': [], 'stateMutability': 'nonpayable', 'type': 'function'}, {'inputs': [{'internalType': 'address', 'name': 'asset', 'type': 'address'}, {'internalType': 'bool', 'name': 'useAsCollateral', 'type': 'bool'}], 'name': 'setUserUseReserveAsCollateral', 'outputs': [], 'stateMutability': 'nonpayable', 'type': 'function'}, {'inputs': [{'internalType': 'address', 'name': 'asset', 'type': 'address'}, {'internalType': 'uint256', 'name': 'amount', 'type': 'uint256'}, {'internalType': 'address', 'name': 'onBehalfOf', 'type': 'address'}, {'internalType': 'uint16', 'name': 'referralCode', 'type': 'uint16'}], 'name': 'supply', 'outputs': [], 'stateMutability': 'nonpayable', 'type': 'function'}, {'inputs': [{'internalType': 'address', 'name': 'asset', 'type': 'address'}, {'internalType': 'uint256', 'name': 'amount', 'type': 'uint256'}, {'internalType': 'address', 'name': 'onBehalfOf', 'type': 'address'}, {'internalType': 'uint16', 'name': 'referralCode', 'type': 'uint16'}, {'internalType': 'uint256', 'name': 'deadline', 'type': 'uint256'}, {'internalType': 'uint8', 'name': 'permitV', 'type': 'uint8'}, {'internalType': 'bytes32', 'name': 'permitR', 'type': 'bytes32'}, {'internalType': 'bytes32', 'name': 'permitS', 'type': 'bytes32'}], 'name': 'supplyWithPermit', 'outputs': [], 'stateMutability': 'nonpayable', 'type': 'function'}, {'inputs': [{'internalType': 'address', 'name': 'asset', 'type': 'address'}, {'internalType': 'uint256', 'name': 'interestRateMode', 'type': 'uint256'}], 'name': 'swapBorrowRateMode', 'outputs': [], 'stateMutability': 'nonpayable', 'type': 'function'}, {'inputs': [{'internalType': 'uint256', 'name': 'protocolFee', 'type': 'uint256'}], 'name': 'updateBridgeProtocolFee', 'outputs': [], 'stateMutability': 'nonpayable', 'type': 'function'}, {'inputs': [{'internalType': 'uint128', 'name': 'flashLoanPremiumTotal', 'type': 'uint128'}, {'internalType': 'uint128', 'name': 'flashLoanPremiumToProtocol', 'type': 'uint128'}], 'name': 'updateFlashloanPremiums', 'outputs': [], 'stateMutability': 'nonpayable', 'type': 'function'}, {'inputs': [{'internalType': 'address', 'name': 'asset', 'type': 'address'}, {'internalType': 'uint256', 'name': 'amount', 'type': 'uint256'}, {'internalType': 'address', 'name': 'to', 'type': 'address'}], 'name': 'withdraw', 'outputs': [{'internalType': 'uint256', 'name': '', 'type': 'uint256'}], 'stateMutability': 'nonpayable', 'type': 'function'}]
}

BERPS_ABI = {
    'router': [{'type': 'function', 'name': 'accBlockWeightedMarketCap', 'inputs': [], 'outputs': [{'name': '', 'type': 'uint256', 'internalType': 'uint256'}], 'stateMutability': 'view'}, {'type': 'function', 'name': 'accBlockWeightedMarketCapLastStored', 'inputs': [], 'outputs': [{'name': '', 'type': 'uint256', 'internalType': 'uint256'}], 'stateMutability': 'view'}, {'type': 'function', 'name': 'accPnlPerToken', 'inputs': [], 'outputs': [{'name': '', 'type': 'int256', 'internalType': 'int256'}], 'stateMutability': 'view'}, {'type': 'function', 'name': 'accPnlPerTokenUsed', 'inputs': [], 'outputs': [{'name': '', 'type': 'int256', 'internalType': 'int256'}], 'stateMutability': 'view'}, {'type': 'function', 'name': 'accRewardsPerToken', 'inputs': [], 'outputs': [{'name': '', 'type': 'uint256', 'internalType': 'uint256'}], 'stateMutability': 'view'}, {'type': 'function', 'name': 'allowance', 'inputs': [{'name': 'owner', 'type': 'address', 'internalType': 'address'}, {'name': 'spender', 'type': 'address', 'internalType': 'address'}], 'outputs': [{'name': '', 'type': 'uint256', 'internalType': 'uint256'}], 'stateMutability': 'view'}, {'type': 'function', 'name': 'approve', 'inputs': [{'name': 'spender', 'type': 'address', 'internalType': 'address'}, {'name': 'amount', 'type': 'uint256', 'internalType': 'uint256'}], 'outputs': [{'name': '', 'type': 'bool', 'internalType': 'bool'}], 'stateMutability': 'nonpayable'}, {'type': 'function', 'name': 'asset', 'inputs': [], 'outputs': [{'name': '', 'type': 'address', 'internalType': 'address'}], 'stateMutability': 'view'}, {'type': 'function', 'name': 'availableAssets', 'inputs': [], 'outputs': [{'name': '', 'type': 'uint256', 'internalType': 'uint256'}], 'stateMutability': 'view'}, {'type': 'function', 'name': 'balanceOf', 'inputs': [{'name': 'account', 'type': 'address', 'internalType': 'address'}], 'outputs': [{'name': '', 'type': 'uint256', 'internalType': 'uint256'}], 'stateMutability': 'view'}, {'type': 'function', 'name': 'balanceOfAssets', 'inputs': [{'name': 'owner', 'type': 'address', 'internalType': 'address'}], 'outputs': [{'name': '', 'type': 'uint256', 'internalType': 'uint256'}], 'stateMutability': 'view'}, {'type': 'function', 'name': 'cancelWithdrawRequest', 'inputs': [{'name': 'shares', 'type': 'uint256', 'internalType': 'uint256'}, {'name': 'unlockEpoch', 'type': 'uint256', 'internalType': 'uint256'}], 'outputs': [], 'stateMutability': 'nonpayable'}, {'type': 'function', 'name': 'claimBGT', 'inputs': [{'name': 'amount', 'type': 'uint256', 'internalType': 'uint256'}, {'name': 'recipient', 'type': 'address', 'internalType': 'address'}], 'outputs': [], 'stateMutability': 'nonpayable'}, {'type': 'function', 'name': 'collateralizationP', 'inputs': [], 'outputs': [{'name': '', 'type': 'uint256', 'internalType': 'uint256'}], 'stateMutability': 'view'}, {'type': 'function', 'name': 'convertToAssets', 'inputs': [{'name': 'shares', 'type': 'uint256', 'internalType': 'uint256'}], 'outputs': [{'name': '', 'type': 'uint256', 'internalType': 'uint256'}], 'stateMutability': 'view'}, {'type': 'function', 'name': 'convertToShares', 'inputs': [{'name': 'assets', 'type': 'uint256', 'internalType': 'uint256'}], 'outputs': [{'name': '', 'type': 'uint256', 'internalType': 'uint256'}], 'stateMutability': 'view'}, {'type': 'function', 'name': 'currentEpoch', 'inputs': [], 'outputs': [{'name': '', 'type': 'uint256', 'internalType': 'uint256'}], 'stateMutability': 'view'}, {'type': 'function', 'name': 'currentEpochEnd', 'inputs': [], 'outputs': [{'name': '', 'type': 'uint256', 'internalType': 'uint256'}], 'stateMutability': 'view'}, {'type': 'function', 'name': 'currentEpochPositiveOpenPnl', 'inputs': [], 'outputs': [{'name': '', 'type': 'uint256', 'internalType': 'uint256'}], 'stateMutability': 'view'}, {'type': 'function', 'name': 'currentEpochStart', 'inputs': [], 'outputs': [{'name': '', 'type': 'uint256', 'internalType': 'uint256'}], 'stateMutability': 'view'}, {'type': 'function', 'name': 'currentMaxSupply', 'inputs': [], 'outputs': [{'name': '', 'type': 'uint256', 'internalType': 'uint256'}], 'stateMutability': 'view'}, {'type': 'function', 'name': 'dailyAccPnlDelta', 'inputs': [], 'outputs': [{'name': '', 'type': 'int256', 'internalType': 'int256'}], 'stateMutability': 'view'}, {'type': 'function', 'name': 'decimals', 'inputs': [], 'outputs': [{'name': '', 'type': 'uint8', 'internalType': 'uint8'}], 'stateMutability': 'view'}, {'type': 'function', 'name': 'decreaseAllowance', 'inputs': [{'name': 'spender', 'type': 'address', 'internalType': 'address'}, {'name': 'subtractedValue', 'type': 'uint256', 'internalType': 'uint256'}], 'outputs': [{'name': '', 'type': 'bool', 'internalType': 'bool'}], 'stateMutability': 'nonpayable'}, {'type': 'function', 'name': 'deposit', 'inputs': [{'name': 'assets', 'type': 'uint256', 'internalType': 'uint256'}, {'name': 'receiver', 'type': 'address', 'internalType': 'address'}], 'outputs': [{'name': '', 'type': 'uint256', 'internalType': 'uint256'}], 'stateMutability': 'nonpayable'}, {'type': 'function', 'name': 'distributeReward', 'inputs': [{'name': 'assets', 'type': 'uint256', 'internalType': 'uint256'}], 'outputs': [], 'stateMutability': 'nonpayable'}, {'type': 'function', 'name': 'epochLength', 'inputs': [], 'outputs': [{'name': '', 'type': 'uint256', 'internalType': 'uint256'}], 'stateMutability': 'view'}, {'type': 'function', 'name': 'feesToPolP', 'inputs': [], 'outputs': [{'name': '', 'type': 'uint256', 'internalType': 'uint256'}], 'stateMutability': 'view'}, {'type': 'function', 'name': 'forceNewEpoch', 'inputs': [], 'outputs': [], 'stateMutability': 'nonpayable'}, {'type': 'function', 'name': 'getPendingAccBlockWeightedMarketCap', 'inputs': [{'name': 'currentBlock', 'type': 'uint256', 'internalType': 'uint256'}], 'outputs': [{'name': '', 'type': 'uint256', 'internalType': 'uint256'}], 'stateMutability': 'view'}, {'type': 'function', 'name': 'increaseAllowance', 'inputs': [{'name': 'spender', 'type': 'address', 'internalType': 'address'}, {'name': 'addedValue', 'type': 'uint256', 'internalType': 'uint256'}], 'outputs': [{'name': '', 'type': 'bool', 'internalType': 'bool'}], 'stateMutability': 'nonpayable'}, {'type': 'function', 'name': 'initialize', 'inputs': [{'name': '_name', 'type': 'string', 'internalType': 'string'}, {'name': '_symbol', 'type': 'string', 'internalType': 'string'}, {'name': '_contractAddresses', 'type': 'tuple', 'internalType': 'struct IBToken.ContractAddresses', 'components': [{'name': 'asset', 'type': 'address', 'internalType': 'address'}, {'name': 'owner', 'type': 'address', 'internalType': 'address'}, {'name': 'manager', 'type': 'address', 'internalType': 'address'}, {'name': 'pnlHandler', 'type': 'address', 'internalType': 'address'}]}, {'name': '_maxDailyAccPnlDelta', 'type': 'uint256', 'internalType': 'uint256'}, {'name': '_withdrawLockThresholdsPLow', 'type': 'uint256', 'internalType': 'uint256'}, {'name': '_withdrawLockThresholdsPHigh', 'type': 'uint256', 'internalType': 'uint256'}, {'name': '_maxSupplyIncreaseDailyP', 'type': 'uint256', 'internalType': 'uint256'}, {'name': '_lossesBurnP', 'type': 'uint256', 'internalType': 'uint256'}, {'name': '_epochLength', 'type': 'uint256', 'internalType': 'uint256'}, {'name': '_feesToPolP', 'type': 'uint256', 'internalType': 'uint256'}], 'outputs': [], 'stateMutability': 'nonpayable'}, {'type': 'function', 'name': 'initializeV2', 'inputs': [], 'outputs': [], 'stateMutability': 'nonpayable'}, {'type': 'function', 'name': 'lastDailyAccPnlDeltaReset', 'inputs': [], 'outputs': [{'name': '', 'type': 'uint256', 'internalType': 'uint256'}], 'stateMutability': 'view'}, {'type': 'function', 'name': 'lastMaxSupplyUpdate', 'inputs': [], 'outputs': [{'name': '', 'type': 'uint256', 'internalType': 'uint256'}], 'stateMutability': 'view'}, {'type': 'function', 'name': 'lossesBurnP', 'inputs': [], 'outputs': [{'name': '', 'type': 'uint256', 'internalType': 'uint256'}], 'stateMutability': 'view'}, {'type': 'function', 'name': 'makeWithdrawRequest', 'inputs': [{'name': 'shares', 'type': 'uint256', 'internalType': 'uint256'}], 'outputs': [], 'stateMutability': 'nonpayable'}, {'type': 'function', 'name': 'manager', 'inputs': [], 'outputs': [{'name': '', 'type': 'address', 'internalType': 'address'}], 'stateMutability': 'view'}, {'type': 'function', 'name': 'marketCap', 'inputs': [], 'outputs': [{'name': '', 'type': 'uint256', 'internalType': 'uint256'}], 'stateMutability': 'view'}, {'type': 'function', 'name': 'maxAccPnlPerToken', 'inputs': [], 'outputs': [{'name': '', 'type': 'uint256', 'internalType': 'uint256'}], 'stateMutability': 'view'}, {'type': 'function', 'name': 'maxDailyAccPnlDelta', 'inputs': [], 'outputs': [{'name': '', 'type': 'uint256', 'internalType': 'uint256'}], 'stateMutability': 'view'}, {'type': 'function', 'name': 'maxDeposit', 'inputs': [{'name': 'owner', 'type': 'address', 'internalType': 'address'}], 'outputs': [{'name': '', 'type': 'uint256', 'internalType': 'uint256'}], 'stateMutability': 'view'}, {'type': 'function', 'name': 'maxMint', 'inputs': [{'name': '', 'type': 'address', 'internalType': 'address'}], 'outputs': [{'name': '', 'type': 'uint256', 'internalType': 'uint256'}], 'stateMutability': 'view'}, {'type': 'function', 'name': 'maxRedeem', 'inputs': [{'name': 'owner', 'type': 'address', 'internalType': 'address'}], 'outputs': [{'name': '', 'type': 'uint256', 'internalType': 'uint256'}], 'stateMutability': 'view'}, {'type': 'function', 'name': 'maxSupplyIncreaseDailyP', 'inputs': [], 'outputs': [{'name': '', 'type': 'uint256', 'internalType': 'uint256'}], 'stateMutability': 'view'}, {'type': 'function', 'name': 'maxWithdraw', 'inputs': [{'name': 'owner', 'type': 'address', 'internalType': 'address'}], 'outputs': [{'name': '', 'type': 'uint256', 'internalType': 'uint256'}], 'stateMutability': 'view'}, {'type': 'function', 'name': 'mint', 'inputs': [{'name': 'shares', 'type': 'uint256', 'internalType': 'uint256'}, {'name': 'receiver', 'type': 'address', 'internalType': 'address'}], 'outputs': [{'name': '', 'type': 'uint256', 'internalType': 'uint256'}], 'stateMutability': 'nonpayable'}, {'type': 'function', 'name': 'name', 'inputs': [], 'outputs': [{'name': '', 'type': 'string', 'internalType': 'string'}], 'stateMutability': 'view'}, {'type': 'function', 'name': 'owner', 'inputs': [], 'outputs': [{'name': '', 'type': 'address', 'internalType': 'address'}], 'stateMutability': 'view'}, {'type': 'function', 'name': 'pendingBGT', 'inputs': [{'name': 'owner', 'type': 'address', 'internalType': 'address'}], 'outputs': [{'name': '', 'type': 'uint256', 'internalType': 'uint256'}], 'stateMutability': 'view'}, {'type': 'function', 'name': 'pnlHandler', 'inputs': [], 'outputs': [{'name': '', 'type': 'address', 'internalType': 'address'}], 'stateMutability': 'view'}, {'type': 'function', 'name': 'previewDeposit', 'inputs': [{'name': 'assets', 'type': 'uint256', 'internalType': 'uint256'}], 'outputs': [{'name': '', 'type': 'uint256', 'internalType': 'uint256'}], 'stateMutability': 'view'}, {'type': 'function', 'name': 'previewMint', 'inputs': [{'name': 'shares', 'type': 'uint256', 'internalType': 'uint256'}], 'outputs': [{'name': '', 'type': 'uint256', 'internalType': 'uint256'}], 'stateMutability': 'view'}, {'type': 'function', 'name': 'previewRedeem', 'inputs': [{'name': 'shares', 'type': 'uint256', 'internalType': 'uint256'}], 'outputs': [{'name': '', 'type': 'uint256', 'internalType': 'uint256'}], 'stateMutability': 'view'}, {'type': 'function', 'name': 'previewWithdraw', 'inputs': [{'name': 'assets', 'type': 'uint256', 'internalType': 'uint256'}], 'outputs': [{'name': '', 'type': 'uint256', 'internalType': 'uint256'}], 'stateMutability': 'view'}, {'type': 'function', 'name': 'receiveAssets', 'inputs': [{'name': 'assets', 'type': 'uint256', 'internalType': 'uint256'}, {'name': 'user', 'type': 'address', 'internalType': 'address'}], 'outputs': [], 'stateMutability': 'nonpayable'}, {'type': 'function', 'name': 'redeem', 'inputs': [{'name': 'shares', 'type': 'uint256', 'internalType': 'uint256'}, {'name': 'receiver', 'type': 'address', 'internalType': 'address'}, {'name': 'owner', 'type': 'address', 'internalType': 'address'}], 'outputs': [{'name': '', 'type': 'uint256', 'internalType': 'uint256'}], 'stateMutability': 'nonpayable'}, {'type': 'function', 'name': 'renounceOwnership', 'inputs': [], 'outputs': [], 'stateMutability': 'nonpayable'}, {'type': 'function', 'name': 'rewarder', 'inputs': [], 'outputs': [{'name': '', 'type': 'address', 'internalType': 'contract IPoLRewarder'}], 'stateMutability': 'view'}, {'type': 'function', 'name': 'sendAssets', 'inputs': [{'name': 'assets', 'type': 'uint256', 'internalType': 'uint256'}, {'name': 'receiver', 'type': 'address', 'internalType': 'address'}], 'outputs': [], 'stateMutability': 'nonpayable'}, {'type': 'function', 'name': 'shareToAssetsPrice', 'inputs': [], 'outputs': [{'name': '', 'type': 'uint256', 'internalType': 'uint256'}], 'stateMutability': 'view'}, {'type': 'function', 'name': 'storeAccBlockWeightedMarketCap', 'inputs': [], 'outputs': [], 'stateMutability': 'nonpayable'}, {'type': 'function', 'name': 'symbol', 'inputs': [], 'outputs': [{'name': '', 'type': 'string', 'internalType': 'string'}], 'stateMutability': 'view'}, {'type': 'function', 'name': 'totalAssets', 'inputs': [], 'outputs': [{'name': '', 'type': 'uint256', 'internalType': 'uint256'}], 'stateMutability': 'view'}, {'type': 'function', 'name': 'totalClosedPnl', 'inputs': [], 'outputs': [{'name': '', 'type': 'int256', 'internalType': 'int256'}], 'stateMutability': 'view'}, {'type': 'function', 'name': 'totalDeposited', 'inputs': [], 'outputs': [{'name': '', 'type': 'uint256', 'internalType': 'uint256'}], 'stateMutability': 'view'}, {'type': 'function', 'name': 'totalLiability', 'inputs': [], 'outputs': [{'name': '', 'type': 'int256', 'internalType': 'int256'}], 'stateMutability': 'view'}, {'type': 'function', 'name': 'totalRewards', 'inputs': [], 'outputs': [{'name': '', 'type': 'uint256', 'internalType': 'uint256'}], 'stateMutability': 'view'}, {'type': 'function', 'name': 'totalSharesBeingWithdrawn', 'inputs': [{'name': 'owner', 'type': 'address', 'internalType': 'address'}], 'outputs': [{'name': 'shares', 'type': 'uint256', 'internalType': 'uint256'}], 'stateMutability': 'view'}, {'type': 'function', 'name': 'totalSupply', 'inputs': [], 'outputs': [{'name': '', 'type': 'uint256', 'internalType': 'uint256'}], 'stateMutability': 'view'}, {'type': 'function', 'name': 'transfer', 'inputs': [{'name': 'to', 'type': 'address', 'internalType': 'address'}, {'name': 'amount', 'type': 'uint256', 'internalType': 'uint256'}], 'outputs': [{'name': '', 'type': 'bool', 'internalType': 'bool'}], 'stateMutability': 'nonpayable'}, {'type': 'function', 'name': 'transferFrom', 'inputs': [{'name': 'from', 'type': 'address', 'internalType': 'address'}, {'name': 'to', 'type': 'address', 'internalType': 'address'}, {'name': 'amount', 'type': 'uint256', 'internalType': 'uint256'}], 'outputs': [{'name': '', 'type': 'bool', 'internalType': 'bool'}], 'stateMutability': 'nonpayable'}, {'type': 'function', 'name': 'transferOwnership', 'inputs': [{'name': 'newOwner', 'type': 'address', 'internalType': 'address'}], 'outputs': [], 'stateMutability': 'nonpayable'}, {'type': 'function', 'name': 'tryResetDailyAccPnlDelta', 'inputs': [], 'outputs': [], 'stateMutability': 'nonpayable'}, {'type': 'function', 'name': 'tryUpdateCurrentMaxSupply', 'inputs': [], 'outputs': [], 'stateMutability': 'nonpayable'}, {'type': 'function', 'name': 'tvl', 'inputs': [], 'outputs': [{'name': '', 'type': 'uint256', 'internalType': 'uint256'}], 'stateMutability': 'view'}, {'type': 'function', 'name': 'updateLossesBurnP', 'inputs': [{'name': 'newValue', 'type': 'uint256', 'internalType': 'uint256'}], 'outputs': [], 'stateMutability': 'nonpayable'}, {'type': 'function', 'name': 'updateManager', 'inputs': [{'name': 'newValue', 'type': 'address', 'internalType': 'address'}], 'outputs': [], 'stateMutability': 'nonpayable'}, {'type': 'function', 'name': 'updateMaxDailyAccPnlDelta', 'inputs': [{'name': 'newValue', 'type': 'uint256', 'internalType': 'uint256'}], 'outputs': [], 'stateMutability': 'nonpayable'}, {'type': 'function', 'name': 'updateMaxSupplyIncreaseDailyP', 'inputs': [{'name': 'newValue', 'type': 'uint256', 'internalType': 'uint256'}], 'outputs': [], 'stateMutability': 'nonpayable'}, {'type': 'function', 'name': 'updatePnlHandler', 'inputs': [{'name': 'newValue', 'type': 'address', 'internalType': 'address'}], 'outputs': [], 'stateMutability': 'nonpayable'}, {'type': 'function', 'name': 'updateWithdrawLockThresholdsP', 'inputs': [{'name': 'newValue', 'type': 'uint256[2]', 'internalType': 'uint256[2]'}], 'outputs': [], 'stateMutability': 'nonpayable'}, {'type': 'function', 'name': 'withdraw', 'inputs': [{'name': 'assets', 'type': 'uint256', 'internalType': 'uint256'}, {'name': 'receiver', 'type': 'address', 'internalType': 'address'}, {'name': 'owner', 'type': 'address', 'internalType': 'address'}], 'outputs': [{'name': '', 'type': 'uint256', 'internalType': 'uint256'}], 'stateMutability': 'nonpayable'}, {'type': 'function', 'name': 'withdrawEpochsTimelock', 'inputs': [], 'outputs': [{'name': '', 'type': 'uint256', 'internalType': 'uint256'}], 'stateMutability': 'view'}, {'type': 'function', 'name': 'withdrawLockThresholdsP', 'inputs': [{'name': '', 'type': 'uint256', 'internalType': 'uint256'}], 'outputs': [{'name': '', 'type': 'uint256', 'internalType': 'uint256'}], 'stateMutability': 'view'}, {'type': 'function', 'name': 'withdrawRequests', 'inputs': [{'name': '', 'type': 'address', 'internalType': 'address'}, {'name': '', 'type': 'uint256', 'internalType': 'uint256'}], 'outputs': [{'name': '', 'type': 'uint256', 'internalType': 'uint256'}], 'stateMutability': 'view'}],
}

BERADOMAIN_ABI = {
    'router' : [{'stateMutability': 'payable', 'type': 'function', 'inputs': [{'name': 'chars', 'internalType': 'string[]', 'type': 'string[]'}, {'name': 'duration', 'internalType': 'uint256', 'type': 'uint256'}, {'name': 'whois', 'internalType': 'address', 'type': 'address'}, {'name': 'metadataURI', 'internalType': 'string', 'type': 'string'}, {'name': 'to', 'internalType': 'address', 'type': 'address'}], 'name': 'mintNative', 'outputs': [{'name': '', 'internalType': 'uint256', 'type': 'uint256'}]}]
}

STATION_ABI = {
    'delegate' : [{'inputs': [{'internalType': 'address', 'name': 'validatorAddress', 'type': 'address'}, {'internalType': 'uint256', 'name': 'amount', 'type': 'uint256'}], 'name': 'delegate', 'outputs': [{'internalType': 'bool', 'name': '', 'type': 'bool'}], 'stateMutability': 'payable', 'type': 'function'}],
    'vote': [{'inputs': [{'internalType': 'uint64', 'name': 'proposalId', 'type': 'uint64'}, {'internalType': 'int32', 'name': 'option', 'type': 'int32'}, {'internalType': 'string', 'name': 'metadata', 'type': 'string'}], 'name': 'vote', 'outputs': [{'internalType': 'bool', 'name': '', 'type': 'bool'}], 'stateMutability': 'nonpayable', 'type': 'function'}]
}

DIRAC_ABI = {
    'musdc_claim' : [{'anonymous': False, 'inputs': [{'indexed': True, 'internalType': 'address', 'name': 'owner', 'type': 'address'}, {'indexed': True, 'internalType': 'address', 'name': 'spender', 'type': 'address'}, {'indexed': False, 'internalType': 'uint256', 'name': 'value', 'type': 'uint256'}], 'name': 'Approval', 'type': 'event'}, {'anonymous': False, 'inputs': [{'indexed': True, 'internalType': 'address', 'name': 'dst', 'type': 'address'}, {'indexed': False, 'internalType': 'uint256', 'name': 'wad', 'type': 'uint256'}], 'name': 'Deposit', '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': True, 'internalType': 'address', 'name': 'from', 'type': 'address'}, {'indexed': True, 'internalType': 'address', 'name': 'to', 'type': 'address'}, {'indexed': False, 'internalType': 'uint256', 'name': 'value', 'type': 'uint256'}], 'name': 'Transfer', 'type': 'event'}, {'anonymous': False, 'inputs': [{'indexed': True, 'internalType': 'address', 'name': 'src', 'type': 'address'}, {'indexed': False, 'internalType': 'uint256', 'name': 'wad', 'type': 'uint256'}], 'name': 'Withdrawal', 'type': 'event'}, {'stateMutability': 'nonpayable', 'type': 'fallback'}, {'inputs': [{'internalType': 'address', 'name': 'owner', 'type': 'address'}, {'internalType': 'address', 'name': 'spender', 'type': 'address'}], 'name': 'allowance', 'outputs': [{'internalType': 'uint256', 'name': '', 'type': 'uint256'}], 'stateMutability': 'view', 'type': 'function'}, {'inputs': [{'internalType': 'address', 'name': 'spender', 'type': 'address'}, {'internalType': 'uint256', 'name': 'amount', 'type': 'uint256'}], 'name': 'approve', 'outputs': [{'internalType': 'bool', 'name': '', 'type': 'bool'}], 'stateMutability': 'nonpayable', 'type': 'function'}, {'inputs': [{'internalType': 'address', 'name': 'account', 'type': 'address'}], 'name': 'balanceOf', 'outputs': [{'internalType': 'uint256', 'name': '', 'type': 'uint256'}], 'stateMutability': 'view', 'type': 'function'}, {'inputs': [{'internalType': 'address', 'name': 'receiver', 'type': 'address'}, {'internalType': 'uint256', 'name': 'quantity', 'type': 'uint256'}], 'name': 'burn', 'outputs': [], 'stateMutability': 'nonpayable', 'type': 'function'}, {'inputs': [], 'name': 'decimals', 'outputs': [{'internalType': 'uint8', 'name': '', 'type': 'uint8'}], 'stateMutability': 'view', 'type': 'function'}, {'inputs': [{'internalType': 'address', 'name': 'spender', 'type': 'address'}, {'internalType': 'uint256', 'name': 'subtractedValue', 'type': 'uint256'}], 'name': 'decreaseAllowance', 'outputs': [{'internalType': 'bool', 'name': '', 'type': 'bool'}], 'stateMutability': 'nonpayable', 'type': 'function'}, {'inputs': [], 'name': 'deposit', 'outputs': [], 'stateMutability': 'payable', 'type': 'function'}, {'inputs': [{'internalType': 'address', 'name': 'spender', 'type': 'address'}, {'internalType': 'uint256', 'name': 'addedValue', 'type': 'uint256'}], 'name': 'increaseAllowance', 'outputs': [{'internalType': 'bool', 'name': '', 'type': 'bool'}], 'stateMutability': 'nonpayable', 'type': 'function'}, {'inputs': [{'internalType': 'address', 'name': 'receiver', 'type': 'address'}, {'internalType': 'uint256', 'name': 'quantity', 'type': 'uint256'}], 'name': 'mint', 'outputs': [], 'stateMutability': 'nonpayable', 'type': 'function'}, {'inputs': [], 'name': 'name', 'outputs': [{'internalType': 'string', 'name': '', 'type': 'string'}], 'stateMutability': 'view', 'type': 'function'}, {'inputs': [], 'name': 'owner', 'outputs': [{'internalType': 'address', 'name': '', 'type': 'address'}], 'stateMutability': 'view', 'type': 'function'}, {'inputs': [], 'name': 'renounceOwnership', 'outputs': [], 'stateMutability': 'nonpayable', 'type': 'function'}, {'inputs': [], 'name': 'symbol', 'outputs': [{'internalType': 'string', 'name': '', 'type': 'string'}], 'stateMutability': 'view', 'type': 'function'}, {'inputs': [], 'name': 'totalSupply', 'outputs': [{'internalType': 'uint256', 'name': '', 'type': 'uint256'}], 'stateMutability': 'view', 'type': 'function'}, {'inputs': [{'internalType': 'address', 'name': 'to', 'type': 'address'}, {'internalType': 'uint256', 'name': 'amount', 'type': 'uint256'}], 'name': 'transfer', 'outputs': [{'internalType': 'bool', 'name': '', 'type': 'bool'}], 'stateMutability': 'nonpayable', 'type': 'function'}, {'inputs': [{'internalType': 'address', 'name': 'from', 'type': 'address'}, {'internalType': 'address', 'name': 'to', 'type': 'address'}, {'internalType': 'uint256', 'name': 'amount', 'type': 'uint256'}], 'name': 'transferFrom', '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': 'uint256', 'name': 'wad', 'type': 'uint256'}], 'name': 'withdraw', 'outputs': [], 'stateMutability': 'nonpayable', 'type': 'function'}, {'inputs': [{'internalType': 'uint256', 'name': 'wad', 'type': 'uint256'}, {'internalType': 'address', 'name': 'receiver', 'type': 'address'}], 'name': 'withdrawFor', 'outputs': [], 'stateMutability': 'nonpayable', 'type': 'function'}, {'stateMutability': 'payable', 'type': 'receive'}],
    'vote': [{'inputs': [{'internalType': 'uint64', 'name': 'proposalId', 'type': 'uint64'}, {'internalType': 'int32', 'name': 'option', 'type': 'int32'}, {'internalType': 'string', 'name': 'metadata', 'type': 'string'}], 'name': 'vote', 'outputs': [{'internalType': 'bool', 'name': '', 'type': 'bool'}], 'stateMutability': 'nonpayable', 'type': 'function'}]
}

BOBA_ABI = {
    'router': [{'inputs': [], 'stateMutability': 'nonpayable', 'type': 'constructor'}, {'inputs': [], 'name': 'AlreadyExists', 'type': 'error'}, {'inputs': [], 'name': 'CannotRemoveFromWhitelist', 'type': 'error'}, {'inputs': [], 'name': 'DecimalsTooLow', 'type': 'error'}, {'inputs': [], 'name': 'InsufficientAllowance', 'type': 'error'}, {'inputs': [], 'name': 'InvalidApproval', 'type': 'error'}, {'inputs': [], 'name': 'InvalidId', 'type': 'error'}, {'inputs': [], 'name': 'InvalidOperator', 'type': 'error'}, {'inputs': [], 'name': 'InvalidRecipient', 'type': 'error'}, {'inputs': [], 'name': 'InvalidSender', 'type': 'error'}, {'inputs': [], 'name': 'InvalidSigner', 'type': 'error'}, {'inputs': [], 'name': 'InvalidSpender', 'type': 'error'}, {'inputs': [], 'name': 'NotFound', 'type': 'error'}, {'inputs': [], 'name': 'NotWhitelisted', 'type': 'error'}, {'inputs': [], 'name': 'OwnedIndexOverflow', 'type': 'error'}, {'inputs': [], 'name': 'PermitDeadlineExpired', 'type': 'error'}, {'inputs': [], 'name': 'QueueEmpty', 'type': 'error'}, {'inputs': [], 'name': 'QueueFull', 'type': 'error'}, {'inputs': [], 'name': 'Unauthorized', 'type': 'error'}, {'inputs': [], 'name': 'UnsafeRecipient', 'type': 'error'}, {'anonymous': False, 'inputs': [{'indexed': True, 'internalType': 'address', 'name': 'owner', 'type': 'address'}, {'indexed': True, 'internalType': 'address', 'name': 'operator', 'type': 'address'}, {'indexed': False, 'internalType': 'bool', 'name': 'approved', 'type': 'bool'}], 'name': 'ApprovalForAll', 'type': 'event'}, {'anonymous': False, 'inputs': [{'indexed': False, 'internalType': 'address', 'name': 'owner', 'type': 'address'}, {'indexed': False, 'internalType': 'address', 'name': 'spender', 'type': 'address'}, {'indexed': False, 'internalType': 'uint256', 'name': 'value', 'type': 'uint256'}], 'name': 'ERC20Approval', 'type': 'event'}, {'anonymous': False, 'inputs': [{'indexed': True, 'internalType': 'address', 'name': 'from', 'type': 'address'}, {'indexed': True, 'internalType': 'address', 'name': 'to', 'type': 'address'}, {'indexed': False, 'internalType': 'uint256', 'name': 'amount', 'type': 'uint256'}], 'name': 'ERC20Transfer', 'type': 'event'}, {'anonymous': False, 'inputs': [{'indexed': True, 'internalType': 'address', 'name': 'owner', 'type': 'address'}, {'indexed': True, 'internalType': 'address', 'name': 'spender', 'type': 'address'}, {'indexed': True, 'internalType': 'uint256', 'name': 'id', 'type': 'uint256'}], 'name': 'ERC721Approval', 'type': 'event'}, {'anonymous': False, 'inputs': [{'indexed': True, 'internalType': 'address', 'name': 'from', 'type': 'address'}, {'indexed': True, 'internalType': 'address', 'name': 'to', 'type': 'address'}, {'indexed': True, 'internalType': 'uint256', 'name': 'id', 'type': 'uint256'}], 'name': 'ERC721Transfer', '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'}, {'inputs': [], 'name': 'DOMAIN_SEPARATOR', 'outputs': [{'internalType': 'bytes32', 'name': '', 'type': 'bytes32'}], 'stateMutability': 'view', 'type': 'function'}, {'inputs': [{'internalType': 'address', 'name': '', 'type': 'address'}, {'internalType': 'address', 'name': '', 'type': 'address'}], 'name': 'allowance', 'outputs': [{'internalType': 'uint256', 'name': '', 'type': 'uint256'}], 'stateMutability': 'view', 'type': 'function'}, {'inputs': [{'internalType': 'address', 'name': 'spender_', 'type': 'address'}, {'internalType': 'uint256', 'name': 'valueOrId_', 'type': 'uint256'}], 'name': 'approve', 'outputs': [{'internalType': 'bool', 'name': '', 'type': 'bool'}], 'stateMutability': 'nonpayable', 'type': 'function'}, {'inputs': [{'internalType': 'address', 'name': '', 'type': 'address'}], 'name': 'balanceOf', 'outputs': [{'internalType': 'uint256', 'name': '', 'type': 'uint256'}], 'stateMutability': 'view', 'type': 'function'}, {'inputs': [{'internalType': 'uint256', 'name': 'value_', 'type': 'uint256'}, {'internalType': 'bool', 'name': 'mintNFT', 'type': 'bool'}], 'name': 'boobaMint', 'outputs': [], 'stateMutability': 'nonpayable', 'type': 'function'}, {'inputs': [], 'name': 'decimals', 'outputs': [{'internalType': 'uint8', 'name': '', 'type': 'uint8'}], 'stateMutability': 'view', 'type': 'function'}, {'inputs': [{'internalType': 'address', 'name': 'owner_', 'type': 'address'}], 'name': 'erc20BalanceOf', 'outputs': [{'internalType': 'uint256', 'name': '', 'type': 'uint256'}], 'stateMutability': 'view', 'type': 'function'}, {'inputs': [], 'name': 'erc20TotalSupply', 'outputs': [{'internalType': 'uint256', 'name': '', 'type': 'uint256'}], 'stateMutability': 'view', 'type': 'function'}, {'inputs': [{'internalType': 'address', 'name': 'owner_', 'type': 'address'}], 'name': 'erc721BalanceOf', 'outputs': [{'internalType': 'uint256', 'name': '', 'type': 'uint256'}], 'stateMutability': 'view', 'type': 'function'}, {'inputs': [], 'name': 'erc721TokensBankedInQueue', 'outputs': [{'internalType': 'uint256', 'name': '', 'type': 'uint256'}], 'stateMutability': 'view', 'type': 'function'}, {'inputs': [], 'name': 'erc721TotalSupply', 'outputs': [{'internalType': 'uint256', 'name': '', 'type': 'uint256'}], 'stateMutability': 'view', 'type': 'function'}, {'inputs': [{'internalType': 'uint256', 'name': '', 'type': 'uint256'}], 'name': 'getApproved', 'outputs': [{'internalType': 'address', 'name': '', 'type': 'address'}], 'stateMutability': 'view', 'type': 'function'}, {'inputs': [{'internalType': 'address', 'name': '', 'type': 'address'}, {'internalType': 'address', 'name': '', 'type': 'address'}], 'name': 'isApprovedForAll', 'outputs': [{'internalType': 'bool', 'name': '', 'type': 'bool'}], 'stateMutability': 'view', 'type': 'function'}, {'inputs': [], 'name': 'name', 'outputs': [{'internalType': 'string', 'name': '', 'type': 'string'}], 'stateMutability': 'view', 'type': 'function'}, {'inputs': [{'internalType': 'address', 'name': '', 'type': 'address'}], 'name': 'nonces', 'outputs': [{'internalType': 'uint256', 'name': '', 'type': 'uint256'}], 'stateMutability': 'view', 'type': 'function'}, {'inputs': [{'internalType': 'address', 'name': 'owner_', 'type': 'address'}], 'name': 'owned', 'outputs': [{'internalType': 'uint256[]', 'name': '', 'type': 'uint256[]'}], 'stateMutability': 'view', 'type': 'function'}, {'inputs': [], 'name': 'owner', 'outputs': [{'internalType': 'address', 'name': '', 'type': 'address'}], 'stateMutability': 'view', 'type': 'function'}, {'inputs': [{'internalType': 'uint256', 'name': 'id_', 'type': 'uint256'}], 'name': 'ownerOf', 'outputs': [{'internalType': 'address', 'name': 'erc721Owner', 'type': 'address'}], 'stateMutability': 'view', 'type': 'function'}, {'inputs': [{'internalType': 'address', 'name': 'owner_', 'type': 'address'}, {'internalType': 'address', 'name': 'spender_', 'type': 'address'}, {'internalType': 'uint256', 'name': 'value_', 'type': 'uint256'}, {'internalType': 'uint256', 'name': 'deadline_', 'type': 'uint256'}, {'internalType': 'uint8', 'name': 'v_', 'type': 'uint8'}, {'internalType': 'bytes32', 'name': 'r_', 'type': 'bytes32'}, {'internalType': 'bytes32', 'name': 's_', 'type': 'bytes32'}], 'name': 'permit', 'outputs': [], 'stateMutability': 'nonpayable', 'type': 'function'}, {'inputs': [], 'name': 'renounceOwnership', 'outputs': [], 'stateMutability': 'nonpayable', 'type': 'function'}, {'inputs': [{'internalType': 'address', 'name': 'from_', 'type': 'address'}, {'internalType': 'address', 'name': 'to_', 'type': 'address'}, {'internalType': 'uint256', 'name': 'id_', 'type': 'uint256'}], 'name': 'safeTransferFrom', 'outputs': [], 'stateMutability': 'nonpayable', 'type': 'function'}, {'inputs': [{'internalType': 'address', 'name': 'from_', 'type': 'address'}, {'internalType': 'address', 'name': 'to_', 'type': 'address'}, {'internalType': 'uint256', 'name': 'id_', 'type': 'uint256'}, {'internalType': 'bytes', 'name': 'data_', 'type': 'bytes'}], 'name': 'safeTransferFrom', 'outputs': [], 'stateMutability': 'nonpayable', 'type': 'function'}, {'inputs': [{'internalType': 'address', 'name': 'operator_', 'type': 'address'}, {'internalType': 'bool', 'name': 'approved_', 'type': 'bool'}], 'name': 'setApprovalForAll', 'outputs': [], 'stateMutability': 'nonpayable', 'type': 'function'}, {'inputs': [{'internalType': 'address', 'name': 'account_', 'type': 'address'}, {'internalType': 'bool', 'name': 'value_', 'type': 'bool'}], 'name': 'setWhitelist', 'outputs': [], 'stateMutability': 'nonpayable', 'type': 'function'}, {'inputs': [{'internalType': 'bytes4', 'name': 'interfaceId', 'type': 'bytes4'}], 'name': 'supportsInterface', 'outputs': [{'internalType': 'bool', 'name': '', 'type': 'bool'}], 'stateMutability': 'view', 'type': 'function'}, {'inputs': [], 'name': 'symbol', 'outputs': [{'internalType': 'string', 'name': '', 'type': 'string'}], 'stateMutability': 'view', 'type': 'function'}, {'inputs': [{'internalType': 'uint256', 'name': 'id_', 'type': 'uint256'}], 'name': 'tokenURI', 'outputs': [{'internalType': 'string', 'name': '', 'type': 'string'}], 'stateMutability': 'pure', 'type': 'function'}, {'inputs': [], 'name': 'totalSupply', 'outputs': [{'internalType': 'uint256', 'name': '', 'type': 'uint256'}], 'stateMutability': 'view', 'type': 'function'}, {'inputs': [{'internalType': 'address', 'name': 'to_', 'type': 'address'}, {'internalType': 'uint256', 'name': 'value_', 'type': 'uint256'}], 'name': 'transfer', 'outputs': [{'internalType': 'bool', 'name': '', 'type': 'bool'}], 'stateMutability': 'nonpayable', 'type': 'function'}, {'inputs': [{'internalType': 'address', 'name': 'from_', 'type': 'address'}, {'internalType': 'address', 'name': 'to_', 'type': 'address'}, {'internalType': 'uint256', 'name': 'valueOrId_', 'type': 'uint256'}], 'name': 'transferFrom', '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': [], 'name': 'units', 'outputs': [{'internalType': 'uint256', 'name': '', 'type': 'uint256'}], 'stateMutability': 'view', 'type': 'function'}, {'inputs': [{'internalType': 'address', 'name': '', 'type': 'address'}], 'name': 'whitelist', 'outputs': [{'internalType': 'bool', 'name': '', 'type': 'bool'}], 'stateMutability': 'view', 'type': 'function'}],
}

ERC20_ABI = [{'inputs': [{'internalType': 'string', 'name': '_name', 'type': 'string'}, {'internalType': 'string', 'name': '_symbol', 'type': 'string'}, {'internalType': 'uint256', 'name': '_initialSupply', 'type': 'uint256'}], 'stateMutability': 'nonpayable', 'type': 'constructor'}, {'anonymous': False, 'inputs': [{'indexed': True, 'internalType': 'address', 'name': 'owner', 'type': 'address'}, {'indexed': True, 'internalType': 'address', 'name': 'spender', 'type': 'address'}, {'indexed': False, 'internalType': 'uint256', 'name': 'value', 'type': 'uint256'}], 'name': 'Approval', 'type': 'event'}, {'anonymous': False, 'inputs': [{'indexed': True, 'internalType': 'address', 'name': 'from', 'type': 'address'}, {'indexed': True, 'internalType': 'address', 'name': 'to', 'type': 'address'}, {'indexed': False, 'internalType': 'uint256', 'name': 'value', 'type': 'uint256'}], 'name': 'Transfer', 'type': 'event'}, {'inputs': [{'internalType': 'address', 'name': 'owner', 'type': 'address'}, {'internalType': 'address', 'name': 'spender', 'type': 'address'}], 'name': 'allowance', 'outputs': [{'internalType': 'uint256', 'name': '', 'type': 'uint256'}], 'stateMutability': 'view', 'type': 'function'}, {'inputs': [{'internalType': 'address', 'name': 'spender', 'type': 'address'}, {'internalType': 'uint256', 'name': 'amount', 'type': 'uint256'}], 'name': 'approve', 'outputs': [{'internalType': 'bool', 'name': '', 'type': 'bool'}], 'stateMutability': 'nonpayable', 'type': 'function'}, {'inputs': [{'internalType': 'address', 'name': 'account', 'type': 'address'}], 'name': 'balanceOf', 'outputs': [{'internalType': 'uint256', 'name': '', 'type': 'uint256'}], 'stateMutability': 'view', 'type': 'function'}, {'inputs': [], 'name': 'decimals', 'outputs': [{'internalType': 'uint8', 'name': '', 'type': 'uint8'}], 'stateMutability': 'view', 'type': 'function'}, {'inputs': [{'internalType': 'address', 'name': 'spender', 'type': 'address'}, {'internalType': 'uint256', 'name': 'subtractedValue', 'type': 'uint256'}], 'name': 'decreaseAllowance', 'outputs': [{'internalType': 'bool', 'name': '', 'type': 'bool'}], 'stateMutability': 'nonpayable', 'type': 'function'}, {'inputs': [{'internalType': 'address', 'name': 'spender', 'type': 'address'}, {'internalType': 'uint256', 'name': 'addedValue', 'type': 'uint256'}], 'name': 'increaseAllowance', 'outputs': [{'internalType': 'bool', 'name': '', 'type': 'bool'}], 'stateMutability': 'nonpayable', 'type': 'function'}, {'inputs': [], 'name': 'name', 'outputs': [{'internalType': 'string', 'name': '', 'type': 'string'}], 'stateMutability': 'view', 'type': 'function'}, {'inputs': [{'internalType': 'uint8', 'name': 'decimals_', 'type': 'uint8'}], 'name': 'setupDecimals', 'outputs': [], 'stateMutability': 'nonpayable', 'type': 'function'}, {'inputs': [], 'name': 'symbol', 'outputs': [{'internalType': 'string', 'name': '', 'type': 'string'}], 'stateMutability': 'view', 'type': 'function'}, {'inputs': [], 'name': 'totalSupply', 'outputs': [{'internalType': 'uint256', 'name': '', 'type': 'uint256'}], 'stateMutability': 'view', 'type': 'function'}, {'inputs': [{'internalType': 'address', 'name': 'recipient', 'type': 'address'}, {'internalType': 'uint256', 'name': 'amount', 'type': 'uint256'}], 'name': 'transfer', 'outputs': [{'internalType': 'bool', 'name': '', 'type': 'bool'}], 'stateMutability': 'nonpayable', 'type': 'function'}, {'inputs': [{'internalType': 'address', 'name': 'sender', 'type': 'address'}, {'internalType': 'address', 'name': 'recipient', 'type': 'address'}, {'internalType': 'uint256', 'name': 'amount', 'type': 'uint256'}], 'name': 'transferFrom', 'outputs': [{'internalType': 'bool', 'name': '', 'type': 'bool'}], 'stateMutability': 'nonpayable', 'type': 'function'}]

WETH_ABI = [{'inputs': [], 'stateMutability': 'nonpayable', 'type': 'constructor'}, {'anonymous': False, 'inputs': [{'indexed': True, 'internalType': 'address', 'name': 'owner', 'type': 'address'}, {'indexed': True, 'internalType': 'address', 'name': 'spender', 'type': 'address'}, {'indexed': False, 'internalType': 'uint256', 'name': 'value', 'type': 'uint256'}], 'name': 'Approval', 'type': 'event'}, {'anonymous': False, 'inputs': [{'indexed': True, 'internalType': 'address', 'name': '_account', 'type': 'address'}, {'indexed': False, 'internalType': 'uint256', 'name': '_amount', 'type': 'uint256'}], 'name': 'BridgeBurn', 'type': 'event'}, {'anonymous': False, 'inputs': [{'indexed': True, 'internalType': 'address', 'name': 'l1Token', 'type': 'address'}, {'indexed': False, 'internalType': 'string', 'name': 'name', 'type': 'string'}, {'indexed': False, 'internalType': 'string', 'name': 'symbol', 'type': 'string'}, {'indexed': False, 'internalType': 'uint8', 'name': 'decimals', 'type': 'uint8'}], 'name': 'BridgeInitialize', 'type': 'event'}, {'anonymous': False, 'inputs': [{'indexed': True, 'internalType': 'address', 'name': '_account', 'type': 'address'}, {'indexed': False, 'internalType': 'uint256', 'name': '_amount', 'type': 'uint256'}], 'name': 'BridgeMint', 'type': 'event'}, {'anonymous': False, 'inputs': [], 'name': 'EIP712DomainChanged', 'type': 'event'}, {'anonymous': False, 'inputs': [{'indexed': False, 'internalType': 'string', 'name': 'name', 'type': 'string'}, {'indexed': False, 'internalType': 'string', 'name': 'symbol', 'type': 'string'}, {'indexed': False, 'internalType': 'uint8', 'name': 'decimals', 'type': 'uint8'}], 'name': 'Initialize', 'type': 'event'}, {'anonymous': False, 'inputs': [{'indexed': False, 'internalType': 'uint8', 'name': 'version', 'type': 'uint8'}], 'name': 'Initialized', 'type': 'event'}, {'anonymous': False, 'inputs': [{'indexed': True, 'internalType': 'address', 'name': 'from', 'type': 'address'}, {'indexed': True, 'internalType': 'address', 'name': 'to', 'type': 'address'}, {'indexed': False, 'internalType': 'uint256', 'name': 'value', 'type': 'uint256'}], 'name': 'Transfer', 'type': 'event'}, {'inputs': [], 'name': 'DOMAIN_SEPARATOR', 'outputs': [{'internalType': 'bytes32', 'name': '', 'type': 'bytes32'}], 'stateMutability': 'view', 'type': 'function'}, {'inputs': [{'internalType': 'address', 'name': 'owner', 'type': 'address'}, {'internalType': 'address', 'name': 'spender', 'type': 'address'}], 'name': 'allowance', 'outputs': [{'internalType': 'uint256', 'name': '', 'type': 'uint256'}], 'stateMutability': 'view', 'type': 'function'}, {'inputs': [{'internalType': 'address', 'name': 'spender', 'type': 'address'}, {'internalType': 'uint256', 'name': 'amount', 'type': 'uint256'}], 'name': 'approve', 'outputs': [{'internalType': 'bool', 'name': '', 'type': 'bool'}], 'stateMutability': 'nonpayable', 'type': 'function'}, {'inputs': [{'internalType': 'address', 'name': 'account', 'type': 'address'}], 'name': 'balanceOf', 'outputs': [{'internalType': 'uint256', 'name': '', 'type': 'uint256'}], 'stateMutability': 'view', 'type': 'function'}, {'inputs': [{'internalType': 'address', 'name': '_from', 'type': 'address'}, {'internalType': 'uint256', 'name': '_amount', 'type': 'uint256'}], 'name': 'bridgeBurn', 'outputs': [], 'stateMutability': 'nonpayable', 'type': 'function'}, {'inputs': [{'internalType': 'address', 'name': '', 'type': 'address'}, {'internalType': 'uint256', 'name': '', 'type': 'uint256'}], 'name': 'bridgeMint', 'outputs': [], 'stateMutability': 'nonpayable', 'type': 'function'}, {'inputs': [], 'name': 'decimals', 'outputs': [{'internalType': 'uint8', 'name': '', 'type': 'uint8'}], 'stateMutability': 'view', 'type': 'function'}, {'inputs': [{'internalType': 'address', 'name': 'spender', 'type': 'address'}, {'internalType': 'uint256', 'name': 'subtractedValue', 'type': 'uint256'}], 'name': 'decreaseAllowance', 'outputs': [{'internalType': 'bool', 'name': '', 'type': 'bool'}], 'stateMutability': 'nonpayable', 'type': 'function'}, {'inputs': [], 'name': 'deposit', 'outputs': [], 'stateMutability': 'payable', 'type': 'function'}, {'inputs': [{'internalType': 'address', 'name': '_to', 'type': 'address'}], 'name': 'depositTo', 'outputs': [], 'stateMutability': 'payable', 'type': 'function'}, {'inputs': [], 'name': 'eip712Domain', 'outputs': [{'internalType': 'bytes1', 'name': 'fields', 'type': 'bytes1'}, {'internalType': 'string', 'name': 'name', 'type': 'string'}, {'internalType': 'string', 'name': 'version', 'type': 'string'}, {'internalType': 'uint256', 'name': 'chainId', 'type': 'uint256'}, {'internalType': 'address', 'name': 'verifyingContract', 'type': 'address'}, {'internalType': 'bytes32', 'name': 'salt', 'type': 'bytes32'}, {'internalType': 'uint256[]', 'name': 'extensions', 'type': 'uint256[]'}], 'stateMutability': 'view', 'type': 'function'}, {'inputs': [{'internalType': 'address', 'name': 'spender', 'type': 'address'}, {'internalType': 'uint256', 'name': 'addedValue', 'type': 'uint256'}], 'name': 'increaseAllowance', 'outputs': [{'internalType': 'bool', 'name': '', 'type': 'bool'}], 'stateMutability': 'nonpayable', 'type': 'function'}, {'inputs': [{'internalType': 'string', 'name': 'name_', 'type': 'string'}, {'internalType': 'string', 'name': 'symbol_', 'type': 'string'}], 'name': 'initialize', 'outputs': [], 'stateMutability': 'nonpayable', 'type': 'function'}, {'inputs': [], 'name': 'l1Address', 'outputs': [{'internalType': 'address', 'name': '', 'type': 'address'}], 'stateMutability': 'view', 'type': 'function'}, {'inputs': [], 'name': 'l2Bridge', 'outputs': [{'internalType': 'address', 'name': '', 'type': 'address'}], 'stateMutability': 'view', 'type': 'function'}, {'inputs': [], 'name': 'name', 'outputs': [{'internalType': 'string', 'name': '', 'type': 'string'}], 'stateMutability': 'view', 'type': 'function'}, {'inputs': [{'internalType': 'address', 'name': 'owner', 'type': 'address'}], 'name': 'nonces', 'outputs': [{'internalType': 'uint256', 'name': '', 'type': 'uint256'}], 'stateMutability': 'view', 'type': 'function'}, {'inputs': [{'internalType': 'address', 'name': 'owner', 'type': 'address'}, {'internalType': 'address', 'name': 'spender', 'type': 'address'}, {'internalType': 'uint256', 'name': 'value', 'type': 'uint256'}, {'internalType': 'uint256', 'name': 'deadline', 'type': 'uint256'}, {'internalType': 'uint8', 'name': 'v', 'type': 'uint8'}, {'internalType': 'bytes32', 'name': 'r', 'type': 'bytes32'}, {'internalType': 'bytes32', 'name': 's', 'type': 'bytes32'}], 'name': 'permit', 'outputs': [], 'stateMutability': 'nonpayable', 'type': 'function'}, {'inputs': [], 'name': 'symbol', 'outputs': [{'internalType': 'string', 'name': '', 'type': 'string'}], 'stateMutability': 'view', 'type': 'function'}, {'inputs': [], 'name': 'totalSupply', 'outputs': [{'internalType': 'uint256', 'name': '', 'type': 'uint256'}], 'stateMutability': 'view', 'type': 'function'}, {'inputs': [{'internalType': 'address', 'name': 'to', 'type': 'address'}, {'internalType': 'uint256', 'name': 'amount', 'type': 'uint256'}], 'name': 'transfer', 'outputs': [{'internalType': 'bool', 'name': '', 'type': 'bool'}], 'stateMutability': 'nonpayable', 'type': 'function'}, {'inputs': [{'internalType': 'address', 'name': 'from', 'type': 'address'}, {'internalType': 'address', 'name': 'to', 'type': 'address'}, {'internalType': 'uint256', 'name': 'amount', 'type': 'uint256'}], 'name': 'transferFrom', 'outputs': [{'internalType': 'bool', 'name': '', 'type': 'bool'}], 'stateMutability': 'nonpayable', 'type': 'function'}, {'inputs': [{'internalType': 'uint256', 'name': '_amount', 'type': 'uint256'}], 'name': 'withdraw', 'outputs': [], 'stateMutability': 'nonpayable', 'type': 'function'}, {'inputs': [{'internalType': 'address', 'name': '_to', 'type': 'address'}, {'internalType': 'uint256', 'name': '_amount', 'type': 'uint256'}], 'name': 'withdrawTo', 'outputs': [], 'stateMutability': 'nonpayable', 'type': 'function'}, {'stateMutability': 'payable', 'type': 'receive'}]

ZERO_ADDRESS = '0x0000000000000000000000000000000000000000'

ETH_MASK = '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE'

TOKENS_PER_CHAIN = {
    'BeraChain':{
        'BERA'              : "0x5806E416dA447b267cEA759358cF22Cc41FAE80F",
        'WBERA'             : "0x5806E416dA447b267cEA759358cF22Cc41FAE80F",
        'BGT'               : "0xAcD97aDBa1207dCf27d5C188455BEa8a32E80B8b",
        'STGUSDC'           : "0x6581e59A1C8dA66eD0D313a0d4029DcE2F746Cc5",
        'WBTC'              : "0x9DAD8A1F64692adeB74ACa26129e0F16897fF4BB",
        'HONEY'             : "0x7EeCA4205fF31f947EdBd49195a7A88E6A91161B",
        'WETH'              : "0x8239FBb3e3D0C2cDFd7888D8aF7701240Ac4DcA4",
    }
}

HONEYJAR_CONTRACTS = {
    'router'                   : "0x6553444CaA1d4FA329aa9872008ca70AE6131925",
    'bera_red'                 : "0xDc094eaC7CC01224E798F34543a8F9e9D2559479"
}

BEND_CONTRACTS = {
    'router'                 : "0x9261b5891d3556e829579964B38fe706D0A2D04a"
}

BERPS_CONTRACTS = {
    'router'                 : "0x95c5B81Fb99c91D4EAE15a28302c0200607b9D4e"
}

BERADOMAIN_CONTRACTS = {
    'router'                 : "0x8D20B92B4163140F413AA52A4106fF9490bf2122"
}

STATION_CONTRACTS = {
    'delegate'                 : "0xd9A998CaC66092748FfEc7cFBD155Aae1737C2fF",
    'vote'                     : "0x7b5Fe22B5446f7C62Ea27B8BD71CeF94e03f3dF2"
}

DIRAC_CONTRACTS = {
    'musdc_claim'                 : "0x329cCf8C40B3a808A229c8e6EFafa5A285f815eE",
    'router'                      : "0x7b5Fe22B5446f7C62Ea27B8BD71CeF94e03f3dF2"
}

BOBA_CONTRACTS = {
    'router'                      : "0x1F136a43101D12F98c9887D46D7cDbEFACdd573D"
}

BEX_CONTRACTS = {
    'router'                 : "0x0d5862FDbdd12490f9b4De54c236cff63B038074",
    'bera_usdc_pool'         : "0x7D5b5C1937ff1b18B45AbC64aeAB68663a7a58Ab",
    'bera_mim_pool'         : "0xC793C76fE0D5c79550034983D966c21a50Fb5e38"
}

HONEY_CONTRACTS = {
    'router'                 : "0x09ec711b81cD27A6466EC40960F2f8D85BB129D9"
}

HELP_SOFTWARE = True  # True or False | True = You support me 1% amount of transactions on aggregator`s

CHAIN_NAME = {
    1: 'BeraChain',
}

IMAP_CONFIG = {
    'outlook.com': 'outlook.office365.com',
    'hotmail.com': 'imap-mail.outlook.com',
}

ACCOUNT_NAMES, PRIVATE_KEYS, PROXIES, EMAIL_ADDRESSES, EMAIL_PASSWORDS = get_accounts_data()


TITLE = """
$$$$$$$\                               $$\      $$\                     $$\       $$\                     
$$  __$$\                              $$$\    $$$ |                    $$ |      \__|                    
$$ |  $$ | $$$$$$\   $$$$$$\  $$$$$$\  $$$$\  $$$$ | $$$$$$\   $$$$$$$\ $$$$$$$\  $$\ $$$$$$$\   $$$$$$\  
$$$$$$$\ |$$  __$$\ $$  __$$\ \____$$\ $$\$$\$$ $$ | \____$$\ $$  _____|$$  __$$\ $$ |$$  __$$\ $$  __$$\ 
$$  __$$\ $$$$$$$$ |$$ |  \__|$$$$$$$ |$$ \$$$  $$ | $$$$$$$ |$$ /      $$ |  $$ |$$ |$$ |  $$ |$$$$$$$$ |
$$ |  $$ |$$   ____|$$ |     $$  __$$ |$$ |\$  /$$ |$$  __$$ |$$ |      $$ |  $$ |$$ |$$ |  $$ |$$   ____|
$$$$$$$  |\$$$$$$$\ $$ |     \$$$$$$$ |$$ | \_/ $$ |\$$$$$$$ |\$$$$$$$\ $$ |  $$ |$$ |$$ |  $$ |\$$$$$$$\ 
\_______/  \_______|\__|      \_______|\__|     \__| \_______| \_______|\__|  \__|\__|\__|  \__| \_______|
"""


================================================
FILE: data/services/bad_wallets.json
================================================


================================================
FILE: data/services/wallets_progress.json
================================================


================================================
FILE: functions.py
================================================
from modules import *
from utils.networks import *


def get_client(account_number, private_key, proxy, email_address=None, email_password=None) -> Client:
    return Client(account_number, private_key, proxy, email_address, email_password)


def get_network_by_chain_id(chain_id):
    return {
        48: BeraChainRPC
    }[chain_id]


async def mint_berachain_tokens(account_number, private_key, proxy, *_):
    worker = Faucet(get_client(account_number, private_key, proxy))
    return await worker.claim_berachain_tokens()


async def swap_bex(account_number, private_key, proxy, *_, **kwargs):
    worker = BeraChain(get_client(account_number, private_key, proxy))
    return await worker.swap_bex(**kwargs)


async def swap_btc_bex(account_number, private_key, proxy, *_, **kwargs):
    worker = Custom(get_client(account_number, private_key, proxy))
    return await worker.swap_btc_bex(**kwargs)


async def swap_eth_bex(account_number, private_key, proxy, *_, **kwargs):
    worker = Custom(get_client(account_number, private_key, proxy))
    return await worker.swap_eth_bex(**kwargs)


async def swap_honey_bex(account_number, private_key, proxy, *_, **kwargs):
    worker = Custom(get_client(account_number, private_key, proxy))
    return await worker.swap_honey_bex(**kwargs)


async def swap_stgusdc_bex(account_number, private_key, proxy, *_, **kwargs):
    worker = Custom(get_client(account_number, private_key, proxy))
    return await worker.swap_stgusdc_bex(**kwargs)


async def add_liqiudity_bex_bera_usdc(account_number, private_key, proxy, *_, **kwargs):
    worker = BeraChain(get_client(account_number, private_key, proxy))
    return await worker.add_liquidity_bex(**kwargs)


async def add_liqiudity_bex_honey_mim(account_number, private_key, proxy, *_, **kwargs):
    worker = BeraChain(get_client(account_number, private_key, proxy))
    return await worker.add_liquidity_bex_mim(**kwargs)


async def supply_honey_bend(account_number, private_key, proxy, *_, **kwargs):
    worker = BeraChain(get_client(account_number, private_key, proxy))
    return await worker.supply_honey_bend(**kwargs)


async def deposit_honey_berps(account_number, private_key, proxy, *_, **kwargs):
    worker = BeraChain(get_client(account_number, private_key, proxy))
    return await worker.deposit_honey_berps_vault(**kwargs)


async def claim_bgt_on_berps(account_number, private_key, proxy, *_, **kwargs):
    worker = BeraChain(get_client(account_number, private_key, proxy))
    return await worker.claim_bgt_on_berps(**kwargs)


async def delegate_bgt_on_station(account_number, private_key, proxy, *_, **kwargs):
    worker = BeraChain(get_client(account_number, private_key, proxy))
    return await worker.delegate_bgt_on_station(**kwargs)


async def vote_bgt_on_station(account_number, private_key, proxy, *_, **kwargs):
    worker = BeraChain(get_client(account_number, private_key, proxy))
    return await worker.vote_bgt_on_station(**kwargs)


async def deploy_contract(account_number, private_key, proxy, *_, **kwargs):
    worker = BeraChain(get_client(account_number, private_key, proxy))
    return await worker.deploy_contract(**kwargs)


async def supply_btc_bend(account_number, private_key, proxy, *_, **kwargs):
    worker = BeraChain(get_client(account_number, private_key, proxy))
    return await worker.supply_btc_bend(**kwargs)


async def supply_eth_bend(account_number, private_key, proxy, *_, **kwargs):
    worker = BeraChain(get_client(account_number, private_key, proxy))
    return await worker.supply_eth_bend(**kwargs)


async def withdraw_honey_bend(account_number, private_key, proxy, *_, **kwargs):
    worker = BeraChain(get_client(account_number, private_key, proxy))
    return await worker.withdraw_honey_bend(**kwargs)


async def withdraw_btc_bend(account_number, private_key, proxy, *_, **kwargs):
    worker = BeraChain(get_client(account_number, private_key, proxy))
    return await worker.withdraw_btc_bend(**kwargs)


async def withdraw_eth_bend(account_number, private_key, proxy, *_, **kwargs):
    worker = BeraChain(get_client(account_number, private_key, proxy))
    return await worker.withdraw_eth_bend(**kwargs)


async def mint_honey(account_number, private_key, proxy, *_, **kwargs):
    worker = BeraChain(get_client(account_number, private_key, proxy))
    return await worker.swap_honey(**kwargs)


async def mint_booga_ticket(account_number, private_key, proxy, *_, **kwargs):
    worker = BeraChain(get_client(account_number, private_key, proxy))
    return await worker.mint_booga_ticket(**kwargs)


async def mint_bera_red(account_number, private_key, proxy, *_, **kwargs):
    worker = BeraChain(get_client(account_number, private_key, proxy))
    return await worker.mint_bera_red(**kwargs)


async def claim_musdc(account_number, private_key, proxy, *_, **kwargs):
    worker = BeraChain(get_client(account_number, private_key, proxy))
    return await worker.claim_musdc()


async def mint_boba(account_number, private_key, proxy, *_, **kwargs):
    worker = BeraChain(get_client(account_number, private_key, proxy))
    return await worker.mint_boba(**kwargs)


async def mint_valhala_nft(account_number, private_key, proxy, *_, **kwargs):
    worker = BeraChain(get_client(account_number, private_key, proxy))
    return await worker.mint_valhala_nft(**kwargs)


async def mint_domain(account_number, private_key, proxy, *_, **kwargs):
    worker = BeraChain(get_client(account_number, private_key, proxy))
    return await worker.mint_domain(**kwargs)


async def claim_galxe_points(account_number, private_key, proxy, email_address, email_password, **kwargs):
    worker = Galxe(get_client(account_number, private_key, proxy, email_address, email_password))
    return await worker.claim_galxe_points_berachain_faucet(**kwargs)


async def claim_galxe_campaign_points(account_number, private_key, proxy, email_address, email_password, **kwargs):
    worker = Galxe(get_client(account_number, private_key, proxy, email_address, email_password))
    return await worker.claim_bera_campaign_points()


================================================
FILE: main.py
================================================
import asyncio
import sys

from config import TITLE
from termcolor import cprint
from questionary import Choice, select
from modules.interfaces import SoftwareException
from utils.modules_runner import Runner
from utils.route_generator import RouteGenerator
from utils.tools import check_progress_file


def are_you_sure(module=None, gen_route:bool = False):
    if gen_route or check_progress_file():
        answer = select(
            '\n ⚠️⚠️⚠️ THAT ACTION WILL DELETE ALL PREVIOUS PROGRESS FOR CLASSIC-ROUTES, continue? ⚠️⚠️⚠️ \n',
            choices=[
                Choice("❌ NO", 'main'),
                Choice("✅ YES", 'module'),
            ],
            qmark='☢️',
            pointer='👉'
        ).ask()
        print()
        if answer == 'main':
            main()
        else:
            if module:
                module()


def main():
    cprint(TITLE, color='light_cyan')
    cprint(f'\n❤️ My channel for latest updates: https://t.me/askaer\n', 'light_green', attrs=["blink"])
    try:
        while True:
            answer = select(
                'What do you want to do?',
                choices=[
                    Choice("🚀 Start running classic routes for each wallet", 'classic_routes_run'),
                    Choice("📄 Generate classic-route for each wallet", 'classic_routes_gen'),
                    Choice("✅ Check the connection of each proxy", 'check_proxy'),
                    Choice('❌ Exit', "exit")
                ],
                qmark='🛠️',
                pointer='👉'
            ).ask()

            runner = Runner()

            if answer == 'check_proxy':
                print()
                asyncio.run(runner.check_proxies_status())
                print()
            elif answer == 'classic_routes_run':
                print()
                asyncio.run(runner.run_accounts())
                print()
            elif answer == 'classic_routes_gen':
                generator = RouteGenerator()
                are_you_sure(generator.classic_routes_json_save, gen_route=True)
            elif answer == 'exit':
                sys.exit()
            else:
                print()
                answer()
                print()
    except KeyboardInterrupt:
        cprint(f'\nQuick software shutdown by <ctrl + C>', color='light_yellow')
        sys.exit()

    except SoftwareException as error:
        cprint(f'\n{error}', color='light_red')
        sys.exit()


if __name__ == "__main__":
    main()


================================================
FILE: modules/__init__.py
================================================
from .interfaces import RequestClient, Logger
from .client import Client
from .berachain import BeraChain
from .cutsom_module import Custom
from .faucets import Faucet
from .galxe import Galxe


================================================
FILE: modules/berachain.py
================================================
import random

from faker import Faker

from modules import RequestClient, Logger
from modules.interfaces import SoftwareException, SoftwareExceptionWithoutRetry
from utils.tools import helper
from config import BEX_ABI, TOKENS_PER_CHAIN, BEX_CONTRACTS, ZERO_ADDRESS, HONEY_CONTRACTS, HONEY_ABI, HONEYJAR_ABI, \
    HONEYJAR_CONTRACTS, BEND_CONTRACTS, BEND_ABI, BERADOMAIN_ABI, BERADOMAIN_CONTRACTS, BERPS_CONTRACTS, BERPS_ABI, \
    STATION_CONTRACTS, STATION_ABI, DIRAC_CONTRACTS, DIRAC_ABI, BOBA_CONTRACTS, BOBA_ABI


class BeraChain(Logger, RequestClient):
    def __init__(self, client):
        self.client = client
        Logger.__init__(self)
        RequestClient.__init__(self, client)

        self.network = self.client.network.name
        self.bex_router_contract = self.client.get_contract(BEX_CONTRACTS['router'], BEX_ABI['router'])
        self.honey_router_contract = self.client.get_contract(HONEY_CONTRACTS['router'], HONEY_ABI['router'])
        self.pool_contract = self.client.get_contract(BEX_CONTRACTS['bera_usdc_pool'], BEX_ABI['router'])
        self.honeyjar_contract = self.client.get_contract(HONEYJAR_CONTRACTS['router'], HONEYJAR_ABI['router'])
        self.honeyjar_contract2 = self.client.get_contract(HONEYJAR_CONTRACTS['bera_red'], HONEYJAR_ABI['router'])
        self.bend_contract = self.client.get_contract(BEND_CONTRACTS['router'], BEND_ABI['router'])
        self.berps_contract = self.client.get_contract(BERPS_CONTRACTS['router'], BERPS_ABI['router'])
        self.domain_contract = self.client.get_contract(BERADOMAIN_CONTRACTS['router'], BERADOMAIN_ABI['router'])
        self.station_contract = self.client.get_contract(STATION_CONTRACTS['delegate'], STATION_ABI['delegate'])
        self.station_contract2 = self.client.get_contract(STATION_CONTRACTS['vote'], STATION_ABI['vote'])
        self.musdc_claim = self.client.get_contract(DIRAC_CONTRACTS['musdc_claim'], DIRAC_ABI['musdc_claim'])
        self.boba_mint = self.client.get_contract(BOBA_CONTRACTS['router'], BOBA_ABI['router'])

    async def get_min_amount_out(self, from_token_address: str, to_token_address: str, amount_in_wei: int):
        min_amount_out = await self.bex_router_contract.functions.querySwap(
            from_token_address,
            to_token_address,
            amount_in_wei
        ).call()

        return int(min_amount_out - (min_amount_out / 100 * 5))

    async def get_swap_steps(self, from_token_address: str, to_token_address: str, amount_in_wei: int):
        url = f'https://artio-80085-dex-router.berachain.com/dex/route'

        params = {
            'quoteAsset': to_token_address,
            'baseAsset': from_token_address,
            'amount': amount_in_wei,
            'swap_type': 'given_in',
        }

        return (await self.make_request(url=url, params=params))['steps']

    @helper
    async def swap_bex(self, swapdata:dict = None):

        from_token_name, to_token_name, amount, amount_in_wei = swapdata

        self.logger_msg(*self.client.acc_info, msg=f'Swap on BEX: {amount} {from_token_name} -> {to_token_name}')

        token_data = TOKENS_PER_CHAIN[self.network]

        native_address = token_data['BERA'].lower()
        from_token_address = token_data[from_token_name]
        to_token_address = token_data[to_token_name]
        swap_steps = await self.get_swap_steps(from_token_address, to_token_address, amount_in_wei)
        deadline = 99999999
        swap_data = []

        from_token_balance, _, _ = await self.client.get_token_balance(from_token_name, check_symbol=False)

        if from_token_balance >= amount_in_wei:

            if from_token_name != self.client.network.token:
                await self.client.check_for_approved(
                    from_token_address, BEX_CONTRACTS[self.network]['router'], amount_in_wei
                )

            for index, step in enumerate(swap_steps):
                swap_data.append([
                    self.client.w3.to_checksum_address(step["pool"]),
                    self.client.w3.to_checksum_address(step["assetIn"]) if step['assetIn'] != native_address else ZERO_ADDRESS,
                    int(step["amountIn"]),
                    self.client.w3.to_checksum_address(step["assetOut"]),
                    int(int(step["amountOut"]) * 0.95) if index != 0 else 0,
                    "0x"
                ])

            tx_params = await self.client.prepare_transaction(
                value=amount_in_wei if from_token_name == self.client.network.token else 0
            )

            transaction = await self.bex_router_contract.functions.batchSwap(
                0,
                swap_data,
                deadline
            ).build_transaction(tx_params)

            return await self.client.send_transaction(transaction)
        else:
            raise SoftwareException('Insufficient balance on account!')

    @helper
    async def add_liquidity_bex(self):
        amount = round(random.uniform(0.001, 0.003), 4)
        amount_in_wei = int(amount * 10 ** 18)

        self.logger_msg(*self.client.acc_info, msg=f'Add liquidity to BEX BERA/STGUSDC pool: {amount} BERA')

        tx_params = await self.client.prepare_transaction(value=amount_in_wei)
        transaction = await self.bex_router_contract.functions.addLiquidity(
            BEX_CONTRACTS['bera_usdc_pool'],
            self.client.address,
            [ZERO_ADDRESS],
            [amount_in_wei]
        ).build_transaction(tx_params)

        return await self.client.send_transaction(transaction)

    @helper
    async def add_liquidity_bex_mim(self):
        amount = round(random.uniform(0.001, 0.003), 4)
        amount_in_wei = int(amount * 10 ** 18)

        self.logger_msg(*self.client.acc_info, msg=f'Add liquidity to BEX HONEY/MIM pool: {amount} HONEY')

        honey_token_address = TOKENS_PER_CHAIN['BeraChain']['HONEY']

        await self.client.check_for_approved(honey_token_address, BEX_CONTRACTS['router'], amount_in_wei)

        tx_params = await self.client.prepare_transaction(value=amount_in_wei)
        transaction = await self.bex_router_contract.functions.addLiquidity(
            BEX_CONTRACTS['bera_mim_pool'],
            self.client.address,
            [honey_token_address],
            [amount_in_wei]
        ).build_transaction(tx_params)

        return await self.client.send_transaction(transaction)

    @helper
    async def swap_honey(self):

        amount_in_wei, amount, _ = await self.client.get_token_balance('STGUSDC')

        amount = round(amount, 6)

        self.logger_msg(*self.client.acc_info, msg=f'Swap on Honey: {amount} STGUSDC -> HONEY')

        from_token_address = TOKENS_PER_CHAIN[self.network]['STGUSDC']

        await self.client.check_for_approved(from_token_address, HONEY_CONTRACTS['router'], amount_in_wei)

        transaction = await self.honey_router_contract.functions.mint(
            self.client.address,
            from_token_address,
            amount_in_wei
        ).build_transaction(await self.client.prepare_transaction())

        return await self.client.send_transaction(transaction)

    @helper
    async def mint_booga_ticket(self):

        self.logger_msg(*self.client.acc_info, msg=f'Mint NFT on 0xHONEYJAR. Price : 4.2 HONEY')

        from_token_address = TOKENS_PER_CHAIN[self.network]['HONEY']

        await self.client.check_for_approved(from_token_address, HONEYJAR_CONTRACTS['router'], int(4.2 * 10 ** 18))

        transaction = await self.honeyjar_contract.functions.buy().build_transaction(
            await self.client.prepare_transaction()
        )

        return await self.client.send_transaction(transaction)

    @helper
    async def mint_bera_red(self):

        self.logger_msg(*self.client.acc_info, msg=f'Mint BERA RED ENVELOPE. Price : 1.78 HONEY')

        from_token_address = TOKENS_PER_CHAIN[self.network]['HONEY']

        await self.client.check_for_approved(from_token_address, HONEYJAR_CONTRACTS['bera_red'], int(1.776 * 10 ** 18))

        transaction = await self.honeyjar_contract2.functions.buy().build_transaction(
            await self.client.prepare_transaction()
        )

        return await self.client.send_transaction(transaction)

    # @helper
    # async def mint_valhala_nft(self):
    #     url = 'https://mint.valhalla.land/site/character-mint-native-token'
    #
    #     payload = {
    #         'address': self.client.address
    #     }
    #
    #     headers = {
    #         "accept": "application/json, text/javascript, */*; q=0.01",
    #         "accept-language": "ru,en;q=0.9,en-GB;q=0.8,en-US;q=0.7",
    #         "content-type": "application/x-www-form-urlencoded; charset=UTF-8",
    #         "sec-ch-ua": "\"Chromium\";v=\"122\", \"Not(A:Brand\";v=\"24\", \"Microsoft Edge\";v=\"122\"",
    #         "sec-ch-ua-mobile": "?0",
    #         "sec-ch-ua-platform": "\"Windows\"",
    #         "sec-fetch-dest": "empty",
    #         "sec-fetch-mode": "cors",
    #         'Cookie': 'advanced-frontend=hv3db91no3nmojqtlhrpdm34ia; _csrf=8efd9a44b9e5c088945e9fe00c244282a1e4fd3d85d5605260fb2e659e111b99a%3A2%3A%7Bi%3A0%3Bs%3A5%3A%22_csrf%22%3Bi%3A1%3Bs%3A32%3A%22Wt66_45B74auzhKaY5rIcSTrapxxNqpB%22%3B%7D',
    #         "sec-fetch-site": "same-origin",
    #         "x-csrf-token": "pWcVT31UVrSdgD-2CRMbwBQ5lr8jidWqDLs4HPQjVe_yEyN5ImBj9qq0XsNze1ChTQzk9kDagdhty0BkulIlrQ==",
    #         "x-kl-saas-ajax-request": "Ajax_Request",
    #         "x-requested-with": "XMLHttpRequest",
    #         "referrer": "https://mint.valhalla.land/",
    #         "referrerPolicy": "strict-origin-when-cross-origin",
    #     }
    #
    #     response = await self.make_request(method="POST", url=url, headers=headers, data=f'wallet={self.client.address}')
    #
    #     print(response)
    #     return
    #
    #     self.logger_msg(*self.client.acc_info, msg=f'Mint BERA RED ENVELOPE. Price : 1.78 HONEY')
    #
    #     from_token_address = TOKENS_PER_CHAIN[self.network]['HONEY']
    #
    #     await self.client.check_for_approved(from_token_address, HONEYJAR_CONTRACTS['bera_red'], int(1.776 * 10 ** 18))
    #
    #     transaction = await self.honeyjar_contract2.functions.buy().build_transaction(
    #         await self.client.prepare_transaction()
    #     )
    #
    #     return await self.client.send_transaction(transaction)

    @helper
    async def supply_honey_bend(self):
        amount_in_wei, amount, _ = await self.client.get_token_balance('HONEY')

        self.logger_msg(*self.client.acc_info, msg=f'Supply {amount} $HONEY on Bend Dashboard')

        from_token_address = TOKENS_PER_CHAIN[self.network]['HONEY']

        await self.client.check_for_approved(from_token_address, BEND_CONTRACTS['router'], amount_in_wei)

        transaction = await self.bend_contract.functions.supply(
            from_token_address,
            amount_in_wei,
            self.client.address,
            0
        ).build_transaction(await self.client.prepare_transaction())

        return await self.client.send_transaction(transaction)

    @helper
    async def deposit_honey_berps_vault(self):
        amount = round(random.uniform(0.01, 0.05), 4)
        amount_in_wei = int(amount * 10 ** 18)

        self.logger_msg(*self.client.acc_info, msg=f'Staking {amount} $HONEY on Berps Vault')

        from_token_address = TOKENS_PER_CHAIN[self.network]['HONEY']

        await self.client.check_for_approved(from_token_address, BERPS_CONTRACTS['router'], amount_in_wei)

        transaction = await self.berps_contract.functions.deposit(
            amount_in_wei,
            self.client.address,
        ).build_transaction(await self.client.prepare_transaction())

        return await self.client.send_transaction(transaction)

    @helper
    async def claim_bgt_on_berps(self):
        amount_in_wei = int(await self.berps_contract.functions.pendingBGT(self.client.address).call() * 0.99)

        self.logger_msg(*self.client.acc_info, msg=f'Claim {amount_in_wei / 10 ** 18:.6f} $BGT on Berps Vault')

        transaction = await self.berps_contract.functions.claimBGT(
            amount_in_wei,
            self.client.address,
        ).build_transaction(await self.client.prepare_transaction())

        return await self.client.send_transaction(transaction)

    @helper
    async def withdraw_honey_bend(self):
        self.logger_msg(*self.client.acc_info, msg=f'Withdraw $HONEY from Bend Dashboard')

        from_token_address = TOKENS_PER_CHAIN[self.network]['HONEY']

        transaction = await self.bend_contract.functions.withdraw(
            from_token_address,
            2 ** 256 - 1,
            self.client.address,
        ).build_transaction(await self.client.prepare_transaction())

        return await self.client.send_transaction(transaction)

    @helper
    async def supply_btc_bend(self):
        amount = round(random.uniform(0.00001, 0.00005), 6)
        amount_in_wei = int(amount * 10 ** 18)

        self.logger_msg(*self.client.acc_info, msg=f'Supply {amount} $BTC on Bend Dashboard')

        from_token_address = TOKENS_PER_CHAIN[self.network]['WBTC']

        await self.client.check_for_approved(from_token_address, BEND_CONTRACTS['router'], amount_in_wei)

        transaction = await self.bend_contract.functions.supply(
            from_token_address,
            amount_in_wei,
            self.client.address,
            0
        ).build_transaction(await self.client.prepare_transaction())

        return await self.client.send_transaction(transaction)

    @helper
    async def borrow_honey_bend(self):
        amount = round(random.uniform(0.01, 0.05), 4)
        amount_in_wei = int(amount * 10 ** 18)

        self.logger_msg(*self.client.acc_info, msg=f'Supply {amount} $HONEY on Bend Dashboard')

        from_token_address = TOKENS_PER_CHAIN[self.network]['HONEY']

        await self.client.check_for_approved(from_token_address, BEND_CONTRACTS['router'], amount_in_wei)

        transaction = await self.bend_contract.functions.supply(
            from_token_address,
            amount_in_wei,
            self.client.address,
            0
        ).build_transaction(await self.client.prepare_transaction())

        return await self.client.send_transaction(transaction)

    @helper
    async def withdraw_btc_bend(self):
        self.logger_msg(*self.client.acc_info, msg=f'Withdraw $BTC from Bend Dashboard')

        from_token_address = TOKENS_PER_CHAIN[self.network]['WBTC']

        transaction = await self.bend_contract.functions.withdraw(
            from_token_address,
            2 ** 256 - 1,
            self.client.address,
        ).build_transaction(await self.client.prepare_transaction())

        return await self.client.send_transaction(transaction)

    @helper
    async def supply_eth_bend(self):
        amount = round(random.uniform(0.00001, 0.0005), 6)
        amount_in_wei = int(amount * 10 ** 18)

        self.logger_msg(*self.client.acc_info, msg=f'Supply {amount} $ETH on Bend Dashboard')

        from_token_address = TOKENS_PER_CHAIN[self.network]['WETH']

        await self.client.check_for_approved(from_token_address, BEND_CONTRACTS['router'], amount_in_wei)

        transaction = await self.bend_contract.functions.supply(
            from_token_address,
            amount_in_wei,
            self.client.address,
            0
        ).build_transaction(await self.client.prepare_transaction())

        return await self.client.send_transaction(transaction)

    @helper
    async def withdraw_eth_bend(self):
        self.logger_msg(*self.client.acc_info, msg=f'Withdraw $ETH from Bend Dashboard')

        from_token_address = TOKENS_PER_CHAIN[self.network]['WETH']

        transaction = await self.bend_contract.functions.withdraw(
            from_token_address,
            2 ** 256 - 1,
            self.client.address,
        ).build_transaction(await self.client.prepare_transaction())

        return await self.client.send_transaction(transaction)

    @helper
    async def mint_domain(self):
        domain = f'{Faker().word()}{random.randint(100, 999)}'

        self.logger_msg(*self.client.acc_info, msg=f'Mint domain on BeraNames')

        self.logger_msg(*self.client.acc_info, msg=f'Generated domain: {domain}.🐻⛓️')

        transaction = await self.domain_contract.functions.mintNative(
            [str(i) for i in domain],
            1,
            self.client.address,
            'https://beranames.com/api/metadata/69',
            self.client.address,
        ).build_transaction(await self.client.prepare_transaction(value=360126764621146))

        return await self.client.send_transaction(transaction)

    @helper
    async def delegate_bgt_on_station(self):
        self.logger_msg(*self.client.acc_info, msg=f'Delegate $BGT BeraChain Station')

        bgt_contract = self.client.get_contract(TOKENS_PER_CHAIN[self.network]['BGT'])

        amount_in_wei = await bgt_contract.functions.balanceOf(self.client.address).call()

        if amount_in_wei > 0:

            delegate_list = [
                "0x032238ba76Aadaa7C891967c4491fC18f81C6189",
                "0x0331A9665E8f47b4C289eb665f8466f68e9ae9a5",
                "0x034855669054BEbe87374317F1c848237a591046",
                "0x041e8463219316724eFBBE827409ABD1a57D9F6e",
                "0x0484Cc87F35088af7a0bCe3b155FFE2e91A9baa8",
                "0x069da50b99408c8c42d006AfbF3C7F600384edEA",
                "0x06A7D20154c336be6103B2D588e6c6ECeB571186",
                "0x0cf633F3a7478EAAbd73B7287B997D609B12A11a",
                "0x1C6Da144428b409aCB125ad0c26291DA6D484411",
                "0x07c74a2fEDCfC793FbD3adc5C9f5f864Af297b96",
                "0x26de86e871eab1E471AEd9fe343D4d75800EB587",
                "0x1Cc335D9c67a71C777282fdb28b0a2d5eBf42AF4",
                "0x46d2305eaFd69E9323d13328f5915C1fcE287f2F",
                "0x75d57E65d4330772293De0D5C2dBcA8f16F1A74F",
                "0x6F259Fc8B8eFCED1971824F3723e8798936Fef76",
            ]

            transaction = await self.station_contract.functions.delegate(
                random.choice(delegate_list),
                amount_in_wei
            ).build_transaction(await self.client.prepare_transaction())

            return await self.client.send_transaction(transaction)
        raise SoftwareExceptionWithoutRetry('Zero $BGT balance')

    @helper
    async def vote_bgt_on_station(self):
        self.logger_msg(*self.client.acc_info, msg=f'Vote on BeraChain Station')

        transaction = await self.station_contract2.functions.vote(
            random.randint(70, 93),
            1,
            ''
        ).build_transaction(await self.client.prepare_transaction())

        return await self.client.send_transaction(transaction)

    @helper
    async def deploy_contract(self):

        self.logger_msg(*self.client.acc_info, msg=f'Deploy contract on BeraChain')

        contract_data = ('0x60806040526000805461ffff1916905534801561001b57600080fd5b5060fb8061002a6000396000f3fe60806'
                         '04052348015600f57600080fd5b506004361060325760003560e01c80630c55699c146037578063b49004e91460'
                         '5b575b600080fd5b60005460449061ffff1681565b60405161ffff909116815260200160405180910390f35b606'
                         '16063565b005b60008054600191908190607a90849061ffff166096565b92506101000a81548161ffff02191690'
                         '8361ffff160217905550565b61ffff81811683821601908082111560be57634e487b7160e01b6000526011600452'
                         '60246000fd5b509291505056fea2646970667358221220666c87ec501268817295a4ca1fc6e3859faf241f38dd68'
                         '8f145135970920009264736f6c63430008120033')

        transcation = await self.client.prepare_transaction() | {
            'data': contract_data
        }

        return await self.client.send_transaction(transcation)

    @helper
    async def claim_musdc(self):

        self.logger_msg(*self.client.acc_info, msg=f'Claim mUSDC on dirac.finance')

        transaction = await self.musdc_claim.functions.mint(
            self.client.address,
            1000000000,
        ).build_transaction(await self.client.prepare_transaction())

        return await self.client.send_transaction(transaction)

    @helper
    async def mint_boba(self):

        self.logger_msg(*self.client.acc_info, msg=f'Mint $BOBA')

        transaction = await self.boba_mint.functions.boobaMint(
            15258789062500,
            True,
        ).build_transaction(await self.client.prepare_transaction())

        return await self.client.send_transaction(transaction)


================================================
FILE: modules/client.py
================================================
import asyncio
import random
import ssl

from asyncio import sleep
from aiohttp import ClientSession
from aiohttp_socks import ProxyConnector
from web3.exceptions import TransactionNotFound, TimeExhausted
from modules.interfaces import BlockchainException, SoftwareException
from modules import Logger
from utils.networks import BeraChainRPC
from config import ERC20_ABI, TOKENS_PER_CHAIN
from web3 import AsyncHTTPProvider, AsyncWeb3


class Client(Logger):
    def __init__(
            self, account_name: str | int, private_key: str, proxy: None | str = None,
            email_address:str = None, email_password:str = None
    ):
        Logger.__init__(self)
        self.network = BeraChainRPC
        self.eip1559_support = BeraChainRPC.eip1559_support
        self.token = BeraChainRPC.token
        self.explorer = BeraChainRPC.explorer
        self.chain_id = BeraChainRPC.chain_id

        self.proxy_init = proxy

        self.session = ClientSession(connector=ProxyConnector.from_url(f'http://{proxy}', ssl=ssl.create_default_context(), verify_ssl=True))
        self.session.headers.update({
            'User-Agent': self.get_user_agent()
        })
        self.request_kwargs = {"proxy": f"http://{proxy}", "verify_ssl": False} if proxy else {"verify_ssl": False}
        self.rpc = random.choice(BeraChainRPC.rpc)
        self.w3 = AsyncWeb3(AsyncHTTPProvider(self.rpc, request_kwargs=self.request_kwargs))
        self.account_name = str(account_name)
        self.private_key = private_key
        self.address = AsyncWeb3.to_checksum_address(self.w3.eth.account.from_key(private_key).address)
        self.acc_info = account_name, self.address

        if email_address and email_password:
            self.email_address = email_address
            self.email_login = email_address.split('@')[0]
            self.email_password = email_password

    @staticmethod
    def round_amount(min_amount: float, max_amount: float) -> float:
        decimals = max(len(str(min_amount)) - 1, len(str(max_amount)) - 1)
        return round(random.uniform(min_amount, max_amount), decimals + 2)

    @staticmethod
    def get_user_agent():
        random_version = f"{random.uniform(520, 540):.2f}"
        return (f'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/{random_version}'
                f' (KHTML, like Gecko) Chrome/121.0.0.0 Safari/{random_version} Edg/121.0.0.0')

    @staticmethod
    def get_normalize_error(error):
        try:
            if isinstance(error.args[0], dict):
                error = error.args[0].get('message', error)
            return error
        except:
            return error

    async def change_rpc(self):
        self.logger_msg(
            self.account_name, None, msg=f'Trying to replace RPC', type_msg='warning')

        if len(self.network.rpc) != 1:
            rpcs_list = [rpc for rpc in self.network.rpc if rpc != self.rpc]
            new_rpc = random.choice(rpcs_list)
            self.w3 = AsyncWeb3(AsyncHTTPProvider(new_rpc, request_kwargs=self.request_kwargs))
            self.logger_msg(
                self.account_name, None,
                msg=f'RPC successfully replaced. New RPC: {new_rpc}', type_msg='success')
        else:
            self.logger_msg(
                self.account_name, None,
                msg=f'This network has only 1 RPC, no replacement is possible', type_msg='warning')

    async def get_decimals(self, token_name: str):
        contract = self.get_contract(TOKENS_PER_CHAIN[self.network.name][token_name])
        return await contract.functions.decimals().call()

    async def get_token_balance(
            self, token_name: str = 'ETH', check_symbol: bool = True, check_native: bool = False
    ) -> [float, int, str]:
        if not check_native:
            if token_name != self.network.token:
                contract = self.get_contract(TOKENS_PER_CHAIN[self.network.name][token_name])

                amount_in_wei = await contract.functions.balanceOf(self.address).call()
                decimals = await contract.functions.decimals().call()

                if check_symbol:
                    symbol = await contract.functions.symbol().call()
                    return amount_in_wei, amount_in_wei / 10 ** decimals, symbol
                return amount_in_wei, amount_in_wei / 10 ** decimals, ''

        amount_in_wei = await self.w3.eth.get_balance(self.address)
        return amount_in_wei, amount_in_wei / 10 ** 18, self.network.token

    def get_contract(self, contract_address: str, abi=ERC20_ABI):
        return self.w3.eth.contract(
            address=AsyncWeb3.to_checksum_address(contract_address),
            abi=abi
        )

    async def get_allowance(self, token_address: str, spender_address: str) -> int:
        contract = self.get_contract(token_address)
        return await contract.functions.allowance(
            self.address,
            spender_address
        ).call()

    async def get_priotiry_fee(self):
        fee_history = await self.w3.eth.fee_history(25, 'latest', [20.0])
        non_empty_block_priority_fees = [fee[0] for fee in fee_history["reward"] if fee[0] != 0]

        divisor_priority = max(len(non_empty_block_priority_fees), 1)

        priority_fee = int(round(sum(non_empty_block_priority_fees) / divisor_priority))

        return priority_fee

    async def prepare_transaction(self, value: int = 0):
        try:
            tx_params = {
                'from': self.w3.to_checksum_address(self.address),
                'nonce': await self.w3.eth.get_transaction_count(self.address),
                'value': value,
                'chainId': self.network.chain_id
            }

            if self.network.eip1559_support:

                base_fee = await self.w3.eth.gas_price
                max_priority_fee_per_gas = await self.get_priotiry_fee()
                max_fee_per_gas = base_fee + max_priority_fee_per_gas

                tx_params['maxPriorityFeePerGas'] = max_priority_fee_per_gas
                tx_params['maxFeePerGas'] = int(max_fee_per_gas * 1.5)
                tx_params['type'] = '0x2'
            else:
                tx_params['gasPrice'] = int(await self.w3.eth.gas_price * 1.5)

            return tx_params
        except Exception as error:
            raise BlockchainException(f'{self.get_normalize_error(error)}')

    async def make_approve(self, token_address: str, spender_address: str, amount_in_wei: int):
        transaction = await self.get_contract(token_address).functions.approve(
            spender_address,
            amount=amount_in_wei
        ).build_transaction(await self.prepare_transaction())

        return await self.send_transaction(transaction)

    async def check_for_approved(self, token_address: str, spender_address: str,
                                 amount_in_wei: int, without_bal_check: bool = False) -> bool:
        try:
            contract = self.get_contract(token_address)

            balance_in_wei = await contract.functions.balanceOf(self.address).call()
            symbol = await contract.functions.symbol().call()

            self.logger_msg(*self.acc_info, msg=f'Check for approval {symbol}')

            if not without_bal_check and balance_in_wei <= 0:
                raise SoftwareException(f'Zero {symbol} balance')

            approved_amount_in_wei = await self.get_allowance(
                token_address=token_address,
                spender_address=spender_address
            )

            if amount_in_wei <= approved_amount_in_wei:
                self.logger_msg(*self.acc_info, msg=f'Already approved')
                return False

            result = await self.make_approve(token_address, spender_address, amount_in_wei)

            await sleep(random.randint(5, 9))
            return result
        except Exception as error:
            raise BlockchainException(f'{self.get_normalize_error(error)}')

    async def send_transaction(self, transaction, need_hash: bool = False, without_gas: bool = False,
                               poll_latency: int = 10, timeout: int = 360):
        try:
            if not without_gas:
                transaction['gas'] = int((await self.w3.eth.estimate_gas(transaction)) * 1.5)
        except Exception as error:
            raise BlockchainException(f'{self.get_normalize_error(error)}')

        try:
            singed_tx = self.w3.eth.account.sign_transaction(transaction, self.private_key)
            tx_hash = await self.w3.eth.send_raw_transaction(singed_tx.rawTransaction)
        except Exception as error:
            if self.get_normalize_error(error) == 'already known':
                self.logger_msg(*self.acc_info, msg='RPC got error, but tx was send', type_msg='warning')
                return True
            else:
                raise BlockchainException(f'{self.get_normalize_error(error)}')

        try:

            total_time = 0
            timeout = timeout if self.network.name != 'Polygon' else 1200

            while True:
                try:
                    receipts = await self.w3.eth.get_transaction_receipt(tx_hash)
                    status = receipts.get("status")
                    if status == 1:
                        message = f'Transaction was successful: {self.explorer}tx/{tx_hash.hex()}'
                        self.logger_msg(*self.acc_info, msg=message, type_msg='success')
                        if need_hash:
                            return tx_hash
                        return True
                    elif status is None:
                        await asyncio.sleep(poll_latency)
                    else:
                        return SoftwareException(f'Transaction failed: {self.explorer}tx/{tx_hash.hex()}')
                except TransactionNotFound:
                    if total_time > timeout:
                        if self.network.name in ['BNB Chain', 'Moonbeam']:
                            self.logger_msg(
                                *self.acc_info,
                                msg=f'Transaction was sent and tried to be confirmed, but not finished yet',
                                type_msg='warning')
                            return True
                        raise TimeExhausted(f"Transaction is not in the chain after {timeout} seconds")
                    total_time += poll_latency
                    await asyncio.sleep(poll_latency)

                except Exception as error:
                    self.logger_msg(*self.acc_info, msg=f'RPC got autims response. Error: {error}', type_msg='warning')
                    total_time += poll_latency
                    await asyncio.sleep(poll_latency)
        except Exception as error:
            raise BlockchainException(f'{self.get_normalize_error(error)}')


================================================
FILE: modules/cutsom_module.py
================================================
import random

from modules import Logger, RequestClient
from utils.tools import helper


class Custom(Logger, RequestClient):
    def __init__(self, client):
        self.client = client
        Logger.__init__(self)
        RequestClient.__init__(self, client)

    @helper
    async def swap_stgusdc_bex(self):
        from functions import swap_bex

        from_token_name = 'BERA'
        to_token_name = 'STGUSDC'
        amount_in_wei, amount, _ = await self.client.get_token_balance('BERA')

        amount = round(amount * 0.3, 6)
        amount_in_wei = int(amount_in_wei * 0.3)

        data = from_token_name, to_token_name, amount, amount_in_wei

        result = await swap_bex(self.client.account_name, self.client.private_key,
                                self.client.proxy_init, swapdata=data)

        return result

    @helper
    async def swap_btc_bex(self):
        from functions import swap_bex

        from_token_name = 'BERA'
        to_token_name = 'WBTC'
        amount = round(random.uniform(0.001, 0.003), 4)
        amount_in_wei = int(amount * 10 ** 18)

        data = from_token_name, to_token_name, amount, amount_in_wei

        result = await swap_bex(self.client.account_name, self.client.private_key,
                                self.client.proxy_init, swapdata=data)

        return result

    @helper
    async def swap_honey_bex(self):
        from functions import swap_bex

        from_token_name = 'BERA'
        to_token_name = 'HONEY'
        amount = round(random.uniform(0.05, 0.06), 4)
        amount_in_wei = int(amount * 10 ** 18)

        data = from_token_name, to_token_name, amount, amount_in_wei

        result = await swap_bex(self.client.account_name, self.client.private_key,
                                self.client.proxy_init, swapdata=data)

        return result

    @helper
    async def swap_eth_bex(self):
        from functions import swap_bex

        from_token_name = 'BERA'
        to_token_name = 'WETH'
        amount = round(random.uniform(0.001, 0.002), 4)
        amount_in_wei = int(amount * 10 ** 18)

        data = from_token_name, to_token_name, amount, amount_in_wei

        result = await swap_bex(self.client.account_name, self.client.private_key,
                                self.client.proxy_init, swapdata=data)

        return result


================================================
FILE: modules/faucets.py
================================================
import asyncio

from general_settings import TWO_CAPTCHA_API_KEY
from modules import Logger, RequestClient, Client
from modules.interfaces import SoftwareException
from utils.tools import helper, sleep


class Faucet(Logger, RequestClient):
    def __init__(self, client: Client):
        self.client = client
        Logger.__init__(self)

    async def swap(self):
        pass

    async def create_task_for_captcha(self):
        url = 'https://api.2captcha.com/createTask'

        proxy_tuple = self.client.proxy_init.split('@')

        proxy_login, proxy_password = proxy_tuple[0].split(':')
        proxy_address, proxy_port = proxy_tuple[1].split(':')

        payload = {
            "clientKey": TWO_CAPTCHA_API_KEY,
            "task": {
                "type": "TurnstileTask",
                "websiteURL": "https://artio.faucet.berachain.com/",
                "websiteKey": "0x4AAAAAAARdAuciFArKhVwt",
                "userAgent": self.client.session.headers['User-Agent'],
                "proxyType": "http",
                "proxyAddress": proxy_address,
                "proxyPort": proxy_port,
                "proxyLogin": proxy_login,
                "proxyPassword": proxy_password
            }
        }

        response = await self.make_request(method="POST", url=url, json=payload)

        if not response['errorId']:
            return response['taskId']
        raise SoftwareException('Bad request to 2Captcha(Create Task)')

    async def get_captcha_key(self, task_id):
        url = 'https://api.2captcha.com/getTaskResult'

        payload = {
            "clientKey": TWO_CAPTCHA_API_KEY,
            "taskId": task_id
        }

        total_time = 0
        timeout = 360
        while True:
            response = await self.make_request(method="POST", url=url, json=payload)

            if response['status'] == 'ready':
                return response['solution']['token']

            total_time += 5
            await asyncio.sleep(5)

            if total_time > timeout:
                raise SoftwareException('Can`t get captcha solve in 360 second')

    @helper
    async def claim_berachain_tokens(self):

        self.logger_msg(*self.client.acc_info, msg=f'Claiming $BERA on faucet')

        url = 'https://artio-80085-faucet-api-cf.berachain.com/api/claim'

        task_id = await self.create_task_for_captcha()
        captcha_key = await self.get_captcha_key(task_id)

        headers = {
            "accept": "*/*",
            "accept-language": "ru,en;q=0.9,en-GB;q=0.8,en-US;q=0.7",
            "authorization": f"Bearer {captcha_key}",
            "content-type": "text/plain;charset=UTF-8",
            "priority": "u=1, i",
            "sec-ch-ua": "\"Microsoft Edge\";v=\"123\", \"Chromium\";v=\"123\", \"Not.A/Brand\";v=\"23\"",
            "sec-ch-ua-mobile": "?0",
            "sec-ch-ua-platform": "\"Windows\"",
            "sec-fetch-dest": "empty",
            "sec-fetch-mode": "cors",
            "sec-fetch-site": "same-site",
            "referrer": "https://artio.faucet.berachain.com/",
            "referrerPolicy": "strict-origin-when-cross-origin",
            "body": f"{{\"address\":\"{self.client.address}\"}}",
            "method": "POST",
            "mode": "cors",
            "credentials": "include"
        }

        params = {
            "address": f"{self.client.address}"
        }

        await self.make_request(method="POST", url=url, params=params, json=params, headers=headers)
        self.logger_msg(*self.client.acc_info, msg=f'$BERA was successfully claimed on faucet', type_msg='success')
        self.logger_msg(
            *self.client.acc_info, msg=f'You’ll receive BERA in your wallet in about 2 minutes', type_msg='warning'
        )

        await sleep(self, 150, 200)

        return True


================================================
FILE: modules/galxe.py
================================================
import json
import random
import string
import asyncio
import traceback

import aioimaplib

from config import IMAP_CONFIG
from general_settings import TWO_CAPTCHA_API_KEY
from modules.interfaces import SoftwareExceptionWithoutRetry, SoftwareException
from utils.tools import helper
from datetime import datetime, timedelta
from modules import Logger, RequestClient
from eth_account.messages import encode_defunct
from time import time
from uuid import uuid4


class Galxe(Logger, RequestClient):
    def __init__(self, client):
        super().__init__()
        self.client = client
        self.user_info = None
        self.base_url = 'https://graphigo.prd.galaxy.eco/query'

    async def report_captcha(self, task_id):
        url = 'https://2captcha.com/res.php'

        params = {
            'key': TWO_CAPTCHA_API_KEY,
            'action': 'reportbad',
            'id': task_id,
            'json': 1
        }

        response = await self.make_request(url=url, params=params)

        if response.get('status') == 1:
            self.logger_msg(
                *self.client.acc_info, msg=f'Successfully requested a refund for bad solution', type_msg='success')
        else:
            self.logger_msg(
                *self.client.acc_info, msg=f'Can`t request a refund for bad solution. Error: {response}',
                type_msg='warning'
            )

    async def create_task_for_captcha(self):
        url = 'https://api.2captcha.com/createTask'

        payload = {
            "clientKey": TWO_CAPTCHA_API_KEY,
            "task": {
                "type": "GeeTestTaskProxyless",
                "websiteURL": "https://galxe.com",
                "version": 4,
                "initParameters": {
                    "captcha_id": "244bcb8b9846215df5af4c624a750db4"
                }
            }
        }

        response = await self.make_request(method="POST", url=url, json=payload, module_name='Create task for captcha')

        if not response['errorId']:
            return response['taskId']
        raise SoftwareException('Bad request to 2Captcha(Create Task)')

    async def get_captcha_data(self):
        url = 'https://api.2captcha.com/getTaskResult'

        counter = 0
        while True:
            task_id = await self.create_task_for_captcha()

            payload = {
                "clientKey": TWO_CAPTCHA_API_KEY,
                "taskId": task_id
            }

            headers = {
                'content-type': 'text/plain; charset=utf-8'
            }

            # response = None
            total_time = 0
            timeout = 360
            response = None
            while True:
                try:
                    response = await self.make_request(method="POST", url=url, json=payload, headers=headers)

                    if response['status'] == 'ready':
                        captcha_data = response['solution']

                        return {
                            "lotNumber": captcha_data['lot_number'],
                            "passToken": captcha_data['pass_token'],
                            "genTime": captcha_data['gen_time'],
                            "captchaOutput": captcha_data['captcha_output'],
                        }

                    total_time += 5
                    await asyncio.sleep(5)

                    if total_time > timeout:
                        raise SoftwareException('Can`t get captcha solve in 360 second')
                except KeyError:
                    counter += 1
                    if counter > 10:
                        raise SoftwareException('Can`t solve captcha in 10 tries')
                    self.logger_msg(
                        *self.client.acc_info, msg=f'Bad captcha solve from 2captcha, trying again in 30 second...',
                        type_msg='warning')
                    if int(response.get('errorId')) != 12:
                        await self.report_captcha(task_id)
                    await asyncio.sleep(30)
                    break

    async def check_galxe_id_exist(self):
        payload = {
            "operationName": "GalxeIDExist",
            "variables": {
                "schema": f"EVM:{self.client.address}"
            },
            "query": "query GalxeIDExist($schema: String!) {\n  galxeIdExist(schema: $schema)\n}\n"
        }

        response = await self.make_request(method="POST", url=self.base_url, json=payload, module_name='GalxeIDExist')

        if response['data']['galxeIdExist']:
            return True
        return False

    async def sign_in(self):
        url = 'https://graphigo.prd.galaxy.eco/query'

        characters = string.ascii_letters + string.digits
        nonce = ''.join(random.choice(characters) for _ in range(17))
        current_time = datetime.utcnow()
        seven_days_later = current_time + timedelta(days=7)
        issued_time = current_time.strftime('%Y-%m-%dT%H:%M:%S.%f')[:-3] + 'Z'
        expiration_time = seven_days_later.strftime('%Y-%m-%dT%H:%M:%S.%f')[:-3] + 'Z'
        text = (f"galxe.com wants you to sign in with your Ethereum account:\n{self.client.address}\n\nSign in with"
                f" Ethereum to the app.\n\nURI: https://galxe.com\nVersion: 1\nChain ID: 1\nNonce: {nonce}\nIssued"
                f" At: {issued_time}\nExpiration Time: {expiration_time}")

        text_hex = "0x" + text.encode('utf-8').hex()
        text_encoded = encode_defunct(hexstr=text_hex)
        signature = self.client.w3.eth.account.sign_message(text_encoded, private_key=self.client.private_key).signature

        data = {
            "operationName": "SignIn",
            "variables": {
                "input": {
                    "address": self.client.address,
                    "message": text,
                    "signature": signature.hex(),
                    "addressType": "EVM"
                }
            },
            "query": "mutation SignIn($input: Auth) {\n  signin(input: $input)\n}\n"
        }

        response = await self.make_request(method="POST", url=url, json=data, module_name='SignIn')

        self.client.session.headers.update(
            {
                'Authorization': response['data']['signin']
            }
        )

        return True

    async def get_cred_id(self):
        payload = {
            "operationName": "CampaignDetailAll",
            "variables": {
                "address": self.client.address,
                "id": "GCTN3ttM4T",
                "withAddress": True
            },
            "query": "query CampaignDetailAll($id: ID!, $address: String!, $withAddress: Boolean!) {\n  campaign(id: $id) {\n    ...CampaignForSiblingSlide\n    coHostSpaces {\n      ...SpaceDetail\n      isAdmin(address: $address) @include(if: $withAddress)\n      isFollowing @include(if: $withAddress)\n      followersCount\n      categories\n      __typename\n    }\n    bannerUrl\n    ...CampaignDetailFrag\n    userParticipants(address: $address, first: 1) @include(if: $withAddress) {\n      list {\n        status\n        premintTo\n        __typename\n      }\n      __typename\n    }\n    space {\n      ...SpaceDetail\n      isAdmin(address: $address) @include(if: $withAddress)\n      isFollowing @include(if: $withAddress)\n      followersCount\n      categories\n      __typename\n    }\n    isBookmarked(address: $address) @include(if: $withAddress)\n    inWatchList\n    claimedLoyaltyPoints(address: $address) @include(if: $withAddress)\n    parentCampaign {\n      id\n      isSequencial\n      thumbnail\n      __typename\n    }\n    isSequencial\n    numNFTMinted\n    childrenCampaigns {\n      ...ChildrenCampaignsForCampaignDetailAll\n      __typename\n    }\n    __typename\n  }\n}\n\nfragment CampaignDetailFrag on Campaign {\n  id\n  ...CampaignMedia\n  ...CampaignForgePage\n  ...CampaignForCampaignParticipantsBox\n  name\n  numberID\n  type\n  inWatchList\n  cap\n  info\n  useCred\n  smartbalancePreCheck(mintCount: 1)\n  smartbalanceDeposited\n  formula\n  status\n  seoImage\n  creator\n  tags\n  thumbnail\n  gasType\n  isPrivate\n  createdAt\n  requirementInfo\n  description\n  enableWhitelist\n  chain\n  startTime\n  endTime\n  requireEmail\n  requireUsername\n  blacklistCountryCodes\n  whitelistRegions\n  rewardType\n  distributionType\n  rewardName\n  claimEndTime\n  loyaltyPoints\n  tokenRewardContract {\n    id\n    address\n    chain\n    __typename\n  }\n  tokenReward {\n    userTokenAmount\n    tokenAddress\n    depositedTokenAmount\n    tokenRewardId\n    tokenDecimal\n    tokenLogo\n    tokenSymbol\n    __typename\n  }\n  nftHolderSnapshot {\n    holderSnapshotBlock\n    __typename\n  }\n  spaceStation {\n    id\n    address\n    chain\n    __typename\n  }\n  ...WhitelistInfoFrag\n  ...WhitelistSubgraphFrag\n  gamification {\n    ...GamificationDetailFrag\n    __typename\n  }\n  creds {\n    id\n    name\n    type\n    credType\n    credSource\n    referenceLink\n    description\n    lastUpdate\n    lastSync\n    syncStatus\n    credContractNFTHolder {\n      timestamp\n      __typename\n    }\n    chain\n    eligible(address: $address, campaignId: $id)\n    subgraph {\n      endpoint\n      query\n      expression\n      __typename\n    }\n    dimensionConfig\n    value {\n      gitcoinPassport {\n        score\n        lastScoreTimestamp\n        __typename\n      }\n      __typename\n    }\n    commonInfo {\n      participateEndTime\n      modificationInfo\n      __typename\n    }\n    __typename\n  }\n  credentialGroups(address: $address) {\n    ...CredentialGroupForAddress\n    __typename\n  }\n  rewardInfo {\n    discordRole {\n      guildId\n      guildName\n      roleId\n      roleName\n      inviteLink\n      __typename\n    }\n    premint {\n      startTime\n      endTime\n      chain\n      price\n      totalSupply\n      contractAddress\n      banner\n      __typename\n    }\n    loyaltyPoints {\n      points\n      __typename\n    }\n    loyaltyPointsMysteryBox {\n      points\n      weight\n      __typename\n    }\n    __typename\n  }\n  participants {\n    participantsCount\n    bountyWinnersCount\n    __typename\n  }\n  taskConfig(address: $address) {\n    participateCondition {\n      conditions {\n        ...ExpressionEntity\n        __typename\n      }\n      conditionalFormula\n      eligible\n      __typename\n    }\n    rewardConfigs {\n      id\n      conditions {\n        ...ExpressionEntity\n        __typename\n      }\n      conditionalFormula\n      description\n      rewards {\n        ...ExpressionReward\n        __typename\n      }\n      eligible\n      rewardAttrVals {\n        attrName\n        attrTitle\n        attrVal\n        __typename\n      }\n      __typename\n    }\n    referralConfig {\n      id\n      conditions {\n        ...ExpressionEntity\n        __typename\n      }\n      conditionalFormula\n      description\n      rewards {\n        ...ExpressionReward\n        __typename\n      }\n      eligible\n      rewardAttrVals {\n        attrName\n        attrTitle\n        attrVal\n        __typename\n      }\n      __typename\n    }\n    __typename\n  }\n  referralCode(address: $address)\n  recurringType\n  latestRecurringTime\n  nftTemplates {\n    id\n    image\n    treasureBack\n    __typename\n  }\n  __typename\n}\n\nfragment CampaignMedia on Campaign {\n  thumbnail\n  rewardName\n  type\n  gamification {\n    id\n    type\n    __typename\n  }\n  __typename\n}\n\nfragment CredentialGroupForAddress on CredentialGroup {\n  id\n  description\n  credentials {\n    ...CredForAddressWithoutMetadata\n    __typename\n  }\n  conditionRelation\n  conditions {\n    expression\n    eligible\n    ...CredentialGroupConditionForVerifyButton\n    __typename\n  }\n  rewards {\n    expression\n    eligible\n    rewardCount\n    rewardType\n    __typename\n  }\n  rewardAttrVals {\n    attrName\n    attrTitle\n    attrVal\n    __typename\n  }\n  claimedLoyaltyPoints\n  __typename\n}\n\nfragment CredForAddressWithoutMetadata on Cred {\n  id\n  name\n  type\n  credType\n  credSource\n  referenceLink\n  description\n  lastUpdate\n  lastSync\n  syncStatus\n  credContractNFTHolder {\n    timestamp\n    __typename\n  }\n  chain\n  eligible(address: $address)\n  subgraph {\n    endpoint\n    query\n    expression\n    __typename\n  }\n  dimensionConfig\n  value {\n    gitcoinPassport {\n      score\n      lastScoreTimestamp\n      __typename\n    }\n    __typename\n  }\n  __typename\n}\n\nfragment CredentialGroupConditionForVerifyButton on CredentialGroupCondition {\n  expression\n  eligibleAddress\n  __typename\n}\n\nfragment WhitelistInfoFrag on Campaign {\n  id\n  whitelistInfo(address: $address) {\n    address\n    maxCount\n    usedCount\n    claimedLoyaltyPoints\n    currentPeriodClaimedLoyaltyPoints\n    currentPeriodMaxLoyaltyPoints\n    __typename\n  }\n  __typename\n}\n\nfragment WhitelistSubgraphFrag on Campaign {\n  id\n  whitelistSubgraph {\n    query\n    endpoint\n    expression\n    variable\n    __typename\n  }\n  __typename\n}\n\nfragment GamificationDetailFrag on Gamification {\n  id\n  type\n  nfts {\n    nft {\n      id\n      animationURL\n      category\n      powah\n      image\n      name\n      treasureBack\n      nftCore {\n        ...NftCoreInfoFrag\n        __typename\n      }\n      traits {\n        name\n        value\n        __typename\n      }\n      __typename\n    }\n    __typename\n  }\n  airdrop {\n    name\n    contractAddress\n    token {\n      address\n      icon\n      symbol\n      __typename\n    }\n    merkleTreeUrl\n    addressInfo(address: $address) {\n      index\n      amount {\n        amount\n        ether\n        __typename\n      }\n      proofs\n      __typename\n    }\n    __typename\n  }\n  forgeConfig {\n    minNFTCount\n    maxNFTCount\n    requiredNFTs {\n      nft {\n        category\n        powah\n        image\n        name\n        nftCore {\n          capable\n          contractAddress\n          __typename\n        }\n        __typename\n      }\n      count\n      __typename\n    }\n    __typename\n  }\n  __typename\n}\n\nfragment NftCoreInfoFrag on NFTCore {\n  id\n  capable\n  chain\n  contractAddress\n  name\n  symbol\n  dao {\n    id\n    name\n    logo\n    alias\n    __typename\n  }\n  __typename\n}\n\nfragment ExpressionEntity on ExprEntity {\n  cred {\n    id\n    name\n    type\n    credType\n    credSource\n    dimensionConfig\n    referenceLink\n    description\n    lastUpdate\n    lastSync\n    chain\n    eligible(address: $address)\n    metadata {\n      visitLink {\n        link\n        __typename\n      }\n      twitter {\n        isAuthentic\n        __typename\n      }\n      __typename\n    }\n    commonInfo {\n      participateEndTime\n      modificationInfo\n      __typename\n    }\n    __typename\n  }\n  attrs {\n    attrName\n    operatorSymbol\n    targetValue\n    __typename\n  }\n  attrFormula\n  eligible\n  eligibleAddress\n  __typename\n}\n\nfragment ExpressionReward on ExprReward {\n  arithmetics {\n    ...ExpressionEntity\n    __typename\n  }\n  arithmeticFormula\n  rewardType\n  rewardCount\n  rewardVal\n  __typename\n}\n\nfragment CampaignForgePage on Campaign {\n  id\n  numberID\n  chain\n  spaceStation {\n    address\n    __typename\n  }\n  gamification {\n    forgeConfig {\n      maxNFTCount\n      minNFTCount\n      requiredNFTs {\n        nft {\n          category\n          __typename\n        }\n        __typename\n      }\n      __typename\n    }\n    __typename\n  }\n  __typename\n}\n\nfragment CampaignForCampaignParticipantsBox on Campaign {\n  ...CampaignForParticipantsDialog\n  id\n  chain\n  space {\n    id\n    isAdmin(address: $address)\n    __typename\n  }\n  participants {\n    participants(first: 10, after: \"-1\", download: false) {\n      list {\n        address {\n          id\n          avatar\n          __typename\n        }\n        __typename\n      }\n      __typename\n    }\n    participantsCount\n    bountyWinners(first: 10, after: \"-1\", download: false) {\n      list {\n        createdTime\n        address {\n          id\n          avatar\n          __typename\n        }\n        __typename\n      }\n      __typename\n    }\n    bountyWinnersCount\n    __typename\n  }\n  __typename\n}\n\nfragment CampaignForParticipantsDialog on Campaign {\n  id\n  name\n  type\n  rewardType\n  chain\n  nftHolderSnapshot {\n    holderSnapshotBlock\n    __typename\n  }\n  space {\n    isAdmin(address: $address)\n    __typename\n  }\n  rewardInfo {\n    discordRole {\n      guildName\n      roleName\n      __typename\n    }\n    __typename\n  }\n  __typename\n}\n\nfragment SpaceDetail on Space {\n  id\n  name\n  info\n  thumbnail\n  alias\n  status\n  links\n  isVerified\n  discordGuildID\n  followersCount\n  nftCores(input: {first: 1}) {\n    list {\n      id\n      marketLink\n      __typename\n    }\n    __typename\n  }\n  __typename\n}\n\nfragment ChildrenCampaignsForCampaignDetailAll on Campaign {\n  space {\n    ...SpaceDetail\n    isAdmin(address: $address) @include(if: $withAddress)\n    isFollowing @include(if: $withAddress)\n    followersCount\n    categories\n    __typename\n  }\n  ...CampaignDetailFrag\n  claimedLoyaltyPoints(address: $address) @include(if: $withAddress)\n  userParticipants(address: $address, first: 1) @include(if: $withAddress) {\n    list {\n      status\n      __typename\n    }\n    __typename\n  }\n  parentCampaign {\n    id\n    isSequencial\n    __typename\n  }\n  __typename\n}\n\nfragment CampaignForSiblingSlide on Campaign {\n  id\n  space {\n    id\n    alias\n    __typename\n  }\n  parentCampaign {\n    id\n    thumbnail\n    isSequencial\n    childrenCampaigns {\n      id\n      ...CampaignForGetImage\n      ...CampaignForCheckFinish\n      __typename\n    }\n    __typename\n  }\n  __typename\n}\n\nfragment CampaignForCheckFinish on Campaign {\n  claimedLoyaltyPoints(address: $address)\n  whitelistInfo(address: $address) {\n    usedCount\n    __typename\n  }\n  __typename\n}\n\nfragment CampaignForGetImage on Campaign {\n  ...GetImageCommon\n  nftTemplates {\n    image\n    __typename\n  }\n  __typename\n}\n\nfragment GetImageCommon on Campaign {\n  ...CampaignForTokenObject\n  id\n  type\n  thumbnail\n  __typename\n}\n\nfragment CampaignForTokenObject on Campaign {\n  tokenReward {\n    tokenAddress\n    tokenSymbol\n    tokenDecimal\n    tokenLogo\n    __typename\n  }\n  tokenRewardContract {\n    id\n    chain\n    __typename\n  }\n  __typename\n}\n"
        }

        response = await self.make_request(method="POST", url=self.base_url, json=payload,
                                           module_name='CampaignDetailAll')

        return response['data']['campaign']['credentialGroups'][0]['credentials'][0]['id']

    async def check_and_get_nickname(self):
        url = 'https://plarium.com/services/api/nicknames/new/create?group=2&gender=2'

        while True:
            response = await self.make_request(method='POST', url=url)

            nickname = f"{random.choice(list(response))}{random.randint(1000, 10000)}"

            payload = {
                "operationName": "IsUsernameExisting",
                "variables": {
                    "username": nickname
                },
                "query": "query IsUsernameExisting($username: String!) {\n  usernameExist(username: $username)\n}\n"
            }

            response = await self.make_request(method="POST", url=self.base_url, json=payload,
                                               module_name='Check nickname')

            if not response['data']['usernameExist']:
                return nickname

    async def create_new_acc(self):
        nickname = await self.check_and_get_nickname()

        payload = {
            "operationName": "CreateNewAccount",
            "variables": {
                "input": {
                    "schema": f"EVM:{self.client.address}",
                    "socialUsername": "",
                    "username": nickname
                }
            },
            "query": "mutation CreateNewAccount($input: CreateNewAccount!) {\n  createNewAccount(input: $input)\n}\n"
        }

        await self.make_request(method="POST", url=self.base_url, json=payload, module_name='CreateNewAccount')

        self.logger_msg(
            *self.client.acc_info,
            msg=f"Successfully registered on Galxe with nickname: {nickname}", type_msg='success')

        return True

    async def get_user_info(self):
        payload = {
            "operationName": "BasicUserInfo",
            "variables": {
                "address": self.client.address
            },
            "query": "query BasicUserInfo($address: String!) {\n  addressInfo(address: $address) {\n"
                     "    id\n    username\n    avatar\n    address\n    evmAddressSecondary {\n"
                     "      address\n      __typename\n    }\n    hasEmail\n    solanaAddress\n"
                     "    aptosAddress\n    seiAddress\n    injectiveAddress\n    flowAddress\n"
                     "    starknetAddress\n    bitcoinAddress\n    hasEvmAddress\n"
                     "    hasSolanaAddress\n    hasAptosAddress\n    hasInjectiveAddress\n    hasFlowAddress\n"
                     "    hasStarknetAddress\n    hasBitcoinAddress\n    hasTwitter\n    hasGithub\n"
                     "    hasDiscord\n    hasTelegram\n    displayEmail\n    displayTwitter\n"
                     "    displayGithub\n    displayDiscord\n    displayTelegram\n    displayNamePref\n"
                     "    email\n    twitterUserID\n    twitterUserName\n    githubUserID\n    githubUserName\n"
                     "    discordUserID\n    discordUserName\n    telegramUserID\n    telegramUserName\n"
                     "    enableEmailSubs\n    subscriptions\n    isWhitelisted\n    isInvited\n    isAdmin\n"
                     "    accessToken\n    __typename\n  }\n}\n"
        }

        response = await self.make_request(method="POST", url=self.base_url, json=payload, module_name='BasicUserInfo')
        return response['data']['addressInfo']

    async def send_email(self):
        payload = {
            "operationName": "SendVerifyCode",
            "variables": {
                "input": {
                    "address": self.client.address,
                    "email": self.client.email_address,
                    "captcha": await self.get_captcha_data()
                }
            },
            "query": "mutation SendVerifyCode($input: SendVerificationEmailInput!) {\n  sendVerificationCode(input: $input) {\n    code\n    message\n    __typename\n  }\n}\n"
        }

        await self.make_request(method="POST", url=self.base_url, json=payload, module_name='SendVerifyCode')

        self.logger_msg(
            *self.client.acc_info, msg=f"Successfully send verification code to {self.client.email_address}",
            type_msg='success')

    async def confirm_email(self, code: str):
        while True:
            payload = {
                "operationName": "UpdateEmail",
                "variables": {
                    "input": {
                        "address": self.client.address,
                        "email": self.client.email_address,
                        "verificationCode": code
                    }
                },
                "query": "mutation UpdateEmail($input: UpdateEmailInput!) {\n  updateEmail(input: $input) {\n    code\n    message\n    __typename\n  }\n}\n"
            }

            await self.make_request(method="POST", url=self.base_url, json=payload, module_name='UpdateEmail')

            return True

    async def reload_task(self, cred_id):
        try:
            payload = {
                "operationName": "SyncCredentialValue",
                "variables": {
                    "input": {
                        "syncOptions": {
                            "address": self.client.address,
                            "credId": f"{cred_id}",
                        }
                    }
                },
                "query": "mutation SyncCredentialValue($input: SyncCredentialValueInput!) {\n  syncCredentialValue(input: $input) {\n    value {\n      address\n      spaceUsers {\n        follow\n        points\n        participations\n        __typename\n      }\n      campaignReferral {\n        count\n        __typename\n      }\n      gitcoinPassport {\n        score\n        lastScoreTimestamp\n        __typename\n      }\n      walletBalance {\n        balance\n        __typename\n      }\n      multiDimension {\n        value\n        __typename\n      }\n      allow\n      survey {\n        answers\n        __typename\n      }\n      quiz {\n        allow\n        correct\n        __typename\n      }\n      __typename\n    }\n    message\n    __typename\n  }\n}\n"
            }

            response = await self.make_request(method="POST", url=self.base_url, json=payload,
                                               module_name='SyncCredentialValue')

            if response['data']['syncCredentialValue']['value']['allow']:
                self.logger_msg(*self.client.acc_info, msg=f"Task is ready to claim points", type_msg='success')
                return True
            return False
        except:
            return False

    async def claim_points(self, campaign_id):
        payload = {
            "operationName": "PrepareParticipate",
            "variables": {
                "input": {
                    "address": self.client.address,
                    "campaignID": campaign_id,
                    "captcha": await self.get_captcha_data(),
                    "chain": "ETHEREUM",
                    "mintCount": 1,
                    "signature": ""
                }
            },
            "query": "mutation PrepareParticipate($input: PrepareParticipateInput!) {\n"
                     "  prepareParticipate(input: $input) {\n    allow\n    disallowReason\n    signature\n    nonce\n"
                     "    mintFuncInfo {\n      funcName\n      nftCoreAddress\n      verifyIDs\n      powahs\n"
                     "      cap\n      __typename\n    }\n    extLinkResp {\n      success\n      data\n      error\n"
                     "      __typename\n    }\n    metaTxResp {\n      metaSig2\n      autoTaskUrl\n"
                     "      metaSpaceAddr\n      forwarderAddr\n      metaTxHash\n      reqQueueing\n"
                     "      __typename\n    }\n    solanaTxResp {\n      mint\n      updateAuthority\n"
                     "      explorerUrl\n      signedTx\n      verifyID\n      __typename\n    }\n    aptosTxResp {\n"
                     "      signatureExpiredAt\n      tokenName\n      __typename\n    }\n    tokenRewardCampaignTxResp"
                     " {\n      signatureExpiredAt\n      verifyID\n      __typename\n    }\n    loyaltyPointsTxResp"
                     " {\n      TotalClaimedPoints\n      __typename\n    }\n    flowTxResp {\n      Name\n"
                     "      Description\n      Thumbnail\n      __typename\n    }\n    __typename\n  }\n}\n"
        }

        response = await self.make_request(method="POST", url=self.base_url, json=payload)

        if not response['data']['prepareParticipate']['loyaltyPointsTxResp']:
            self.logger_msg(*self.client.acc_info, msg=f"Already claimed points on Galxe")
        elif response['data']['prepareParticipate']['disallowReason'] != "":
            error = response['data']['prepareParticipate']['disallowReason']
            raise SoftwareException(f"Can`t claim points on Galxe. Error: {error}")

        elif int(response['data']['prepareParticipate']['loyaltyPointsTxResp']['TotalClaimedPoints']):
            points = int(response['data']['prepareParticipate']['loyaltyPointsTxResp']['TotalClaimedPoints'])
            self.logger_msg(
                *self.client.acc_info, msg=f"Successfully claim {points} points on Galxe", type_msg='success')

    async def get_gcaptcha4_data(self):

        url = 'https://gcaptcha4.geetest.com/load'

        callback = f"geetest_{round(time() * 1000)}"

        params = {
            'captcha_id': '244bcb8b9846215df5af4c624a750db4',
            'challenge': f"{uuid4()}",
            'client_type': 'web',
            'lang': 'ru',
            'callback': callback,
        }

        async with self.client.session.request(method='GET', url=url, params=params) as response:
            return (json.loads((await response.text()).split(f"{callback}(")[1][:-1]))['data']

    # async def get_captcha_data(self):
    #     url = 'https://gcaptcha4.geetest.com/verify'
    #
    #     captcha_data = await self.get_gcaptcha4_data()
    #
    #     callback = f"geetest_{round(time() * 1000)}"
    #
    #     params = {
    #         "callback": callback,
    #         "captcha_id": "244bcb8b9846215df5af4c624a750db4",
    #         "client_type": "web",
    #         "lot_number": captcha_data['lot_number'],
    #         "payload": captcha_data['payload'],
    #         "process_token": captcha_data['process_token'],
    #         "payload_protocol": "1",
    #         "pt": "1",
    #         "w": '993c7e27cd5f1b1df9e6e87a5b614297949138115a2785fd180574035d19e969be90bce9d785db24c19a94e1555d8bde29750fd912d26af9ce7d7052f979d48e13fc2b5584ff72f89cd8015fca83126115ca627aac0e02ec5849081a72468a16ffb359df04b7398ea97c79386de8a25bb332b743f6d984d3bb6b39edbf13d0443c19d40b95327f4556d2928e9068ec37ebc63358f1086f7bd461364757aefecc84bf4860a6a7f06ca6406bdac3a3bd9b80c6f1092a525eb5360e5e0aecf4f295d614d8bd1e0f375bb7ab0eee545905393093252dcfe17f9e4b4b738843d1fecf9553d0e601c9b5bdab2b87a625ed6db63118eee83df323ef6eb46cf4218c385255ea13a20d3f08d2ebd7fedf28f72ea820630832b196711145fe0b8fb24701c63f3e7976869ade6d363e18dc4d8bdc5075ab6d9ab2f6dc08ded9b0fc59a7186528dcfa9d2c33257b541d11b1b12f72329a3e7b34d5ad177fe93340278286077d76289d5e29215b4f19244a604dc1f7b7c31dfca1f50ec42d46322534f27e6eb2373b1ed1190697dd938cdef3580bac3ea20318b0d6ce510c8ce341b281460abc4565495e024a657f4b2364fff34a2eca75f3f0508a1a5bcb42be6b4285ae5c0e29f6d2643997df949894e098bfd85dd51599cf68eae460057a7628f05fcecbbf3ec1adb7ada6d285409a9f38627704982cffdb59e7a466440d953266edecd620',
    #     }
    #
    #     async with self.client.session.request(method='GET', url=url, params=params) as response:
    #         verify_data = (json.loads((await response.text()).split(f"{callback}(")[1][:-1]))['data']['seccode']
    #
    #     return {
    #         "lotNumber": verify_data['lot_number'],
    #         "passToken": verify_data['pass_token'],
    #         "genTime": verify_data['gen_time'],
    #         "captchaOutput": verify_data['captcha_output'],
    #     }
    #
    async def click_faucet_quest(self, cred_id):
        url = 'https://graphigo.prd.galaxy.eco/query'

        payload = {
            "operationName": "AddTypedCredentialItems",
            "variables": {
                "input": {
                    "campaignId": "GCTN3ttM4T",
                    "captcha": await self.get_captcha_data(),
                    "credId": cred_id,
                    "items": [
                        self.client.address
                    ],
                    "operation": "APPEND"
                }
            },
            "query": "mutation AddTypedCredentialItems($input: MutateTypedCredItemInput!) {\n"
                     "  typedCredentialItems(input: $input) {\n    id\n    __typename\n  }\n}\n"
        }

        await self.make_request(method="POST", url=url, json=payload)

        self.logger_msg(*self.client.acc_info, msg=f"Successfully clicked faucet quest on Galxe", type_msg='success')

        while True:
            if await self.reload_task(cred_id):
                break
            await asyncio.sleep(60)

    async def solve_quiz(self):
        url = 'https://graphigo.prd.galaxy.eco/query'

        payload = {
            "operationName":"SyncCredentialValue",
            "variables":{
                "input":{
                    "syncOptions":{
                        "credId":"367883082841890816",
                        "address":self.client.address,
                        "quiz":{
                            "answers":[
                                "2",
                                "3",
                                "3",
                                "3",
                                "0"
                            ]
                        }
                    }
                }
            },
            "query":"mutation SyncCredentialValue($input: SyncCredentialValueInput!) {\n  syncCredentialValue(input: $input) {\n    value {\n      address\n      spaceUsers {\n        follow\n        points\n        participations\n        __typename\n      }\n      campaignReferral {\n        count\n        __typename\n      }\n      gitcoinPassport {\n        score\n        lastScoreTimestamp\n        __typename\n      }\n      walletBalance {\n        balance\n        __typename\n      }\n      multiDimension {\n        value\n        __typename\n      }\n      allow\n      survey {\n        answers\n        __typename\n      }\n      quiz {\n        allow\n        correct\n        __typename\n      }\n      __typename\n    }\n    message\n    __typename\n  }\n}\n"
        }

        response = await self.make_request(method="POST", url=url, json=payload)

        if response['data']['syncCredentialValue']['value']['allow']:
            self.logger_msg(*self.client.acc_info, msg=f"Successfully solved quiz on Galxe", type_msg='success')
            return True
        self.logger_msg(*self.client.acc_info, msg=f"Quiz already complete on Galxe", type_msg='success')
        return False

    async def get_email_code(self):
        from email import message_from_bytes
        from bs4 import BeautifulSoup

        self.logger_msg(*self.client.acc_info, msg=f"Started searching for messages from Galxe...")

        total_time = 0
        timeout = 600
        domain_name = self.client.email_address.split('@')[-1]
        start_flag = False
        while True:
            try:
                rambler_client = aioimaplib.IMAP4_SSL(IMAP_CONFIG.get(domain_name, f'imap.{domain_name}'))

                if 'rambler' in domain_name or start_flag:
                    await rambler_client.wait_hello_from_server()

                await rambler_client.login(self.client.email_address, self.client.email_password)

                try:
                    res, data = await rambler_client.select()
                    try:
                        last_message_number = data[2].decode().split()[0]
                    except:
                        last_message_number = data[0].decode().split()[0]

                    message = await rambler_client.fetch(f"{last_message_number}", '(RFC822)')
                    try:
                        message_content = message[1][1]
                    except:
                        try:
                            message_content = message[1][0]
                        except:
                            message_content = message[1]

                    message = message_from_bytes(message_content)

                    soup = BeautifulSoup(message.as_string(), 'html.parser')

                    try:
                        return soup.find('h1').text
                    except:
                        total_time += 30
                        await asyncio.sleep(30)
                        if total_time > timeout:
                            break
                        continue
                except Exception as error:
                    traceback.print_exc()
                    self.logger_msg(
                        *self.client.acc_info, msg=f"Error in <get_email_code> function: {error}", type_msg='warning')
                    total_time += 60
                    await asyncio.sleep(10)
                    if total_time > timeout:
                        traceback.print_exc()
                        raise SoftwareExceptionWithoutRetry('Can`t get confirmation code from email!')
                    continue
            except Exception as error:
                if 'command LOGIN illegal' in str(error):
                    start_flag = True
                else:
                    raise error

    @helper
    async def claim_galxe_points_berachain_faucet(self):

        daily_cred_id = "380124126053949440"
        daily_campaign_id = "GCTN3ttM4T"

        self.logger_msg(*self.client.acc_info, msg=f"Check previous registration on Galxe")

        user_exist = await self.check_galxe_id_exist()
        await self.sign_in()

        if not user_exist:
            self.logger_msg(*self.client.acc_info, msg=f"New user on Galxe, make registration")
            await self.create_new_acc()
        else:
            self.logger_msg(*self.client.acc_info, msg=f"Already registered on Galxe", type_msg='success')

        user_info = await self.get_user_info()
        if not user_info['hasEmail']:
            self.logger_msg(*self.client.acc_info, msg=f"Email is not linked to the Galxe account. Start linking...")
            await asyncio.sleep(5)
            await self.send_email()
            while True:
                code = await self.get_email_code()
                self.logger_msg(
                    *self.client.acc_info, msg=f"Successfully found a message from Galxe", type_msg='success')
                if await self.confirm_email(code):
                    break

                self.logger_msg(
                    *self.client.acc_info, msg=f"This code was wrong, will try again in 60 seconds...",
                    type_msg='warning')

                await asyncio.sleep(60)

            self.logger_msg(*self.client.acc_info, msg=f"Successfully linked mail to Galxe", type_msg='success')

        self.logger_msg(*self.client.acc_info, msg=f"Check access to complete a quest")

        await self.click_faucet_quest(cred_id=daily_cred_id)

        await self.claim_points(campaign_id=daily_campaign_id)

        return True

    @helper
    async def claim_bera_campaign_points(self):

        bera_docs_cred_id = "367877685103992832"
        pol_cred_id = "368778853896331264"
        drip_cred_id = "365785346000723968"
        bex_swap_cred_id = "365757873263386624"
        mint_honey_cred_id = "367963574928842752"
        bera_campaign_id = "GC433ttn6N"

        self.logger_msg(*self.client.acc_info, msg=f"Check previous registration on Galxe")

        user_exist = await self.check_galxe_id_exist()
        await self.sign_in()

        if not user_exist:
            self.logger_msg(*self.client.acc_info, msg=f"New user on Galxe, make registration")
            await self.create_new_acc()
        else:
            self.logger_msg(*self.client.acc_info, msg=f"Already registered on Galxe", type_msg='success')

        user_info = await self.get_user_info()
        if not user_info['hasEmail']:
            self.logger_msg(*self.client.acc_info, msg=f"Email is not linked to the Galxe account. Start linking...")
            await asyncio.sleep(5)
            await self.send_email()
            while True:
                code = await self.get_email_code()
                self.logger_msg(
                    *self.client.acc_info, msg=f"Successfully found a message from Galxe", type_msg='success')
                if await self.confirm_email(code):
                    break

                self.logger_msg(
                    *self.client.acc_info, msg=f"This code was wrong, will try again in 60 seconds...",
                    type_msg='warning')

                await asyncio.sleep(60)

            self.logger_msg(*self.client.acc_info, msg=f"Successfully linked mail to Galxe", type_msg='success')

        self.logger_msg(*self.client.acc_info, msg=f"Started doing quests")

        self.logger_msg(*self.client.acc_info, msg=f"Trying to click BeraChain docs task")

        await self.click_faucet_quest(cred_id=bera_docs_cred_id)

        self.logger_msg(*self.client.acc_info, msg=f"Trying to click Proof of Liquidity task")

        await self.click_faucet_quest(cred_id=pol_cred_id)
        
        self.logger_msg(*self.client.acc_info, msg=f"Trying to click Drip $BERA task")

        await self.reload_task(cred_id=drip_cred_id)
        
        self.logger_msg(*self.client.acc_info, msg=f"Trying to click Swap on BEX task")

        await self.reload_task(cred_id=bex_swap_cred_id)
        
        self.logger_msg(*self.client.acc_info, msg=f"Trying to click Mint Honey task")

        await self.reload_task(cred_id=mint_honey_cred_id)

        self.logger_msg(*self.client.acc_info, msg=f"Trying to solve Quiz: Intro to BeraChain")

        await self.solve_quiz()

        self.logger_msg(*self.client.acc_info, msg=f"Checking out the points available on Galxe")

        await self.claim_points(campaign_id=bera_campaign_id)

        return True

================================================
FILE: modules/interfaces.py
================================================
import asyncio
import aiohttp.client_exceptions
from loguru import logger
from sys import stderr
from datetime import datetime
from abc import ABC
from config import CHAIN_NAME


class PriceImpactException(Exception):
    pass


class BlockchainException(Exception):
    pass


class SoftwareException(Exception):
    pass


class SoftwareExceptionWithoutRetry(Exception):
    pass


class WrongGalxeCode(Exception):
    pass


class Logger(ABC):
    def __init__(self):
        self.logger = logger
        self.logger.remove()
        logger_format = "<cyan>{time:HH:mm:ss}</cyan> | <level>" "{level: <8}</level> | <level>{message}</level>"
        self.logger.add(stderr, format=logger_format)
        date = datetime.today().date()
        self.logger.add(f"./data/logs/{date}.log", rotation="500 MB", level="INFO", format=logger_format)

    def logger_msg(self, account_name, address, msg, type_msg: str = 'info'):
        if account_name is None and address is None:
            info = f'[BeraMachine] | {CHAIN_NAME[1]} | {self.__class__.__name__} |'
        elif account_name is not None and address is None:
            info = f'[{account_name}] | {CHAIN_NAME[1]} | {self.__class__.__name__} |'
        else:
            info = f'[{account_name}] | {address} | {CHAIN_NAME[1]} | {self.__class__.__name__} |'
        if type_msg == 'info':
            self.logger.info(f"{info} {msg}")
        elif type_msg == 'error':
            self.logger.error(f"{info} {msg}")
        elif type_msg == 'success':
            self.logger.success(f"{info} {msg}")
        elif type_msg == 'warning':
            self.logger.warning(f"{info} {msg}")


class RequestClient(ABC):
    def __init__(self, client):
        self.client = client

    async def make_request(self, method:str = 'GET', url:str = None, headers:dict = None, params: dict = None,
                           data:str = None, json:dict = None, module_name:str = 'Request'):

        errors = None

        total_time = 0
        timeout = 360
        while True:
            try:
                async with self.client.session.request(
                        method=method, url=url, headers=headers, data=data, params=params, json=json
                ) as response:
                    if response.status in [200, 201]:
                        data = await response.json()
                        if isinstance(data, dict):
                            errors = data.get('errors')
                        elif isinstance(data, list) and isinstance(data[0], dict):
                            errors = data[0].get('errors')

                        if not errors:
                            return data
                        elif 'have been marked as inactive' in f"{errors}":
                            raise SoftwareExceptionWithoutRetry(
                                f"Bad request to {self.__class__.__name__}({module_name}) API: {errors[0]['message']}")
                        else:
                            raise SoftwareException(
                                f"Bad request to {self.__class__.__name__}({module_name}) API: {errors[0]['message']}")

                    raise SoftwareException(
                        f"Bad request to {self.__class__.__name__}({module_name}) API: {await response.text()}")
            except aiohttp.client_exceptions.ServerDisconnectedError as error:
                total_time += 15
                await asyncio.sleep(15)
                if total_time > timeout:
                    raise SoftwareException(error)
                continue
            except SoftwareExceptionWithoutRetry as error:
                raise SoftwareExceptionWithoutRetry(error)
            except Exception as error:
                raise SoftwareException(error)


================================================
FILE: utils/modules_runner.py
================================================
import json
import random
import asyncio
import telebot
import re
from aiohttp import ClientSession

from modules import Logger
from modules.interfaces import SoftwareException
from utils.networks import BeraChainRPC
from web3 import AsyncWeb3, AsyncHTTPProvider
from utils.route_generator import AVAILABLE_MODULES_INFO, get_func_by_name
from config import ACCOUNT_NAMES, PRIVATE_KEYS, PROXIES, CHAIN_NAME, EMAIL_ADDRESSES, EMAIL_PASSWORDS
from general_settings import (SLEEP_MODE, SLEEP_TIME_MODULES, SOFTWARE_MODE, TG_ID, TG_TOKEN, MOBILE_PROXY,
                              MOBILE_PROXY_URL_CHANGER, WALLETS_TO_WORK, TELEGRAM_NOTIFICATIONS,
                              SAVE_PROGRESS, ACCOUNTS_IN_STREAM, SLEEP_TIME_ACCOUNTS, SHUFFLE_WALLETS, BREAK_ROUTE)


class Runner(Logger):
    @staticmethod
    def get_wallets():
        if WALLETS_TO_WORK == 0:
            accounts_data = zip(ACCOUNT_NAMES, PRIVATE_KEYS)

        elif isinstance(WALLETS_TO_WORK, int):
            accounts_data = zip([ACCOUNT_NAMES[WALLETS_TO_WORK - 1]], [PRIVATE_KEYS[WALLETS_TO_WORK - 1]])

        elif isinstance(WALLETS_TO_WORK, tuple):
            account_names = [ACCOUNT_NAMES[i - 1] for i in WALLETS_TO_WORK]
            accounts = [PRIVATE_KEYS[i - 1] for i in WALLETS_TO_WORK]
            accounts_data = zip(account_names, accounts)

        elif isinstance(WALLETS_TO_WORK, list):
            range_count = range(WALLETS_TO_WORK[0], WALLETS_TO_WORK[1] + 1)
            account_names = [ACCOUNT_NAMES[i - 1] for i in range_count]
            accounts = [PRIVATE_KEYS[i - 1] for i in range_count]
            accounts_data = zip(account_names, accounts)
        else:
            accounts_data = []

        accounts_data = list(accounts_data)

        if SHUFFLE_WALLETS:
            random.shuffle(accounts_data)

        return accounts_data

    @staticmethod
    async def make_request(method: str = 'GET', url: str = None, headers: dict = None):

        async with ClientSession() as session:
            async with session.request(method=method, url=url, headers=headers) as response:
                if response.status == 200:
                    return True
                return False

    @staticmethod
    def load_routes():
        with open('./data/services/wallets_progress.json', 'r') as f:
            return json.load(f)

    async def smart_sleep(self, account_name, account_number, accounts_delay=False):
        if SLEEP_MODE:
            if accounts_delay:
                duration = random.randint(*tuple(x * account_number for x in SLEEP_TIME_ACCOUNTS))
            else:
                duration = random.randint(*SLEEP_TIME_MODULES)
            self.logger_msg(account_name, None, f"💤 Sleeping for {duration} seconds\n")
            await asyncio.sleep(duration)

    async def send_tg_message(self, account_name, message_to_send, disable_notification=False):
        try:
            await asyncio.sleep(1)
            str_send = '*' + '\n'.join([re.sub(r'([_*\[\]()~`>#+\-=|{}.!])', r'\\\1', message)
                                       for message in message_to_send]) + '*'
            bot = telebot.TeleBot(TG_TOKEN)
            bot.send_message(TG_ID, str_send, parse_mode='MarkdownV2', disable_notification=disable_notification)
            print()
            self.logger_msg(account_name, None, f"Telegram message sent", 'success')
        except Exception as error:
            self.logger_msg(account_name, None, f"Telegram | API Error: {error}", 'error')

    def update_step(self, account_name, step):
        wallets = self.load_routes()
        wallets[str(account_name)]["current_step"] = step
        with open('./data/services/wallets_progress.json', 'w') as f:
            json.dump(wallets, f, indent=4
Download .txt
gitextract_f008ug3n/

├── .gitignore
├── LICENSE
├── README.md
├── config.py
├── data/
│   └── services/
│       ├── bad_wallets.json
│       └── wallets_progress.json
├── functions.py
├── main.py
├── modules/
│   ├── __init__.py
│   ├── berachain.py
│   ├── client.py
│   ├── cutsom_module.py
│   ├── faucets.py
│   ├── galxe.py
│   └── interfaces.py
├── requirements.txt
└── utils/
    ├── modules_runner.py
    ├── networks.py
    ├── route_generator.py
    └── tools.py
Download .txt
SYMBOL INDEX (146 symbols across 12 files)

FILE: functions.py
  function get_client (line 5) | def get_client(account_number, private_key, proxy, email_address=None, e...
  function get_network_by_chain_id (line 9) | def get_network_by_chain_id(chain_id):
  function mint_berachain_tokens (line 15) | async def mint_berachain_tokens(account_number, private_key, proxy, *_):
  function swap_bex (line 20) | async def swap_bex(account_number, private_key, proxy, *_, **kwargs):
  function swap_btc_bex (line 25) | async def swap_btc_bex(account_number, private_key, proxy, *_, **kwargs):
  function swap_eth_bex (line 30) | async def swap_eth_bex(account_number, private_key, proxy, *_, **kwargs):
  function swap_honey_bex (line 35) | async def swap_honey_bex(account_number, private_key, proxy, *_, **kwargs):
  function swap_stgusdc_bex (line 40) | async def swap_stgusdc_bex(account_number, private_key, proxy, *_, **kwa...
  function add_liqiudity_bex_bera_usdc (line 45) | async def add_liqiudity_bex_bera_usdc(account_number, private_key, proxy...
  function add_liqiudity_bex_honey_mim (line 50) | async def add_liqiudity_bex_honey_mim(account_number, private_key, proxy...
  function supply_honey_bend (line 55) | async def supply_honey_bend(account_number, private_key, proxy, *_, **kw...
  function deposit_honey_berps (line 60) | async def deposit_honey_berps(account_number, private_key, proxy, *_, **...
  function claim_bgt_on_berps (line 65) | async def claim_bgt_on_berps(account_number, private_key, proxy, *_, **k...
  function delegate_bgt_on_station (line 70) | async def delegate_bgt_on_station(account_number, private_key, proxy, *_...
  function vote_bgt_on_station (line 75) | async def vote_bgt_on_station(account_number, private_key, proxy, *_, **...
  function deploy_contract (line 80) | async def deploy_contract(account_number, private_key, proxy, *_, **kwar...
  function supply_btc_bend (line 85) | async def supply_btc_bend(account_number, private_key, proxy, *_, **kwar...
  function supply_eth_bend (line 90) | async def supply_eth_bend(account_number, private_key, proxy, *_, **kwar...
  function withdraw_honey_bend (line 95) | async def withdraw_honey_bend(account_number, private_key, proxy, *_, **...
  function withdraw_btc_bend (line 100) | async def withdraw_btc_bend(account_number, private_key, proxy, *_, **kw...
  function withdraw_eth_bend (line 105) | async def withdraw_eth_bend(account_number, private_key, proxy, *_, **kw...
  function mint_honey (line 110) | async def mint_honey(account_number, private_key, proxy, *_, **kwargs):
  function mint_booga_ticket (line 115) | async def mint_booga_ticket(account_number, private_key, proxy, *_, **kw...
  function mint_bera_red (line 120) | async def mint_bera_red(account_number, private_key, proxy, *_, **kwargs):
  function claim_musdc (line 125) | async def claim_musdc(account_number, private_key, proxy, *_, **kwargs):
  function mint_boba (line 130) | async def mint_boba(account_number, private_key, proxy, *_, **kwargs):
  function mint_valhala_nft (line 135) | async def mint_valhala_nft(account_number, private_key, proxy, *_, **kwa...
  function mint_domain (line 140) | async def mint_domain(account_number, private_key, proxy, *_, **kwargs):
  function claim_galxe_points (line 145) | async def claim_galxe_points(account_number, private_key, proxy, email_a...
  function claim_galxe_campaign_points (line 150) | async def claim_galxe_campaign_points(account_number, private_key, proxy...

FILE: main.py
  function are_you_sure (line 13) | def are_you_sure(module=None, gen_route:bool = False):
  function main (line 32) | def main():

FILE: modules/berachain.py
  class BeraChain (line 13) | class BeraChain(Logger, RequestClient):
    method __init__ (line 14) | def __init__(self, client):
    method get_min_amount_out (line 33) | async def get_min_amount_out(self, from_token_address: str, to_token_a...
    method get_swap_steps (line 42) | async def get_swap_steps(self, from_token_address: str, to_token_addre...
    method swap_bex (line 55) | async def swap_bex(self, swapdata:dict = None):
    method add_liquidity_bex (line 104) | async def add_liquidity_bex(self):
    method add_liquidity_bex_mim (line 121) | async def add_liquidity_bex_mim(self):
    method swap_honey (line 142) | async def swap_honey(self):
    method mint_booga_ticket (line 163) | async def mint_booga_ticket(self):
    method mint_bera_red (line 178) | async def mint_bera_red(self):
    method supply_honey_bend (line 236) | async def supply_honey_bend(self):
    method deposit_honey_berps_vault (line 255) | async def deposit_honey_berps_vault(self):
    method claim_bgt_on_berps (line 273) | async def claim_bgt_on_berps(self):
    method withdraw_honey_bend (line 286) | async def withdraw_honey_bend(self):
    method supply_btc_bend (line 300) | async def supply_btc_bend(self):
    method borrow_honey_bend (line 320) | async def borrow_honey_bend(self):
    method withdraw_btc_bend (line 340) | async def withdraw_btc_bend(self):
    method supply_eth_bend (line 354) | async def supply_eth_bend(self):
    method withdraw_eth_bend (line 374) | async def withdraw_eth_bend(self):
    method mint_domain (line 388) | async def mint_domain(self):
    method delegate_bgt_on_station (line 406) | async def delegate_bgt_on_station(self):
    method vote_bgt_on_station (line 442) | async def vote_bgt_on_station(self):
    method deploy_contract (line 454) | async def deploy_contract(self):
    method claim_musdc (line 473) | async def claim_musdc(self):
    method mint_boba (line 485) | async def mint_boba(self):

FILE: modules/client.py
  class Client (line 16) | class Client(Logger):
    method __init__ (line 17) | def __init__(
    method round_amount (line 48) | def round_amount(min_amount: float, max_amount: float) -> float:
    method get_user_agent (line 53) | def get_user_agent():
    method get_normalize_error (line 59) | def get_normalize_error(error):
    method change_rpc (line 67) | async def change_rpc(self):
    method get_decimals (line 83) | async def get_decimals(self, token_name: str):
    method get_token_balance (line 87) | async def get_token_balance(
    method get_contract (line 105) | def get_contract(self, contract_address: str, abi=ERC20_ABI):
    method get_allowance (line 111) | async def get_allowance(self, token_address: str, spender_address: str...
    method get_priotiry_fee (line 118) | async def get_priotiry_fee(self):
    method prepare_transaction (line 128) | async def prepare_transaction(self, value: int = 0):
    method make_approve (line 153) | async def make_approve(self, token_address: str, spender_address: str,...
    method check_for_approved (line 161) | async def check_for_approved(self, token_address: str, spender_address...
    method send_transaction (line 190) | async def send_transaction(self, transaction, need_hash: bool = False,...

FILE: modules/cutsom_module.py
  class Custom (line 7) | class Custom(Logger, RequestClient):
    method __init__ (line 8) | def __init__(self, client):
    method swap_stgusdc_bex (line 14) | async def swap_stgusdc_bex(self):
    method swap_btc_bex (line 32) | async def swap_btc_bex(self):
    method swap_honey_bex (line 48) | async def swap_honey_bex(self):
    method swap_eth_bex (line 64) | async def swap_eth_bex(self):

FILE: modules/faucets.py
  class Faucet (line 9) | class Faucet(Logger, RequestClient):
    method __init__ (line 10) | def __init__(self, client: Client):
    method swap (line 14) | async def swap(self):
    method create_task_for_captcha (line 17) | async def create_task_for_captcha(self):
    method get_captcha_key (line 46) | async def get_captcha_key(self, task_id):
    method claim_berachain_tokens (line 69) | async def claim_berachain_tokens(self):

FILE: modules/galxe.py
  class Galxe (line 20) | class Galxe(Logger, RequestClient):
    method __init__ (line 21) | def __init__(self, client):
    method report_captcha (line 27) | async def report_captcha(self, task_id):
    method create_task_for_captcha (line 48) | async def create_task_for_captcha(self):
    method get_captcha_data (line 69) | async def get_captcha_data(self):
    method check_galxe_id_exist (line 120) | async def check_galxe_id_exist(self):
    method sign_in (line 135) | async def sign_in(self):
    method get_cred_id (line 175) | async def get_cred_id(self):
    method check_and_get_nickname (line 191) | async def check_and_get_nickname(self):
    method create_new_acc (line 213) | async def create_new_acc(self):
    method get_user_info (line 236) | async def get_user_info(self):
    method send_email (line 260) | async def send_email(self):
    method confirm_email (line 279) | async def confirm_email(self, code: str):
    method reload_task (line 297) | async def reload_task(self, cred_id):
    method claim_points (line 322) | async def claim_points(self, campaign_id):
    method get_gcaptcha4_data (line 362) | async def get_gcaptcha4_data(self):
    method click_faucet_quest (line 408) | async def click_faucet_quest(self, cred_id):
    method solve_quiz (line 437) | async def solve_quiz(self):
    method get_email_code (line 470) | async def get_email_code(self):
    method claim_galxe_points_berachain_faucet (line 534) | async def claim_galxe_points_berachain_faucet(self):
    method claim_bera_campaign_points (line 579) | async def claim_bera_campaign_points(self):

FILE: modules/interfaces.py
  class PriceImpactException (line 10) | class PriceImpactException(Exception):
  class BlockchainException (line 14) | class BlockchainException(Exception):
  class SoftwareException (line 18) | class SoftwareException(Exception):
  class SoftwareExceptionWithoutRetry (line 22) | class SoftwareExceptionWithoutRetry(Exception):
  class WrongGalxeCode (line 26) | class WrongGalxeCode(Exception):
  class Logger (line 30) | class Logger(ABC):
    method __init__ (line 31) | def __init__(self):
    method logger_msg (line 39) | def logger_msg(self, account_name, address, msg, type_msg: str = 'info'):
  class RequestClient (line 56) | class RequestClient(ABC):
    method __init__ (line 57) | def __init__(self, client):
    method make_request (line 60) | async def make_request(self, method:str = 'GET', url:str = None, heade...

FILE: utils/modules_runner.py
  class Runner (line 19) | class Runner(Logger):
    method get_wallets (line 21) | def get_wallets():
    method make_request (line 49) | async def make_request(method: str = 'GET', url: str = None, headers: ...
    method load_routes (line 58) | def load_routes():
    method smart_sleep (line 62) | async def smart_sleep(self, account_name, account_number, accounts_del...
    method send_tg_message (line 71) | async def send_tg_message(self, account_name, message_to_send, disable...
    method update_step (line 83) | def update_step(self, account_name, step):
    method collect_bad_wallets (line 90) | def collect_bad_wallets(account_name, module_name):
    method change_ip_proxy (line 102) | async def change_ip_proxy(self):
    method check_proxies_status (line 118) | async def check_proxies_status(self):
    method check_proxy_status (line 124) | async def check_proxy_status(self, account_name: str = None, proxy: st...
    method get_proxy_for_account (line 139) | def get_proxy_for_account(self, account_name):
    method get_email_for_account (line 149) | def get_email_for_account(account_name):
    method run_account_modules (line 157) | async def run_account_modules(
    method run_parallel (line 243) | async def run_parallel(self):
    method run_consistently (line 273) | async def run_consistently(self):
    method run_accounts (line 290) | async def run_accounts(self):

FILE: utils/networks.py
  class Network (line 1) | class Network:
    method __init__ (line 2) | def __init__(
    method __repr__ (line 20) | def __repr__(self):

FILE: utils/route_generator.py
  function get_func_by_name (line 42) | def get_func_by_name(module_name, help_message:bool = False):
  class RouteGenerator (line 50) | class RouteGenerator(Logger):
    method __init__ (line 51) | def __init__(self):
    method classic_generate_route (line 55) | def classic_generate_route():
    method classic_routes_json_save (line 65) | def classic_routes_json_save(self):

FILE: utils/tools.py
  function sleep (line 27) | async def sleep(self, min_time=SLEEP_TIME_MODULES[0], max_time=SLEEP_TIM...
  function get_accounts_data (line 34) | def get_accounts_data():
  function clean_progress_file (line 115) | def clean_progress_file():
  function check_progress_file (line 120) | def check_progress_file():
  function helper (line 129) | def helper(func):
Condensed preview — 20 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (230K chars).
[
  {
    "path": ".gitignore",
    "chars": 52,
    "preview": "\n*.xlsx\ngeneral_settings.py\n*.iml\n*.xml\n*.pyc\n*.log\n"
  },
  {
    "path": "LICENSE",
    "chars": 1063,
    "preview": "MIT License\n\nCopyright (c) 2024 askaer\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof "
  },
  {
    "path": "README.md",
    "chars": 4121,
    "preview": "\n# 🐻 BeraMachine\n\n## Общая информация\n\nСофт для отработки тестнета Berachain. Все настройки простые и понятные, ничего "
  },
  {
    "path": "config.py",
    "chars": 98012,
    "preview": "from utils.tools import get_accounts_data\n\nBEX_ABI = {\n    'router': [{'inputs': [{'internalType': 'address', 'name': 'p"
  },
  {
    "path": "data/services/bad_wallets.json",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "data/services/wallets_progress.json",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "functions.py",
    "chars": 6088,
    "preview": "from modules import *\nfrom utils.networks import *\n\n\ndef get_client(account_number, private_key, proxy, email_address=No"
  },
  {
    "path": "main.py",
    "chars": 2481,
    "preview": "import asyncio\nimport sys\n\nfrom config import TITLE\nfrom termcolor import cprint\nfrom questionary import Choice, select\n"
  },
  {
    "path": "modules/__init__.py",
    "chars": 193,
    "preview": "from .interfaces import RequestClient, Logger\nfrom .client import Client\nfrom .berachain import BeraChain\nfrom .cutsom_m"
  },
  {
    "path": "modules/berachain.py",
    "chars": 20613,
    "preview": "import random\n\nfrom faker import Faker\n\nfrom modules import RequestClient, Logger\nfrom modules.interfaces import Softwar"
  },
  {
    "path": "modules/client.py",
    "chars": 10782,
    "preview": "import asyncio\nimport random\nimport ssl\n\nfrom asyncio import sleep\nfrom aiohttp import ClientSession\nfrom aiohttp_socks "
  },
  {
    "path": "modules/cutsom_module.py",
    "chars": 2345,
    "preview": "import random\n\nfrom modules import Logger, RequestClient\nfrom utils.tools import helper\n\n\nclass Custom(Logger, RequestCl"
  },
  {
    "path": "modules/faucets.py",
    "chars": 3812,
    "preview": "import asyncio\n\nfrom general_settings import TWO_CAPTCHA_API_KEY\nfrom modules import Logger, RequestClient, Client\nfrom "
  },
  {
    "path": "modules/galxe.py",
    "chars": 40940,
    "preview": "import json\nimport random\nimport string\nimport asyncio\nimport traceback\n\nimport aioimaplib\n\nfrom config import IMAP_CONF"
  },
  {
    "path": "modules/interfaces.py",
    "chars": 3764,
    "preview": "import asyncio\nimport aiohttp.client_exceptions\nfrom loguru import logger\nfrom sys import stderr\nfrom datetime import da"
  },
  {
    "path": "utils/modules_runner.py",
    "chars": 12893,
    "preview": "import json\nimport random\nimport asyncio\nimport telebot\nimport re\nfrom aiohttp import ClientSession\n\nfrom modules import"
  },
  {
    "path": "utils/networks.py",
    "chars": 743,
    "preview": "class Network:\n    def __init__(\n            self,\n            name: str,\n            rpc: list,\n            chain_id: i"
  },
  {
    "path": "utils/route_generator.py",
    "chars": 4513,
    "preview": "import json\nimport random\n\nfrom utils.tools import clean_progress_file\nfrom functions import *\nfrom config import ACCOUN"
  },
  {
    "path": "utils/tools.py",
    "chars": 9136,
    "preview": "import io\nimport os\nimport sys\nimport random\nimport asyncio\nimport functools\nimport traceback\nimport msoffcrypto\nimport "
  }
]

// ... and 1 more files (download for full content)

About this extraction

This page contains the full source code of the realaskaer/BeraMachine GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 20 files (216.4 KB), approximately 59.0k tokens, and a symbol index with 146 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!