# IGNSStaking

*Interface for GNSStaking contract*

## Staker

```solidity
struct Staker {
  uint128 stakedGns;
  uint128 debtDai;
}
```

## StakerInfo

```solidity
struct StakerInfo {
  uint48 lastDepositTs;
  uint208 __placeholder;
}
```

## RewardState

```solidity
struct RewardState {
  uint128 accRewardPerGns;
  uint128 precisionDelta;
}
```

## RewardInfo

```solidity
struct RewardInfo {
  uint128 debtToken;
  uint128 __placeholder;
}
```

## UnlockSchedule

```solidity
struct UnlockSchedule {
  uint128 totalGns;
  uint128 claimedGns;
  uint128 debtDai;
  uint48 start;
  uint48 duration;
  bool revocable;
  enum IGNSStaking.UnlockType unlockType;
  uint16 __placeholder;
}
```

## UnlockScheduleInput

```solidity
struct UnlockScheduleInput {
  uint128 totalGns;
  uint48 start;
  uint48 duration;
  bool revocable;
  enum IGNSStaking.UnlockType unlockType;
}
```

## UnlockType

```solidity
enum UnlockType {
  LINEAR,
  CLIFF
}
```

## owner

```solidity
function owner() external view returns (address)
```

## distributeReward

```solidity
function distributeReward(address _rewardToken, uint256 _amountToken) external
```

## createUnlockSchedule

```solidity
function createUnlockSchedule(struct IGNSStaking.UnlockScheduleInput _schedule, address _staker) external
```

## UnlockManagerUpdated

```solidity
event UnlockManagerUpdated(address manager, bool authorized)
```

## DaiHarvested

```solidity
event DaiHarvested(address staker, uint128 amountDai)
```

## RewardHarvested

```solidity
event RewardHarvested(address staker, address token, uint128 amountToken)
```

## RewardHarvestedFromUnlock

```solidity
event RewardHarvestedFromUnlock(address staker, address token, bool isOldDai, uint256[] ids, uint128 amountToken)
```

## RewardDistributed

```solidity
event RewardDistributed(address token, uint256 amount)
```

## GnsStaked

```solidity
event GnsStaked(address staker, uint128 amountGns)
```

## GnsUnstaked

```solidity
event GnsUnstaked(address staker, uint128 amountGns)
```

## GnsClaimed

```solidity
event GnsClaimed(address staker, uint256[] ids, uint128 amountGns)
```

## UnlockScheduled

```solidity
event UnlockScheduled(address staker, uint256 index, struct IGNSStaking.UnlockSchedule schedule)
```

## UnlockScheduleRevoked

```solidity
event UnlockScheduleRevoked(address staker, uint256 index)
```

## RewardTokenAdded

```solidity
event RewardTokenAdded(address token, uint256 index, uint128 precisionDelta)
```


---

# 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.gains.trade/developer/technical-reference/contracts/interfaces/ignsstaking.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.
