-
Notifications
You must be signed in to change notification settings - Fork 2
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
3 changed files
with
8 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,7 +28,8 @@ contract PragmaAggregatorV3 { | |
pragmaInterface.updateDataFeeds{value: fee}(priceUpdateData); | ||
|
||
// refund remaining eth | ||
payable(msg.sender).call{value: address(this).balance}(""); | ||
// (bool success, ) = payable(msg.sender).call{value: address(this).balance}(""); | ||
// require(success, "Transfer failed."); | ||
} | ||
Check failure Code scanning / Slither Functions that send Ether to arbitrary destinations High
PragmaAggregatorV3.updateFeeds(bytes[]) sends eth to arbitrary user
Dangerous calls: - pragmaInterface.updateDataFeeds{value: fee}(priceUpdateData) |
||
|
||
function decimals() public view virtual returns (uint8) { | ||
|
@@ -68,12 +69,12 @@ contract PragmaAggregatorV3 { | |
} | ||
|
||
function getRoundData( | ||
uint80 _roundId | ||
uint80 roundId | ||
) | ||
external | ||
view | ||
returns ( | ||
uint80 roundId, | ||
uint80, | ||
int256 answer, | ||
uint256 startedAt, | ||
uint256 updatedAt, | ||
|
@@ -82,11 +83,11 @@ contract PragmaAggregatorV3 { | |
{ | ||
SpotMedian memory price = pragmaInterface.getSpotMedianFeed(feedId); | ||
return ( | ||
_roundId, | ||
roundId, | ||
int256(price.price), | ||
price.metadata.timestamp, | ||
price.metadata.timestamp, | ||
_roundId | ||
roundId | ||
); | ||
} | ||
|
||
|