-
Notifications
You must be signed in to change notification settings - Fork 107
Open
Description
- Rename the
getLatestPrice()function togetChainlinkDataFeedLatestAnswer() - Revert if returned
answerorroundIdare zero - Have a check for a stale answer. The
timeStamp/updatedAtshould be compared against the storage variable provided by the user that ideally should be a value close to a heartbeat of an actual feed. Ifblock.timestamp - s_usdcUsdFeedHeartbeatis greater thantimeStampcontract should revert - Currently contract returns plain
answer. We should format that value based on thedecimals()of the feed and token's decimals - Test all of these edge cases using Chainlink Local
- https://docs.chain.link/chainlink-local/api-reference/solidity/data-feeds/mockv3aggregator#updateanswer
- https://docs.chain.link/chainlink-local/api-reference/solidity/data-feeds/mockv3aggregator#updaterounddata
- https://docs.chain.link/chainlink-local/api-reference/solidity/data-feeds/mockoffchainaggregator#updateminandmaxanswers (optionally)
Metadata
Metadata
Assignees
Labels
No labels