-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Pablo Maldonado <[email protected]>
- Loading branch information
Showing
4 changed files
with
124 additions
and
38 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 was deleted.
Oops, something went wrong.
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,29 @@ | ||
// SPDX-License-Identifier: AGPL-3.0-only | ||
pragma solidity 0.8.17; | ||
|
||
import {IMedian} from "oev-contracts/interfaces/chronicle/IMedian.sol"; | ||
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol"; | ||
|
||
contract ChronicleMedianSourceMock is IMedian, Ownable { | ||
uint256 public value; | ||
uint32 public ageValue; | ||
|
||
function age() external view returns (uint32) { | ||
return ageValue; | ||
} | ||
|
||
function read() external view returns (uint256) { | ||
return value; | ||
} | ||
|
||
function peek() external view returns (uint256, bool) { | ||
return (value, true); | ||
} | ||
|
||
function setLatestSourceData(uint256 _value, uint32 _age) public onlyOwner { | ||
value = _value; | ||
ageValue = _age; | ||
} | ||
|
||
function kiss(address) external override {} | ||
} |
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