-
Notifications
You must be signed in to change notification settings - Fork 3
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
5 changed files
with
71 additions
and
47 deletions.
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
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
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
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
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// SPDX-License-Identifier: GPL-3.0 | ||
pragma solidity 0.7.6; | ||
|
||
import {IChainlinkOracle} from '@interfaces/oracles/IChainlinkOracle.sol'; | ||
|
||
contract DataConsumerSequencerCheck { | ||
// --- Registry --- | ||
IChainlinkOracle public immutable SEQUENCER_UPTIME_FEED; | ||
|
||
// --- Data --- | ||
uint256 public immutable GRACE_PERIOD; | ||
|
||
/** | ||
* @param _aggregator The address of the Chainlink aggregator | ||
* @param _gracePeriod The threshold before accepting answers after an outage | ||
*/ | ||
constructor(address _aggregator, uint256 _gracePeriod) { | ||
require(_aggregator != address(0), 'NullAggregator'); | ||
require(_gracePeriod != 0, 'NullGracePeriod'); | ||
|
||
SEQUENCER_UPTIME_FEED = IChainlinkOracle(_aggregator); | ||
GRACE_PERIOD = _gracePeriod; | ||
} | ||
|
||
function getChainlinkDataFeedLatestAnswer() external view returns (int256) {} | ||
} |