@@ -43,8 +43,8 @@ contract Staking is Governed {
43
43
// Need to pass this period to claim fees in rebate pool
44
44
uint256 public channelDisputeEpochs;
45
45
46
- // Need to pass this period for delegators to settle
47
- uint256 public maxSettlementEpochs ;
46
+ // Maximum allocation time
47
+ uint256 public maxAllocationEpochs ;
48
48
49
49
// Time in blocks to unstake
50
50
uint256 public thawingPeriod; // in blocks
@@ -121,7 +121,9 @@ contract Staking is Governed {
121
121
uint256 epoch ,
122
122
uint256 tokens ,
123
123
address channelID ,
124
- address from
124
+ address from ,
125
+ uint256 curationFees ,
126
+ uint256 rebateFees
125
127
);
126
128
127
129
/**
@@ -173,6 +175,7 @@ contract Staking is Governed {
173
175
*/
174
176
function setCuration (Curation _curation ) external onlyGovernor {
175
177
curation = _curation;
178
+ emit ParameterUpdated ("curation " );
176
179
}
177
180
178
181
/**
@@ -183,6 +186,7 @@ contract Staking is Governed {
183
186
// Must be within 0% to 100% (inclusive)
184
187
require (_percentage <= MAX_PPM, "Curation percentage must be below or equal to MAX_PPM " );
185
188
curationPercentage = _percentage;
189
+ emit ParameterUpdated ("curationPercentage " );
186
190
}
187
191
188
192
/**
@@ -191,14 +195,16 @@ contract Staking is Governed {
191
195
*/
192
196
function setChannelDisputeEpochs (uint256 _channelDisputeEpochs ) external onlyGovernor {
193
197
channelDisputeEpochs = _channelDisputeEpochs;
198
+ emit ParameterUpdated ("channelDisputeEpochs " );
194
199
}
195
200
196
201
/**
197
- * @dev Set the max settlement time allowed for indexers
198
- * @param _maxSettlementEpochs Settlement duration limit in epochs
202
+ * @dev Set the max allocation time allowed for indexers
203
+ * @param _maxAllocationEpochs Allocation duration limit in epochs
199
204
*/
200
- function setMaxSettlementEpochs (uint256 _maxSettlementEpochs ) external onlyGovernor {
201
- maxSettlementEpochs = _maxSettlementEpochs;
205
+ function setMaxAllocationEpochs (uint256 _maxAllocationEpochs ) external onlyGovernor {
206
+ maxAllocationEpochs = _maxAllocationEpochs;
207
+ emit ParameterUpdated ("maxAllocationEpochs " );
202
208
}
203
209
204
210
/**
@@ -217,6 +223,7 @@ contract Staking is Governed {
217
223
*/
218
224
function setThawingPeriod (uint256 _thawingPeriod ) external onlyGovernor {
219
225
thawingPeriod = _thawingPeriod;
226
+ emit ParameterUpdated ("thawingPeriod " );
220
227
}
221
228
222
229
/**
@@ -313,6 +320,10 @@ contract Staking is Governed {
313
320
emit StakeSlashed (_indexer, _tokens, _reward, _beneficiary);
314
321
}
315
322
323
+ /**
324
+ * @dev Deposit tokens on the indexer stake
325
+ * @param _tokens Amount of tokens to stake
326
+ */
316
327
function stake (uint256 _tokens ) external {
317
328
address indexer = msg .sender ;
318
329
@@ -523,7 +534,7 @@ contract Staking is Governed {
523
534
indexer,
524
535
subgraphID,
525
536
rebateFees,
526
- alloc.getTokensEffectiveAllocation (epochs, maxSettlementEpochs )
537
+ alloc.getTokensEffectiveAllocation (epochs, maxAllocationEpochs )
527
538
);
528
539
529
540
// Close channel
@@ -541,7 +552,16 @@ contract Staking is Governed {
541
552
curation.collect (subgraphID, curationFees);
542
553
}
543
554
544
- emit AllocationSettled (indexer, subgraphID, currentEpoch, _tokens, _channelID, _from);
555
+ emit AllocationSettled (
556
+ indexer,
557
+ subgraphID,
558
+ currentEpoch,
559
+ _tokens,
560
+ _channelID,
561
+ _from,
562
+ rebateFees,
563
+ curationFees
564
+ );
545
565
}
546
566
547
567
/**
0 commit comments