Skip to content

Commit ae0b892

Browse files
authored
feat: New Curation Contract out of Staking contract (#169)
* curation: refactor out from staking contract and code improvements - [x] refactor out of the Staking contract - [x] add require messages - [x] clean use of structs - [x] on tokensReceived, have a special distributor sender that can increase reserves - [x] receive fees as reserves and validate source - [x] review natspec
1 parent 610a043 commit ae0b892

13 files changed

+1047
-1306
lines changed

contracts/Curation.sol

Lines changed: 429 additions & 0 deletions
Large diffs are not rendered by default.

contracts/DisputeManager.sol

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ pragma experimental ABIEncoderV2;
33

44
/*
55
* @title Dispute management
6-
* @notice Provides a way to align the incentives of participants ensuring that Query Results are trustful.
6+
* @notice Provides a way to align the incentives of participants ensuring that Query Results are trustful.
77
*/
88

99
import "./Governed.sol";
@@ -67,14 +67,17 @@ contract DisputeManager is Governed {
6767
);
6868
// 1 - mainnet // TODO: EIP-1344 adds support for the Chain ID opcode
6969
uint256 private constant CHAIN_ID = 1;
70-
bytes32 private DOMAIN_SEPARATOR;
7170

7271
// 100% in parts per million
7372
uint256 private constant MAX_PPM = 1000000;
7473

7574
// 1 basis point (0.01%) is 100 parts per million (PPM)
7675
uint256 private constant BASIS_PT = 100;
7776

77+
// -- State --
78+
79+
bytes32 private DOMAIN_SEPARATOR;
80+
7881
// Disputes created by the Fisherman or other authorized entites
7982
// @key <bytes32> _disputeID - Hash of readIndex data + disputer data
8083
mapping(bytes32 => Dispute) public disputes;
@@ -154,7 +157,6 @@ contract DisputeManager is Governed {
154157
_setArbitrator(_arbitrator);
155158
token = GraphToken(_token);
156159
staking = Staking(_staking);
157-
158160
minimumDeposit = _minimumDeposit;
159161
slashingPercentage = _slashingPercentage;
160162

@@ -345,7 +347,6 @@ contract DisputeManager is Governed {
345347
"Error sending dispute deposit"
346348
);
347349

348-
// Log event that we awarded _fisherman _reward in resolving _disputeID
349350
emit DisputeAccepted(
350351
_disputeID,
351352
dispute.subgraphID,
@@ -457,7 +458,6 @@ contract DisputeManager is Governed {
457458
_deposit
458459
);
459460

460-
// Log event that new dispute was created against IndexNode
461461
emit DisputeCreated(
462462
disputeID,
463463
_subgraphID,

0 commit comments

Comments
 (0)