-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
On-chain proposal to add ezETH in WETH Mainnet market #19
Conversation
error InvalidInt256(); | ||
|
||
/// @notice Version of the price feed | ||
uint public constant override version = 1; |
Check notice
Code scanning / Semgrep OSS
Semgrep Finding: compound.solidity.constant-not-in-uppercase Note
constructor(address ezETHRateProvider, uint8 decimals_, string memory description_) { | ||
underlyingPriceFeed = ezETHRateProvider; | ||
decimals = decimals_; | ||
description = description_; | ||
|
||
uint8 ezETHRateProviderDecimals = 18; | ||
// Note: Solidity does not allow setting immutables in if/else statements | ||
shouldUpscale = ezETHRateProviderDecimals < decimals_ ? true : false; | ||
rescaleFactor = (shouldUpscale | ||
? signed256(10 ** (decimals_ - ezETHRateProviderDecimals)) | ||
: signed256(10 ** (ezETHRateProviderDecimals - decimals_)) | ||
); | ||
} |
Check warning
Code scanning / Semgrep OSS
Semgrep Finding: compound.solidity.missing-constructor-sanity-checks Warning
constructor(address ezETHRateProvider, uint8 decimals_, string memory description_) { | ||
underlyingPriceFeed = ezETHRateProvider; | ||
decimals = decimals_; | ||
description = description_; | ||
|
||
uint8 ezETHRateProviderDecimals = 18; | ||
// Note: Solidity does not allow setting immutables in if/else statements | ||
shouldUpscale = ezETHRateProviderDecimals < decimals_ ? true : false; | ||
rescaleFactor = (shouldUpscale | ||
? signed256(10 ** (decimals_ - ezETHRateProviderDecimals)) | ||
: signed256(10 ** (ezETHRateProviderDecimals - decimals_)) | ||
); | ||
} |
Check warning
Code scanning / Semgrep OSS
Semgrep Finding: compound.solidity.missing-constructor-sanity-checks Warning
constructor(address ezETHRateProvider, uint8 decimals_, string memory description_) { | ||
underlyingPriceFeed = ezETHRateProvider; | ||
decimals = decimals_; | ||
description = description_; | ||
|
||
uint8 ezETHRateProviderDecimals = 18; | ||
// Note: Solidity does not allow setting immutables in if/else statements | ||
shouldUpscale = ezETHRateProviderDecimals < decimals_ ? true : false; | ||
rescaleFactor = (shouldUpscale | ||
? signed256(10 ** (decimals_ - ezETHRateProviderDecimals)) | ||
: signed256(10 ** (ezETHRateProviderDecimals - decimals_)) | ||
); | ||
} |
Check warning
Code scanning / Semgrep OSS
Semgrep Finding: compound.solidity.missing-constructor-sanity-checks Warning
constructor(address ezETHRateProvider, uint8 decimals_, string memory description_) { | ||
underlyingPriceFeed = ezETHRateProvider; | ||
decimals = decimals_; | ||
description = description_; | ||
|
||
uint8 ezETHRateProviderDecimals = 18; | ||
// Note: Solidity does not allow setting immutables in if/else statements | ||
shouldUpscale = ezETHRateProviderDecimals < decimals_ ? true : false; | ||
rescaleFactor = (shouldUpscale | ||
? signed256(10 ** (decimals_ - ezETHRateProviderDecimals)) | ||
: signed256(10 ** (ezETHRateProviderDecimals - decimals_)) | ||
); | ||
} |
Check notice
Code scanning / Semgrep OSS
Semgrep Finding: rules.solidity.performance.non-payable-constructor Note
uint256 updatedAt, | ||
uint80 answeredInRound | ||
) { | ||
uint256 rate = IBalancerRateProvider(underlyingPriceFeed).getRate(); |
Check failure
Code scanning / Semgrep OSS
Semgrep Finding: rules.solidity.security.balancer-readonly-reentrancy-getrate Error
No description provided.