# V3AirdropOperator

해당 컨트랙트는 각 에어드롭을 운영합니다. 에어드랍되는 LP와 토큰은 생성 시점에 결정되며 수정할 수 없습니다.

## Code

Github Link: (Will be updated after official launch)<br>

## Events, Read-Only Functions, and State-Changing Functions

{% tabs %}
{% tab title="Read-Only Functions" %}

## Read-Only Functions

**getAirdropStat**

```solidity
function getAirdropStat() external view returns (
    uint256 totalAmount,
    uint256 blockAmount,
    uint256 distributableBlock,
    uint256 endBlock,
    uint256 distributed,
    uint256 remain,
    bool created
) 
```

**Return Values:**

<table><thead><tr><th width="239.66666666666663">Name</th><th width="107">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>totalAmount</code></td><td>uint256</td><td>에어드랍 총 물량</td></tr><tr><td><code>blockAmount</code></td><td>uint256</td><td>블록당 에어드랍된 토큰의 양</td></tr><tr><td><code>distributableBlock</code></td><td>uint256</td><td>에어드랍가능한 블록의 블록 번호</td></tr><tr><td><code>endBlock</code></td><td>uint256</td><td>에어드랍 종료되는 블록 번호</td></tr><tr><td><code>distributed</code></td><td>uint256</td><td>현재 분배된 양</td></tr><tr><td><code>remain</code></td><td>uint256</td><td>남아있는 양</td></tr><tr><td><code>created</code></td><td>bool</td><td>초기화되었는지 여부</td></tr></tbody></table>

**getDistributionId**

```solidity
function getDistributionId() public view returns (bytes32 id)
```

**Return Values:**[**​**](https://docs.uniswap.org/contracts/v3/reference/periphery/NonfungiblePositionManager#parameters)

<table><thead><tr><th width="119.66666666666666">Name</th><th width="116">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>id</code></td><td>bytes32</td><td>에어드랍 ID</td></tr></tbody></table>
{% endtab %}

{% tab title="State-Changing Functions" %}

## **State-Changing Functions**

**changeNextOwner**

```solidity
function changeNextOwner(address _nextOwner) external
```

**changeOwner**

```solidity
function changeOwner() external
```

**createDistribution**

```solidity
function createDistribution(
    uint256 totalAmount,
    uint256 blockAmount,
    uint256 startBlock
) external
```

**Parameters:**

<table><thead><tr><th width="175.66666666666666">Name</th><th width="102">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>totalAmount</code></td><td>uint256</td><td>Total number of tokens to be distributed by airdrop</td></tr><tr><td><code>blockAmount</code></td><td>uint256</td><td>Token quantity to be distributed per block</td></tr><tr><td><code>startBlock</code></td><td>uint256</td><td>Airdrop start block number</td></tr></tbody></table>

**deposit**

```solidity
function deposit(uint256 amount) external
```

If there is an issue of token exhaustion or extension during the airdrop process, tokens can be recharged using the AirdropOperator's Deposit function.

* When executing the function, transfer more than the amount of tokens entered into the wallet.
* The token specified when creating the operator is charged.
* When recharging due to exhaustion, it will be applied from the block after recharging.

**refixBlockAmount**

```solidity
function refixBlockAmount(uint256 blockAmount) external
```

* Modify the amount of tokens distributed per block
* It is applied from the block after the transaction is executed.

**withdraw**

```solidity
function withdraw(address _token) external
```

* The remaining tokens can be withdrawn after the Airdrop plan is in progress.
* Withdrawal will be made to the owner's account.
  {% endtab %}
  {% endtabs %}


---

# 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-new.klayswap.com/developers/contract/v3airdropoperator.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.
