# Claiming EGLs

If a wallet has participated in Genesis, or has been added as a Signal / Seeder account, they are eligible to claim EGL's. Attempts to claim by any other wallet will result in the function call being reverted and the transaction failing

## **Bonus Voting EGLs**

#### 1.**`claimSupporterEgls()`** <a href="#claimsupporteregls" id="claimsupporteregls"></a>

Allows Genesis supporters to claim their bonus voting EGL's. The bonus voting EGL's are immediately put into a vote upon claiming, so a valid `gasTarget` and `lockupDuration` are required when calling this function.

The number of bonus voting EGL's as well as BTP's is calculated when this function is called - see [Release Schedule ](https://docs.egl.vote/protocol-overview/launch/eth-egl-release-schedule)for more information

The `releaseDate` (date that EGL's are available to withdraw) for Genesis supporters is initially set to 52 weeks from the start of the first vote, although this is updated to the date all BPT's are released, unless the Supporter has chosen to extend their lockup further using `reVote()`

{% hint style="info" %}
This function will additionally call `tallyVotes()` if the current voting period (epoch) has elapsed and the vote for the previous period has not yet been tallied. See [Tally Votes](https://docs.egl.vote/documentation/tally-votes)
{% endhint %}

#### Function Signature

```javascript
function claimSupporterEgls(uint _gasTarget, uint8 _lockupDuration) external whenNotPause
```

| Parameters        | Data Type | Description                                                                                | Example  |
| ----------------- | --------- | ------------------------------------------------------------------------------------------ | -------- |
| `_gasTarget`      | `uint256` | The gas limit value you are voting for (must be + / - 4,000,000 of the current gas limit)  | 16000000 |
| `_lockupDuration` | `uint8`   | The number of weeks your vote will be locked up for (valid values are numbers 1 through 8) | 4        |

#### Validations

| Validation Rule                                                            | Description                                                                |
| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- |
| `remainingSupporterBalance > 0`                                            | The contracts remaining bonus voting EGL balance must be greater than 0    |
| `remainingBptBalance > 0`                                                  | The contracts remaining Balancer pool token balance must be greater than 0 |
| `eglGenesis.canContribute() == false && eglGenesis.canWithdraw() == false` | EGL Genesis must be closed                                                 |
| `supporters[msg.sender].claimed == 0`                                      | The claiming address must not have already claimed their tokens            |
| `contributionAmount > 0`                                                   | The claiming address must have contributed in Genesis                      |

#### Events Emitted&#x20;

* `VotesTallied` (Conditional)
* `SupporterTokensClaimed`&#x20;
* `Vote`

#### Web3 Example:

```javascript
await eglVotingInstance.claimSupporterEgls(15500000, 4, { from: "0x2be650ba..."})
```

####

### 2. `claimSeederEgls()` <a href="#claimseederegls" id="claimseederegls"></a>

Allow preconfigured signal / seeder accounts to claim their bonus voting EGL's. The bonus voting EGL's are immediately put into a vote upon claiming, so a valid `gasTarget` and `lockupDuration` are required when calling this function.&#x20;

The `releaseDate` (date that EGL's are available to withdraw) for signal / seeder accounts is set to 52 weeks from the start of the first vote

{% hint style="info" %}
This function will additionally call `tallyVotes()` if the current voting period (epoch) has elapsed and the vote for the previous epoch has not yet been tallied. See [Tally Votes](https://docs.egl.vote/documentation/tally-votes)
{% endhint %}

#### Function Signature

```javascript
function claimSeederEgls(uint _gasTarget, uint8 _lockupDuration) external whenNotPaused
```

| Parameters        | Data Type | Description                                                                                | Example  |
| ----------------- | --------- | ------------------------------------------------------------------------------------------ | -------- |
| `_gasTarget`      | `uint256` | The gas limit value you are voting for (must be + / - 4,000,000 of the current gas limit)  | 16000000 |
| `_lockupDuration` | `uint8`   | The number of weeks your vote will be locked up for (valid values are numbers 1 through 8) | 4        |

#### Validations

| Validation                | Description                                                          |
| ------------------------- | -------------------------------------------------------------------- |
| `seeders[msg.sender] > 0` | The claiming address must be configured as a seeder / signal account |

#### Events Emitted&#x20;

* `VotesTallied` (Conditional)
* `SeedAccountClaimed`
* `Vote`

#### Web3 Example:

```javascript
await eglVotingInstance.claimSeederEgls(15500000, 4, { from: "0x2be650ba..."})
```
