@@ -12,8 +12,9 @@ import { IRewardsManager } from "../rewards/IRewardsManager.sol";
12
12
* @dev Manages the availability of subgraphs by allowing oracles to vote on whether
13
13
* a subgraph should be denied rewards or not. When enough oracles have voted to deny or
14
14
* allow rewards for a subgraph, it calls the RewardsManager Contract to set the correct
15
- * state. The number of oracles and the execution threshold are set at deployment time.
16
- * Only governance can set the oracles.
15
+ * state. The oracles and the execution threshold are set at deployment time.
16
+ * Only governance can update the oracles and voteTimeLimit.
17
+ * Governor can transfer ownership to a new governor.
17
18
*/
18
19
contract SubgraphAvailabilityManager is Governed {
19
20
using SafeMathUpgradeable for uint256 ;
@@ -41,12 +42,12 @@ contract SubgraphAvailabilityManager is Governed {
41
42
/// @notice Array of oracle addresses
42
43
address [NUM_ORACLES] public oracles;
43
44
44
- /// @notice Mapping of current nonce to subgraph deployment ID to oracle index to timestamp of last deny vote
45
- /// currentNonce => subgraphDeploymentId => oracleIndex => timestamp
45
+ /// @notice Mapping of current nonce to subgraph deployment ID to an array of timestamps of last deny vote
46
+ /// currentNonce => subgraphDeploymentId => timestamp[oracleIndex]
46
47
mapping (uint256 => mapping (bytes32 => uint256 [NUM_ORACLES])) public lastDenyVote;
47
48
48
- /// @notice Mapping of current nonce to subgraph deployment ID to oracle index to timestamp of last allow vote
49
- /// currentNonce => subgraphDeploymentId => oracleIndex => timestamp
49
+ /// @notice Mapping of current nonce to subgraph deployment ID to an array of timestamp of last allow vote
50
+ /// currentNonce => subgraphDeploymentId => timestamp[oracleIndex]
50
51
mapping (uint256 => mapping (bytes32 => uint256 [NUM_ORACLES])) public lastAllowVote;
51
52
52
53
// -- Events --
@@ -87,6 +88,7 @@ contract SubgraphAvailabilityManager is Governed {
87
88
* @param _rewardsManager Address of the RewardsManager contract
88
89
* @param _executionThreshold Number of votes required to execute a deny or allow call to the RewardsManager
89
90
* @param _voteTimeLimit Vote time limit in seconds
91
+ * @param _oracles Array of oracle addresses, must be NUM_ORACLES in length.
90
92
*/
91
93
constructor (
92
94
address _governor ,
0 commit comments