-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
3 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -118,6 +118,7 @@ contract ERC20Template3 is | |
address public stakeToken; | ||
uint256 public secondsPerSubscription; | ||
uint256 public trueValSubmitTimeoutEpoch; | ||
uint256 private startEpoch; | ||
bool public paused = false; | ||
// -------------------------- PREDICTOOR -------------------------- | ||
|
||
|
@@ -370,6 +371,7 @@ contract ERC20Template3 is | |
|
||
stakeToken = addresses_[4]; | ||
_updateSeconds(uints_[2], uints_[3], uints_[4]); | ||
startEpoch = curEpoch(); | ||
return initialized; | ||
} | ||
|
||
|
@@ -913,7 +915,7 @@ contract ERC20Template3 is | |
} | ||
|
||
function epoch(uint256 _timestamp) public view returns (uint256) { | ||
Check warning Code scanning / Slither Conformance to Solidity naming conventions Warning
Parameter ERC20Template3.epoch(uint256)._timestamp is not in mixedCase
|
||
return _timestamp / secondsPerEpoch; | ||
return _timestamp / secondsPerEpoch - startEpoch; | ||
} | ||
|
||
function curEpoch() public view returns (uint256) { | ||
|