> For the complete documentation index, see [llms.txt](https://documents.geb.network/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documents.geb.network/build/bitagere/agere-executor.md).

# Agere Executor

### Transfer GEB from EVM to Wasm

{% content-ref url="/pages/lYZeHK0f9MR2xR52clfC" %}
[Transfer(EVM<-->Wasm)](/use/bridge/transfer-evm-less-than-greater-than-wasm.md)
{% endcontent-ref %}

## Executor Overview

{% content-ref url="/pages/gX2wxQ0QAFGBMADoVcQK" %}
[RelayAgere](/build/bitagere/relayagere.md)
{% 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="/files/DkS6K7HUXESYSXtD452K" 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="/files/1ZzkYUsovvOvc28JB8iI" alt=""><figcaption></figcaption></figure>
