# EcoPot

스테이킹 유저에게 지급될 EcoPot 계획 컨트랙트입니다. Ecopot 프로젝트당 한 개의 Token을 분배할 수 있으며 권한을 부여받은 Operator만이 계획 수립과 진행이 가능합니다.

## Address

Contract address after production is deployed (scope link)&#x20;

## Events, Read-Only Functions, and State-Changing Functions&#x20;

{% tabs %}
{% tab title="Events" %}

## Events

**Initialized**

```solidity
event Initialized(uint totalAmount, uint amountPerBlock, uint distributableBlock, uint estimateEndBlock);
```

* Ecopot 계획 수립 이벤트
* Parameters
  * `totalAmount` : 분배할 토큰 수량 &#x20;
  * `amountPerBlock` : Block 당 분배할 토큰 수량
  * `distributableBlock` : 분배 시작 Block Number
  * `estimateEndBlock` : 예상 분배 종료 Block Number

**Deposit**

```solidity
event Deposit(uint amount, uint totalAmount, uint estimateEndBlock);
```

* 토큰 예치 이벤트
* Parameters
  * `amount` : 예치 토큰 수량
  * `totalAmount` : 총 예치 토큰 수
  * `estimateEndBlock` : 예상 분배 종료 Block Number

**Removed**

```solidity
event Removed(address operator, address token, uint estimateEndBlock, uint remainedBalance);
```

* Ecopot 종료 이벤트
* Parameters
  * `operator` : 예치 토큰 수량
  * `token` : 총 예치 토큰 수
  * `estimateEndBlock` : 예상 분배 종료 Block Number
  * `remainedBalance` : 잔여 토큰 수량

**ChangeAvailable**

```solidity
event ChangeAvailable(bool b);
```

* Ecopot 상태 변경 이벤트

**GiveReward**

```solidity
event GiveReward(address user, uint amount, uint currentIndex, uint userRewardSum);
```

* 토큰 보상 지급시 발생하는 이벤트
* Parameters
  * `user` : 유저 주소
  * `amount` : 지급 토큰 수량
  * `currentIndex`: 보상 지급 시점 Index
  * `userRewardSum` : 누적 보상 수량
    {% endtab %}

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

## Read-Only Functions

#### name

* EcoPot Project name

#### decimals

* 18

#### token

* 분배 Token 주소

**totalAmount**

* 총 배분된 Token 수량 &#x20;

#### getDistributedCurrent

* 배분된 Token 수량&#x20;

#### distributableBlock

* 분배 시작 Block 번호

#### estimateEndBlock

* 예정 종료 Block 번호

**amountPerBlock**

* 블럭당 배분되는 Token 수량

**isAvailable**

* Ecopot 진행 여부

**userRewardSum**

* mapping(address => uint)
* 유저 총 보상 수량
  {% 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.klayswap.com/kr/developer/contract/ecopot.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.
