# 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)
```
