# MegaETH (ENG)

⚙️ **Installation**

**Requirements:**

* Python version **3.11.6**

**Download:**

1 | Clone the repository

```bash
git clone https://github.com/neLNABR/MegaETH-Auto.git
cd MegaETH-Auto
```

2 | Create a virtual environment

```bash
python -m venv venv
venv\Scripts\activate
```

3 | Install dependencies

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

4 | Run (after setup)

```bash
python main.py
```

📁 **Preparation (folder /data)**

The `/data` folder contains all user-related data required for operation:

* **private\_keys.txt** — private wallet keys, one key per line.
* **proxies.txt** — HTTP proxies in the format `user:pass@ip:port`, one proxy per line. If fewer proxies than accounts, they will repeat in order.

📝 **config.yaml**

Detailed description of the main configuration parameters:

```yaml
SETTINGS:
  THREADS: 1                 # Number of threads
  ATTEMPTS: 5                # Retry attempts on errors
  ACCOUNTS_RANGE: [0, 0]    # Range of accounts to process
  EXACT_ACCOUNTS_TO_USE: [] # Specific accounts to use (only works if RANGE = [0,0])
  SHUFFLE_WALLETS: false    # Shuffle accounts before each run
  PAUSE_BETWEEN_ATTEMPTS: [0, 0]  # Pause between retry attempts
  PAUSE_BETWEEN_SWAPS: [0, 0]     # Pause between swaps
  RANDOM_PAUSE_BETWEEN_ACCOUNTS: [0, 0]  # Pause between accounts
  RANDOM_PAUSE_BETWEEN_ACTIONS: [0, 0]   # Pause between tasks
  RANDOM_INITIALIZATION_PAUSE: [0, 0]    # Pause before each account starts
  SEND_TELEGRAM_LOGS: false
  TELEGRAM_BOT_TOKEN: ""
  TELEGRAM_USERS_IDS: []
  WAIT_FOR_TRANSACTION_CONFIRMATION_IN_SECONDS: 120

FLOW:
  SKIP_FAILED_TASKS: false

FAUCET:
  SOLVIUM_API_KEY: ""  # https://t.me/solvium_crypto_bot

RPCS:
  MEGAETH:
    - "https://carrot.megaeth.com/rpc"

OTHERS:
  SKIP_SSL_VERIFICATION: true
  USE_PROXY_FOR_RPC: true

SWAPS:
  BEBOP:
    BALANCE_PERCENTAGE_TO_SWAP: [5, 10]
    SWAP_ALL_TO_ETH: false

  GTE:
    BALANCE_PERCENTAGE_TO_SWAP: [5, 10]
    SWAP_ALL_TO_ETH: true
    SWAPS_AMOUNT: [3, 5]

STAKINGS:
  EKO_FINANCE:
    CHANCE_FOR_MINT_TOKENS: 0
    BALANCE_PERCENTAGE_TO_STAKE: [5, 10]
    UNSTAKE: true

MINTS:
  XL_MEME:
    BALANCE_PERCENTAGE_TO_BUY: [10, 20]
    CONTRACTS_TO_BUY: []
```

You can configure via the web interface for convenience:

1. Run the bot: `python main.py`
2. Choose `[2] Edit config`
3. Open the URL `http://127.0.0.1:3456` in your browser
4. Adjust settings and click **Save Configuration**

❗If the web config doesn't launch — edit `config.yaml` manually. For help, join our chat: <https://t.me/StarLabsChat>

💾 **Database**

The `accounts.db` file is automatically created in the `/data` folder. Managed via menu `[3] 💾 Database actions`:

1. `Create/Reset Database` — create or reset the database
2. `Generate New Tasks for Completed Wallets` — assign new tasks for completed wallets
3. `Show Database Contents` — display database info
4. `Regenerate Tasks for All Wallets` — regenerate tasks for all wallets
5. `Add Wallets to Database` — add new keys without overwriting existing data

▶️ **Usage**

Before running, configure the `tasks.py` file to define task order.\
Example:

```python
TASKS = [
  ["faucet"],
  ["dusted"],
  ("ambient", "eko_finance")
]
```

* Square brackets `[]` — pick one random module
* Parentheses `()` — run all modules in random order
* Preset names can be custom

Once configured:

1. Run the bot: `python main.py`
2. In the menu, select `3`, then `1` — to create the database
3. Go back to the menu via `6` and start the bot with `1`

✅ Tasks

How to switch modules in the bot

To switch between modules, go to the bot’s folder and open the file named tasks.py using a code editor or a simple text editor. Inside the file, you’ll find the variable TASKS, which looks like this:

<figure><img src="https://812398210-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwLtnARLju2IbVpsYaVuQ%2Fuploads%2FZIOEMOktgBEJHQVXxjwA%2Fimage.png?alt=media&#x26;token=ae97c59f-9ca1-4aec-9f56-749ec2615114" alt=""><figcaption></figcaption></figure>

TASKS is a list of presets. A preset is a list of modules that the bot will execute.

Example of a preset containing a module:

<figure><img src="https://812398210-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwLtnARLju2IbVpsYaVuQ%2Fuploads%2FKKPluaGo9C1LGhqexVIp%2Fimage.png?alt=media&#x26;token=827fda00-37d2-4933-8ae7-7e39e16efc6b" alt=""><figcaption></figcaption></figure>

As you can see, FAUCET is just the name of the preset — it can be anything you like. Inside it, there’s the module "faucet" responsible for running the faucet function.

You can create your own preset by simply giving it any name, for example:

<figure><img src="https://812398210-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwLtnARLju2IbVpsYaVuQ%2Fuploads%2FXv9iCgxjxQ9s5O74S8Lq%2Fimage.png?alt=media&#x26;token=c072aef2-3014-4ad7-9bc2-4c85d909d7a1" alt=""><figcaption></figcaption></figure>

Inside your preset, you can add whichever modules you want to use — for example, dusted. Result:

<figure><img src="https://812398210-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwLtnARLju2IbVpsYaVuQ%2Fuploads%2FpwzV5KPwRV2cETdLnCPK%2Fimage.png?alt=media&#x26;token=40999148-84ba-4577-9cf4-f6636a6c9ea7" alt=""><figcaption></figcaption></figure>

Затем чтобы запустить данный пресет, вы копируете его название и вставляете в TASKS, итого:

<figure><img src="https://812398210-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwLtnARLju2IbVpsYaVuQ%2Fuploads%2Fzn46YaStLdSQxKsXEOzS%2Fimage.png?alt=media&#x26;token=7e0e356f-963f-46ec-88f0-8033d4ad111f" alt=""><figcaption></figcaption></figure>

You can use different types of randomization within a preset. For example:\
Square brackets \[] mean the bot will randomly pick one module from those inside them.\
In our case: it will pick either dusted or ambient.

<figure><img src="https://812398210-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwLtnARLju2IbVpsYaVuQ%2Fuploads%2FgoltBafviLYZOLZZFC2u%2Fimage.png?alt=media&#x26;token=f84857ab-f39b-4d7b-9296-e0015cc48d49" alt=""><figcaption></figcaption></figure>

Round brackets () mean the bot will run all the modules inside them, but in a random order.

<figure><img src="https://812398210-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwLtnARLju2IbVpsYaVuQ%2Fuploads%2FeW2UEep3QLDEZMX5UW84%2Fimage.png?alt=media&#x26;token=9f3c0e9e-6139-4751-a161-34646e98b93f" alt=""><figcaption></figcaption></figure>

You can create as many lines (presets) as you like — just don’t forget to put commas between them.

<figure><img src="https://812398210-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwLtnARLju2IbVpsYaVuQ%2Fuploads%2FpYSscLWW1Q0h5Ga4Dulu%2Fimage.png?alt=media&#x26;token=50bcca3f-ef04-4997-87ee-01a9a5d0aad1" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://nelnabr.gitbook.io/auto-labs/megaeth-auto/megaeth-eng.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
