# IFlareSystemsManager

> Manages system protocols like Signing Policy Definition, Uptime Voting, and Reward Voting.

> For the complete documentation index, see [llms.txt](/llms.txt). Markdown versions of documentation pages are available by appending `.md` to the page URL.

Source: https://dev.flare.network/network/fsp/solidity-reference/IFlareSystemsManager

Manages system protocols like the Signing Policy Definition, Uptime Voting, and Reward Voting.

Sourced from `IFlareSystemsManager.sol` on [GitHub](https://github.com/flare-foundation/flare-smart-contracts-v2/blob/main/contracts/userInterfaces/IFlareSystemsManager.sol).

## Functions[​](#functions "Direct link to Functions")

### firstRewardEpochStartTs[​](#firstrewardepochstartts "Direct link to firstRewardEpochStartTs")

Timestamp when the first reward epoch started, in seconds since UNIX epoch.

```
function firstRewardEpochStartTs() external view returns (    uint64);
```

### firstVotingRoundStartTs[​](#firstvotingroundstartts "Direct link to firstVotingRoundStartTs")

Timestamp when the first voting epoch started, in seconds since UNIX epoch.

```
function firstVotingRoundStartTs() external view returns (    uint64);
```

### getCurrentRewardEpoch[​](#getcurrentrewardepoch "Direct link to getCurrentRewardEpoch")

Returns the current reward epoch id (backwards compatibility).

```
function getCurrentRewardEpoch() external view returns (    uint256);
```

### getCurrentRewardEpochId[​](#getcurrentrewardepochid "Direct link to getCurrentRewardEpochId")

Returns the current reward epoch id.

```
function getCurrentRewardEpochId() external view returns (    uint24);
```

### getCurrentVotingEpochId[​](#getcurrentvotingepochid "Direct link to getCurrentVotingEpochId")

Returns the current voting epoch id.

```
function getCurrentVotingEpochId() external view returns (    uint32);
```

### getSeed[​](#getseed "Direct link to getSeed")

Returns the seed for given reward epoch id.

```
function getSeed(    uint256 _rewardEpochId) external view returns (    uint256);
```

### getStartVotingRoundId[​](#getstartvotingroundid "Direct link to getStartVotingRoundId")

Returns the start voting round id for given reward epoch id.

```
function getStartVotingRoundId(    uint256 _rewardEpochId) external view returns (    uint32);
```

### getThreshold[​](#getthreshold "Direct link to getThreshold")

Returns the threshold for given reward epoch id.

```
function getThreshold(    uint256 _rewardEpochId) external view returns (    uint16);
```

### getVotePowerBlock[​](#getvotepowerblock "Direct link to getVotePowerBlock")

Returns the vote power block for given reward epoch id.

```
function getVotePowerBlock(    uint256 _rewardEpochId) external view returns (    uint64 _votePowerBlock);
```

### getVoterRegistrationData[​](#getvoterregistrationdata "Direct link to getVoterRegistrationData")

Returns voter rgistration data for given reward epoch id.

```
function getVoterRegistrationData(    uint256 _rewardEpochId) external view returns (    uint256 _votePowerBlock,    bool _enabled);
```

#### Parameters[​](#parameters "Direct link to Parameters")

-   `_rewardEpochId`: Reward epoch id.

#### Returns[​](#returns "Direct link to Returns")

-   `_votePowerBlock`: Vote power block.
-   `_enabled`: Indicates if voter registration is enabled.

### isVoterRegistrationEnabled[​](#isvoterregistrationenabled "Direct link to isVoterRegistrationEnabled")

Indicates if voter registration is currently enabled.

```
function isVoterRegistrationEnabled() external view returns (    bool);
```

### rewardEpochDurationSeconds[​](#rewardepochdurationseconds "Direct link to rewardEpochDurationSeconds")

Duration of reward epoch, in seconds.

```
function rewardEpochDurationSeconds() external view returns (    uint64);
```

### signNewSigningPolicy[​](#signnewsigningpolicy "Direct link to signNewSigningPolicy")

Method for collecting signatures for the new signing policy.

```
function signNewSigningPolicy(    uint24 _rewardEpochId,    bytes32 _newSigningPolicyHash,    struct IFlareSystemsManager.Signature _signature) external;
```

#### Parameters[​](#parameters-1 "Direct link to Parameters")

-   `_rewardEpochId`: Reward epoch id of the new signing policy.
-   `_newSigningPolicyHash`: New signing policy hash.
-   `_signature`: Signature.

### signRewards[​](#signrewards "Direct link to signRewards")

Method for collecting signatures for the rewards.

```
function signRewards(    uint24 _rewardEpochId,    struct IFlareSystemsManager.NumberOfWeightBasedClaims[] _noOfWeightBasedClaims,    bytes32 _rewardsHash,    struct IFlareSystemsManager.Signature _signature) external;
```

#### Parameters[​](#parameters-2 "Direct link to Parameters")

-   `_rewardEpochId`: Reward epoch id of the rewards.
-   `_noOfWeightBasedClaims`: Number of weight based claims list.
-   `_rewardsHash`: Rewards hash.
-   `_signature`: Signature.

### signUptimeVote[​](#signuptimevote "Direct link to signUptimeVote")

Method for collecting signatures for the uptime vote.

```
function signUptimeVote(    uint24 _rewardEpochId,    bytes32 _uptimeVoteHash,    struct IFlareSystemsManager.Signature _signature) external;
```

#### Parameters[​](#parameters-3 "Direct link to Parameters")

-   `_rewardEpochId`: Reward epoch id of the uptime vote.
-   `_uptimeVoteHash`: Uptime vote hash.
-   `_signature`: Signature.

### submitUptimeVote[​](#submituptimevote "Direct link to submitUptimeVote")

Method for submitting node ids with high enough uptime.

```
function submitUptimeVote(    uint24 _rewardEpochId,    bytes20[] _nodeIds,    struct IFlareSystemsManager.Signature _signature) external;
```

#### Parameters[​](#parameters-4 "Direct link to Parameters")

-   `_rewardEpochId`: Reward epoch id of the uptime vote.
-   `_nodeIds`: Node ids with high enough uptime.
-   `_signature`: Signature.

### votingEpochDurationSeconds[​](#votingepochdurationseconds "Direct link to votingEpochDurationSeconds")

Duration of voting epoch, in seconds.

```
function votingEpochDurationSeconds() external view returns (    uint64);
```

## Events[​](#events "Direct link to Events")

### RandomAcquisitionStarted[​](#randomacquisitionstarted "Direct link to RandomAcquisitionStarted")

Event emitted when random acquisition phase starts.

```
event RandomAcquisitionStarted(    uint24 rewardEpochId,    uint64 timestamp)
```

### RewardEpochStarted[​](#rewardepochstarted "Direct link to RewardEpochStarted")

Event emitted when reward epoch starts.

```
event RewardEpochStarted(    uint24 rewardEpochId,    uint32 startVotingRoundId,    uint64 timestamp)
```

### RewardsSigned[​](#rewardssigned "Direct link to RewardsSigned")

Event emitted when rewards are signed.

```
event RewardsSigned(    uint24 rewardEpochId,    address signingPolicyAddress,    address voter,    bytes32 rewardsHash,    struct IFlareSystemsManager.NumberOfWeightBasedClaims[] noOfWeightBasedClaims,    uint64 timestamp,    bool thresholdReached)
```

### SignUptimeVoteEnabled[​](#signuptimevoteenabled "Direct link to SignUptimeVoteEnabled")

Event emitted when it is time to sign uptime vote.

```
event SignUptimeVoteEnabled(    uint24 rewardEpochId,    uint64 timestamp)
```

### SigningPolicySigned[​](#signingpolicysigned "Direct link to SigningPolicySigned")

Event emitted when signing policy is signed.

```
event SigningPolicySigned(    uint24 rewardEpochId,    address signingPolicyAddress,    address voter,    uint64 timestamp,    bool thresholdReached)
```

### UptimeVoteSigned[​](#uptimevotesigned "Direct link to UptimeVoteSigned")

Event emitted when uptime vote is signed.

```
event UptimeVoteSigned(    uint24 rewardEpochId,    address signingPolicyAddress,    address voter,    bytes32 uptimeVoteHash,    uint64 timestamp,    bool thresholdReached)
```

### UptimeVoteSubmitted[​](#uptimevotesubmitted "Direct link to UptimeVoteSubmitted")

Event emitted when uptime vote is submitted.

```
event UptimeVoteSubmitted(    uint24 rewardEpochId,    address signingPolicyAddress,    address voter,    bytes20[] nodeIds,    uint64 timestamp)
```

### VotePowerBlockSelected[​](#votepowerblockselected "Direct link to VotePowerBlockSelected")

Event emitted when vote power block is selected.

```
event VotePowerBlockSelected(    uint24 rewardEpochId,    uint64 votePowerBlock,    uint64 timestamp)
```

## Structures[​](#structures "Direct link to Structures")

### NumberOfWeightBasedClaims[​](#numberofweightbasedclaims "Direct link to NumberOfWeightBasedClaims")

Number of weight based claims structure

```
struct NumberOfWeightBasedClaims {  uint256 rewardManagerId;  uint256 noOfWeightBasedClaims;}
```

### Signature[​](#signature "Direct link to Signature")

Signature structure

```
struct Signature {  uint8 v;  bytes32 r;  bytes32 s;}
```
