-
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.
* fix: updates based on v0.2 * feat: update based on feedback * fix: update nvm version for github action * fix: update trigger * fix: remove comments
- Loading branch information
1 parent
e737587
commit eb8209d
Showing
10 changed files
with
205 additions
and
397 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
18.12 | ||
20.10.0 |
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 |
---|---|---|
@@ -1,32 +1,29 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.16; | ||
|
||
import {IAggregator} from "@bisonai/orakl-contracts/src/v0.1/interfaces/IAggregator.sol"; | ||
pragma solidity ^0.8.20; | ||
|
||
import {IFeedProxy} from "@bisonai/orakl-contracts/v0.2/src/interfaces/IFeedProxy.sol"; | ||
|
||
contract DataFeedConsumer { | ||
IAggregator internal dataFeed; | ||
IFeedProxy internal feedProxy; | ||
int256 public answer; | ||
uint80 public roundId; | ||
|
||
constructor(address aggregatorProxy) { | ||
dataFeed = IAggregator(aggregatorProxy); | ||
constructor(address _feedProxy) { | ||
feedProxy = IFeedProxy(_feedProxy); | ||
} | ||
|
||
function getLatestData() public { | ||
( | ||
uint80 roundId_, | ||
int256 answer_ | ||
, /* uint startedAt */ | ||
, /* uint updatedAt */ | ||
, /* uint80 answeredInRound */ | ||
) = dataFeed.latestRoundData(); | ||
) = feedProxy.latestRoundData(); | ||
|
||
answer = answer_; | ||
roundId = roundId_; | ||
} | ||
|
||
function decimals() public view returns (uint8) { | ||
return dataFeed.decimals(); | ||
return feedProxy.decimals(); | ||
} | ||
} |
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
Oops, something went wrong.