-
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
Proposal for Mantle USDe market #85
base: main
Are you sure you want to change the base?
Conversation
…ess - 0x2127338F0ff71Ecc779dce407D95C7D32f7C5F45
error InvalidInt256(); | ||
|
||
/// @notice Version of the price feed | ||
uint public constant override version = 1; |
Check warning
Code scanning / Semgrep OSS
A constant name is not in UPPER_CASE like other constant variables. Warning
constructor(address underlyingPriceFeed_, uint8 decimals_, string memory description_) { | ||
underlyingPriceFeed = underlyingPriceFeed_; | ||
decimals = decimals_; | ||
description = description_; | ||
|
||
uint8 underlyingPriceFeedDecimals = AggregatorV3Interface(underlyingPriceFeed_).decimals(); | ||
// Note: Solidity does not allow setting immutables in if/else statements | ||
shouldUpscale = underlyingPriceFeedDecimals < decimals_ ? true : false; | ||
rescaleFactor = (shouldUpscale | ||
? signed256(10 ** (decimals_ - underlyingPriceFeedDecimals)) | ||
: signed256(10 ** (underlyingPriceFeedDecimals - decimals_)) | ||
); | ||
} |
Check warning
Code scanning / Semgrep OSS
There're no sanity checks for the constructor argument decimals_. Warning
constructor(address underlyingPriceFeed_, uint8 decimals_, string memory description_) { | ||
underlyingPriceFeed = underlyingPriceFeed_; | ||
decimals = decimals_; | ||
description = description_; | ||
|
||
uint8 underlyingPriceFeedDecimals = AggregatorV3Interface(underlyingPriceFeed_).decimals(); | ||
// Note: Solidity does not allow setting immutables in if/else statements | ||
shouldUpscale = underlyingPriceFeedDecimals < decimals_ ? true : false; | ||
rescaleFactor = (shouldUpscale | ||
? signed256(10 ** (decimals_ - underlyingPriceFeedDecimals)) | ||
: signed256(10 ** (underlyingPriceFeedDecimals - decimals_)) | ||
); | ||
} |
Check warning
Code scanning / Semgrep OSS
There're no sanity checks for the constructor argument description_. Warning
constructor(address underlyingPriceFeed_, uint8 decimals_, string memory description_) { | ||
underlyingPriceFeed = underlyingPriceFeed_; | ||
decimals = decimals_; | ||
description = description_; | ||
|
||
uint8 underlyingPriceFeedDecimals = AggregatorV3Interface(underlyingPriceFeed_).decimals(); | ||
// Note: Solidity does not allow setting immutables in if/else statements | ||
shouldUpscale = underlyingPriceFeedDecimals < decimals_ ? true : false; | ||
rescaleFactor = (shouldUpscale | ||
? signed256(10 ** (decimals_ - underlyingPriceFeedDecimals)) | ||
: signed256(10 ** (underlyingPriceFeedDecimals - decimals_)) | ||
); | ||
} |
Check warning
Code scanning / Semgrep OSS
There're no sanity checks for the constructor argument underlyingPriceFeed_. Warning
constructor(address underlyingPriceFeed_, uint8 decimals_, string memory description_) { | ||
underlyingPriceFeed = underlyingPriceFeed_; | ||
decimals = decimals_; | ||
description = description_; | ||
|
||
uint8 underlyingPriceFeedDecimals = AggregatorV3Interface(underlyingPriceFeed_).decimals(); | ||
// Note: Solidity does not allow setting immutables in if/else statements | ||
shouldUpscale = underlyingPriceFeedDecimals < decimals_ ? true : false; | ||
rescaleFactor = (shouldUpscale | ||
? signed256(10 ** (decimals_ - underlyingPriceFeedDecimals)) | ||
: signed256(10 ** (underlyingPriceFeedDecimals - decimals_)) | ||
); | ||
} |
Check warning
Code scanning / Semgrep OSS
Consider making costructor payable to save gas. Warning
…m:woof-software/comet into woof-software/deploy-compound-mantle-usde
Co-authored-by: dmitriy-woof-software <dmitriy@woof.software> Co-authored-by: GitHub Actions Bot <> Co-authored-by: Dmitriy Babenko <159453675+dmitriy-woof-software@users.noreply.github.com>
…are/deploy-compound-mantle-usde
b921cbf
to
01ce0c4
Compare
No description provided.