-
Notifications
You must be signed in to change notification settings - Fork 834
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
chore: refactor to use cosmossdk/math types #2104
Conversation
@@ -442,7 +443,7 @@ | |||
return nil, errorsmod.Wrapf(types.ErrGasOverflow, "message gas limit < leftover gas (%d < %d)", msg.Gas(), leftoverGas) | |||
} | |||
|
|||
gasUsed := sdk.MaxDec(minimumGasUsed, sdk.NewDec(int64(temporaryGasUsed))).TruncateInt().Uint64() | |||
gasUsed := math.LegacyMaxDec(minimumGasUsed, math.LegacyNewDec(int64(temporaryGasUsed))).TruncateInt().Uint64() |
Check failure
Code scanning / gosec
Potential integer overflow by integer type conversion Error
@@ -430,7 +431,7 @@ | |||
// calculate a minimum amount of gas to be charged to sender if GasLimit | |||
// is considerably higher than GasUsed to stay more aligned with Tendermint gas mechanics | |||
// for more info https://github.com/evmos/ethermint/issues/1085 | |||
gasLimit := sdk.NewDec(int64(msg.Gas())) | |||
gasLimit := math.LegacyNewDec(int64(msg.Gas())) |
Check failure
Code scanning / gosec
Potential integer overflow by integer type conversion Error
@@ -64,7 +65,7 @@ | |||
|
|||
// Observe which users define a gas limit >> gas used. Note, that | |||
// gas_limit and gas_used are always > 0 | |||
gasLimit := sdk.NewDec(int64(tx.Gas())) | |||
gasLimit := math.LegacyNewDec(int64(tx.Gas())) |
Check failure
Code scanning / gosec
Potential integer overflow by integer type conversion Error
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #2104 +/- ##
=======================================
Coverage 69.02% 69.02%
=======================================
Files 301 301
Lines 23638 23638
=======================================
Hits 16317 16317
Misses 6433 6433
Partials 888 888
|
Description
Closes #XXX