# AriaTokenClaim

**Inherits:** OwnableUpgradeable, UUPSUpgradeable

**Author:** Aria Protocol

Merkle claim for Aria Token

## State Variables

### claimRoot

Retreive the current claim root.

```solidity
bytes32 public claimRoot;
```

### ariaToken

Address of the aria erc20 token.

```solidity
IERC20 public ariaToken;
```

### tokensClaimed

Mapping of address to boolean of if an address has claim their tokens.

```solidity
mapping(address => bool) public tokensClaimed;
```

## Functions

### constructor

**Note:** oz-upgrades-unsafe-allow: constructor

```solidity
constructor();
```

### initialize

```solidity
function initialize(address _ariaToken, bytes32 _claimRoot, address _owner) external initializer;
```

### claim

Claim aria tokens.

```solidity
function claim(uint256 amount, bytes32[] calldata proof) public;
```

**Parameters**

| Name     | Type        | Description                                          |
| -------- | ----------- | ---------------------------------------------------- |
| `amount` | `uint256`   | Number of tokens claimable by a user.                |
| `proof`  | `bytes32[]` | Merkle proof proving a user is able to claim tokens. |

### updateClaimRoot

Updates the claim root.

*Only callable by owner.*

```solidity
function updateClaimRoot(bytes32 _claimRoot) external onlyOwner;
```

**Parameters**

| Name         | Type      | Description     |
| ------------ | --------- | --------------- |
| `_claimRoot` | `bytes32` | New claim root. |

### withdraw

Withdraws all tokens held by contract

*The zero address denotes ETH*

*Only callable by owner.*

```solidity
function withdraw(address _tokenAddress) external onlyOwner;
```

**Parameters**

| Name            | Type      | Description                   |
| --------------- | --------- | ----------------------------- |
| `_tokenAddress` | `address` | Address of tokens to withdraw |

### \_authorizeUpgrade

Internal function called when trying to perform upgrade

*Only callable by owner.*

```solidity
function _authorizeUpgrade(address) internal virtual override onlyOwner;
```

## Events

### TokensClaimed

```solidity
event TokensClaimed(bytes32 indexed root, address indexed claimer, uint256 amount);
```


---

# 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://docs.ariaprotocol.xyz/technical-docs/contract-docs/aria/claim/ariatokenclaim.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.
