# Agere Executor

### Transfer GEB from EVM to Wasm

{% content-ref url="../../use/bridge/transfer-evm-less-than-greater-than-wasm" %}
[transfer-evm-less-than-greater-than-wasm](https://documents.geb.network/use/bridge/transfer-evm-less-than-greater-than-wasm)
{% endcontent-ref %}

## Executor Overview

{% content-ref url="relayagere" %}
[relayagere](https://documents.geb.network/build/bitagere/relayagere)
{% endcontent-ref %}

## Quick Join RelayAgere&#x20;

{% hint style="success" %}
Recommended System: Ubuntu 22.04 LTS +
{% endhint %}

### **Preparation Work**&#x20;

{% stepper %}
{% step %}
**Clone the repository**

```bash
git clone https://github.com/GEBcore/RelayAgere.git && cd RelayAgere
```

{% endstep %}

{% step %}
**Install the dependencies**

```bash
bash install.sh
```

{% endstep %}

{% step %}
**Activate the virtual environment**

```bash
source .venv/bin/activate
```

{% endstep %}

{% step %}
**Create Wallet**

```bash
./wallet.sh <cold_wallet_name>
```

{% hint style="info" %}
If you choose to create wallets, there will generate two wallets: **a cold wallet** and **a hot wallet**. \
In the current script, the cold wallet is associated with the hot wallet automatically. The following operations will require using **the name of the cold wallet**. Both the **cold and hot wallets** are very important, and you need to securely save the wallet's mnemonic phrase to prevent loss.
{% endhint %}

{% hint style="success" %}
You need to import both your **cold wallet** and **hot wallet** into the GEB Wallet for easier subsequent operations.
{% endhint %}
{% endstep %}

{% step %}
**Register to the agere**

{% hint style="success" %}
Please [deposit](https://wallet.bevm.io/)  GEB token larger than register fee (at least 10 tokens ) to your cold wallet to register and join the agere.
{% endhint %}

```bash
./register.sh <cold_wallet_name>
```

{% endstep %}
{% endstepper %}

### Run an Executor Progarm

{% hint style="warning" %}
**Before running the program, you need to deposit some tokens to your hot address as transaction fees so the program can send transactions normally.**
{% endhint %}

**Query your wallet balance**

```bash
./get_balance.sh <cold_wallet_name>
```

#### **Running as an Executor**&#x20;

{% stepper %}
{% step %}
**Edit the .env file according to your RPC type**

{% hint style="success" %}
For Node RPC:&#x20;

* Set BTC\_RPC\_USER&#x20;
* Set BTC\_RPC\_PASSWORD&#x20;
* Set BTC\_RPC\_ENDPOINT (IP:Port )&#x20;

For ANKR RPC:&#x20;

* Set ANKR\_API\_KEY&#x20;

For Mempool RPC:&#x20;

* No configuration needed
  {% endhint %}

**Method 1:** Copy the .env file, and enter the .env file to modify the corresponding parameters.

```bash
cp .env.example .env
```

**Method 2:** Directly export the corresponding parameters to the environment variables (Note: Re-running the program requires re-importing).

For Node RPC:&#x20;

```bash
export BTC_RPC_USER=""
export BTC_RPC_PASSWORD=""
export BTC_RPC_ENDPOINT=""
```

{% hint style="success" %}
The endpoint does not need to include the HTTP or HTTPS protocol.
{% endhint %}

For ANKR RPC:

```bash
export ANKR_API_KEY=""
```

{% endstep %}

{% step %}
**Run the executor program**

```bash
./executor.sh [-d] [-t tip_value] [-r rpc_type] <cold_wallet_name>
```

&#x20;*Here are some options for more funtions:*

```bash
Options:
  -d          Run in daemon mode (background)
  -t value    Specify tip value (default: 0) (may increase the chance of executing a transaction)
  -r type     Bitcoin RPC type (node/mempool/ankr, default: mempool)
```

{% endstep %}

{% step %}

### Check executor status

*<mark style="color:orange;">**Once you have submitted a transaction successfully**</mark>*, your executor status will become "active".

<figure><img src="https://727834651-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfwN89eii3YaURreMjRaq%2Fuploads%2FCKes5oeH6ArtyQzYFWPI%2Fimage.png?alt=media&#x26;token=948e6811-1b18-444b-9452-74720bc19443" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

### Close Program

```bash
./close.sh
```

### **Claiming Rewards**&#x20;

Except for agere creators, other users' BitAgere incentives are stored in stakes and need to be unstaked to receive actual tokens.

**Using scripts to unstake**

```bash
./stake.sh remove <cold_wallet_name>
```

**Unstaking via BEVM Wallet**&#x20;

*Router: Agere->User Dashboard->Agere Participants->Unstake*

<figure><img src="https://727834651-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfwN89eii3YaURreMjRaq%2Fuploads%2F5IoZOZLAkGJjsLqaGpcr%2Fimage.png?alt=media&#x26;token=bbfb058c-5b2d-49b1-bb81-9a27735ea657" 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://documents.geb.network/build/bitagere/agere-executor.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.
