Closed RayXpub closed 1 month ago
ae00e84
during Solidity Foundry #8106Summary coverage rate: lines......: 97.7% (2179 of 2230 lines) functions..: 94.9% (409 of 431 functions) branches...: 93.5% (520 of 556 branches) Files changed coverage rate: n/a
nit: add comment to explain the context, i.e DF is read 2nd because it is not expected to be the default option
nit: add comment to explain the context, i.e DF is read 2nd because it is not expected to be the default option
@matYang Done
Issues
0 New issues
0 Fixed issues
0 Accepted issues
Measures
0 Security Hotspots
No data about Coverage
No data about Duplication
Motivation
Due to the gas cost of reading from data feeds, it is unlikely to be the default option, we can therefore optimize the
getTokenPrice()
function by defaulting to state instead of data feeds.Solution
Default to state reported prices and only fall back on data feed external call if the reported prices are stale.