@@ -55,9 +55,23 @@ contract MockUniverse is Initializable, IUniverse {
55
55
Controller private controller;
56
56
bool private setIsContainerForReportingParticipantValue;
57
57
bool private setIsForkingValue;
58
+ bool private getOrCacheValidityBondWallCalledValue;
59
+ bool private getOrCacheTargetReporterGasCostsWasCalledValue;
60
+ uint256 private setDisputeThresholdForForkValue;
61
+ bool private getOrCreateNextFeeWindowWasCalledValue;
62
+ IUniverse private setWinningChildUniverseValue;
63
+ bool private addMarketToWasCalledValue;
64
+ bool private removeMarketFromWasCalledValue;
58
65
/*
59
66
* setters to feed the getters and impl of IUniverse
60
67
*/
68
+ function reset () public {
69
+ setforkValue = false ;
70
+ getOrCreateNextFeeWindowWasCalledValue = false ;
71
+ addMarketToWasCalledValue = false ;
72
+ removeMarketFromWasCalledValue = false ;
73
+ }
74
+
61
75
function getForkCalled () public returns (bool ) {
62
76
return setforkValue;
63
77
}
@@ -126,15 +140,15 @@ contract MockUniverse is Initializable, IUniverse {
126
140
setTargetRepMarketCapInAttoethValue = _setTargetRepMarketCapInAttoethValue;
127
141
}
128
142
129
- function setValidityBond (uint256 _setValidityBondValue ) public {
143
+ function setOrCacheValidityBond (uint256 _setValidityBondValue ) public {
130
144
setValidityBondValue = _setValidityBondValue;
131
145
}
132
146
133
- function setDesignatedReportStake (uint256 _setDesignatedReportStakeValue ) public {
147
+ function setOrCacheDesignatedReportStake (uint256 _setDesignatedReportStakeValue ) public {
134
148
setDesignatedReportStakeValue = _setDesignatedReportStakeValue;
135
149
}
136
150
137
- function setDesignatedReportNoShowBond (uint256 _setDesignatedReportNoShowBondValue ) public {
151
+ function setOrCacheDesignatedReportNoShowBond (uint256 _setDesignatedReportNoShowBondValue ) public {
138
152
setDesignatedReportNoShowBondValue = _setDesignatedReportNoShowBondValue;
139
153
}
140
154
@@ -158,7 +172,7 @@ contract MockUniverse is Initializable, IUniverse {
158
172
setCalculateFloatingValueValue = _setCalculateFloatingValueValue;
159
173
}
160
174
161
- function setTargetReporterGasCosts (uint256 _setTargetReporterGasCostsValue ) public {
175
+ function setOrCacheTargetReporterGasCosts (uint256 _setTargetReporterGasCostsValue ) public {
162
176
setTargetReporterGasCostsValue = _setTargetReporterGasCostsValue;
163
177
}
164
178
@@ -205,6 +219,7 @@ contract MockUniverse is Initializable, IUniverse {
205
219
function setIsContainerForReportingParticipant (bool _value ) public {
206
220
setIsContainerForReportingParticipantValue = _value;
207
221
}
222
+
208
223
/*
209
224
* Impl of IUniverse and ITyped
210
225
*/
@@ -267,7 +282,10 @@ contract MockUniverse is Initializable, IUniverse {
267
282
return setCurrentFeeWindowValue;
268
283
}
269
284
285
+ function getOrCreateNextFeeWindowWasCalled () public returns (bool ) { return getOrCreateNextFeeWindowWasCalledValue;}
286
+
270
287
function getOrCreateNextFeeWindow () public returns (IFeeWindow) {
288
+ getOrCreateNextFeeWindowWasCalledValue = true ;
271
289
return setNextFeeWindowValue;
272
290
}
273
291
@@ -287,7 +305,10 @@ contract MockUniverse is Initializable, IUniverse {
287
305
return setTargetRepMarketCapInAttoethValue;
288
306
}
289
307
308
+ function getOrCacheValidityBondWallCalled () public returns (bool ) { return getOrCacheValidityBondWallCalledValue; }
309
+
290
310
function getOrCacheValidityBond () public returns (uint256 ) {
311
+ getOrCacheValidityBondWallCalledValue = true ;
291
312
return setValidityBondValue;
292
313
}
293
314
@@ -339,7 +360,10 @@ contract MockUniverse is Initializable, IUniverse {
339
360
return _newValue;
340
361
}
341
362
363
+ function getOrCacheTargetReporterGasCostsWasCalled () public returns (bool ) { return getOrCacheTargetReporterGasCostsWasCalledValue; }
364
+
342
365
function getOrCacheTargetReporterGasCosts () public returns (uint256 ) {
366
+ getOrCacheTargetReporterGasCostsWasCalledValue = true ;
343
367
return setTargetReporterGasCostsValue;
344
368
}
345
369
@@ -399,21 +423,31 @@ contract MockUniverse is Initializable, IUniverse {
399
423
function createChildUniverse (uint256 [] _parentPayoutNumerators , bool _parentInvalid ) public returns (IUniverse) {
400
424
return IUniverse (0 );
401
425
}
402
-
426
+
403
427
function isContainerForReportingParticipant (IReportingParticipant _reportingParticipant ) public view returns (bool ) {
404
428
return setIsContainerForReportingParticipantValue;
405
429
}
406
430
431
+ function addMarketToWasCalled () public returns (bool ) { return addMarketToWasCalledValue; }
432
+
407
433
function addMarketTo () public returns (bool ) {
434
+ addMarketToWasCalledValue = true ;
408
435
return true ;
409
436
}
410
437
438
+ function removeMarketFromWasCalled () public returns (bool ) { return removeMarketFromWasCalledValue; }
439
+
411
440
function removeMarketFrom () public returns (bool ) {
441
+ removeMarketFromWasCalledValue = true ;
412
442
return true ;
413
443
}
414
444
445
+ function setWinningChildUniverse (IUniverse _winning ) public {
446
+ setWinningChildUniverseValue = _winning;
447
+ }
448
+
415
449
function getWinningChildUniverse () public view returns (IUniverse) {
416
- return IUniverse ( 0 ) ;
450
+ return setWinningChildUniverseValue ;
417
451
}
418
452
419
453
function getCurrentFeeWindow () public view returns (IFeeWindow) {
@@ -438,8 +472,10 @@ contract MockUniverse is Initializable, IUniverse {
438
472
return true ;
439
473
}
440
474
475
+ function setDisputeThresholdForFork (uint256 _value ) public { setDisputeThresholdForForkValue = _value; }
476
+
441
477
function getDisputeThresholdForFork () public view returns (uint256 ) {
442
- return 0 ;
478
+ return setDisputeThresholdForForkValue ;
443
479
}
444
480
445
481
function getInitialReportMinValue () public view returns (uint256 ) {
0 commit comments