@@ -56,7 +56,7 @@ contract Universe is DelegationTarget, Extractable, ITyped, Initializable, IUniv
56
56
require (forkingMarket == IMarket (0 ));
57
57
require (isContainerForMarket (IMarket (msg .sender )));
58
58
forkingMarket = IMarket (msg .sender );
59
- forkEndTime = controller.getTimestamp () + Reporting.getForkDurationSeconds ();
59
+ forkEndTime = controller.getTimestamp (). add ( Reporting.getForkDurationSeconds () );
60
60
controller.getAugur ().logUniverseForked ();
61
61
return true ;
62
62
}
@@ -65,7 +65,7 @@ contract Universe is DelegationTarget, Extractable, ITyped, Initializable, IUniv
65
65
uint256 _totalRepSupply = reputationToken.getTotalTheoreticalSupply ();
66
66
forkReputationGoal = _totalRepSupply.div (2 ); // 50% of REP migrating results in a victory in a fork
67
67
disputeThresholdForFork = _totalRepSupply.div (80 ); // 1.25% of the total rep supply
68
- initialReportMinValue = disputeThresholdForFork.div (3 ).div (2 ** 18 ) + 1 ; // This value will result in a maximum 20 round dispute sequence
68
+ initialReportMinValue = disputeThresholdForFork.div (3 ).div (2 ** 18 ). add ( 1 ) ; // This value will result in a maximum 20 round dispute sequence
69
69
return true ;
70
70
}
71
71
@@ -118,7 +118,7 @@ contract Universe is DelegationTarget, Extractable, ITyped, Initializable, IUniv
118
118
}
119
119
120
120
function getFeeWindowId (uint256 _timestamp ) public view returns (uint256 ) {
121
- return _timestamp / getDisputeRoundDurationInSeconds ();
121
+ return _timestamp. div ( getDisputeRoundDurationInSeconds () );
122
122
}
123
123
124
124
function getDisputeRoundDurationInSeconds () public view returns (uint256 ) {
@@ -141,11 +141,11 @@ contract Universe is DelegationTarget, Extractable, ITyped, Initializable, IUniv
141
141
}
142
142
143
143
function getOrCreatePreviousFeeWindow () public onlyInGoodTimes returns (IFeeWindow) {
144
- return getOrCreateFeeWindowByTimestamp (controller.getTimestamp () - getDisputeRoundDurationInSeconds ());
144
+ return getOrCreateFeeWindowByTimestamp (controller.getTimestamp (). sub ( getDisputeRoundDurationInSeconds () ));
145
145
}
146
146
147
147
function getPreviousFeeWindow () public view onlyInGoodTimes returns (IFeeWindow) {
148
- return getFeeWindowByTimestamp (controller.getTimestamp () - getDisputeRoundDurationInSeconds ());
148
+ return getFeeWindowByTimestamp (controller.getTimestamp (). sub ( getDisputeRoundDurationInSeconds () ));
149
149
}
150
150
151
151
function getOrCreateCurrentFeeWindow () public onlyInGoodTimes returns (IFeeWindow) {
@@ -157,15 +157,15 @@ contract Universe is DelegationTarget, Extractable, ITyped, Initializable, IUniv
157
157
}
158
158
159
159
function getOrCreateNextFeeWindow () public onlyInGoodTimes returns (IFeeWindow) {
160
- return getOrCreateFeeWindowByTimestamp (controller.getTimestamp () + getDisputeRoundDurationInSeconds ());
160
+ return getOrCreateFeeWindowByTimestamp (controller.getTimestamp (). add ( getDisputeRoundDurationInSeconds () ));
161
161
}
162
162
163
163
function getNextFeeWindow () public view onlyInGoodTimes returns (IFeeWindow) {
164
- return getFeeWindowByTimestamp (controller.getTimestamp () + getDisputeRoundDurationInSeconds ());
164
+ return getFeeWindowByTimestamp (controller.getTimestamp (). add ( getDisputeRoundDurationInSeconds () ));
165
165
}
166
166
167
167
function getOrCreateFeeWindowBefore (IFeeWindow _feeWindow ) public onlyInGoodTimes returns (IFeeWindow) {
168
- return getOrCreateFeeWindowByTimestamp (_feeWindow.getStartTime () - 2 );
168
+ return getOrCreateFeeWindowByTimestamp (_feeWindow.getStartTime (). sub ( 2 ) );
169
169
}
170
170
171
171
function createChildUniverse (uint256 [] _parentPayoutNumerators , bool _parentInvalid ) public returns (IUniverse) {
@@ -426,7 +426,7 @@ contract Universe is DelegationTarget, Extractable, ITyped, Initializable, IUniv
426
426
}
427
427
428
428
function getOrCacheMarketCreationCost () public onlyInGoodTimes returns (uint256 ) {
429
- return getOrCacheValidityBond () + getOrCacheTargetReporterGasCosts ();
429
+ return getOrCacheValidityBond (). add ( getOrCacheTargetReporterGasCosts () );
430
430
}
431
431
432
432
function getInitialReportStakeSize () public onlyInGoodTimes returns (uint256 ) {
0 commit comments