Skip to content

Commit

Permalink
fix(protocol): small fix to 1559 error check (#18339)
Browse files Browse the repository at this point in the history
  • Loading branch information
dantaik authored Oct 29, 2024
1 parent 74e4ca4 commit 4428661
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/protocol/contracts/layer2/based/Lib1559Math.sol
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ library Lib1559Math {

uint256 f = FixedPointMathLib.WAD;
uint256 ratio = f * _newGasTarget / _gasTarget;
if (ratio > uint256(type(int256).max)) revert EIP1559_INVALID_PARAMS();
if (ratio == 0 || ratio > uint256(type(int256).max)) revert EIP1559_INVALID_PARAMS();

int256 lnRatio = FixedPointMathLib.lnWad(int256(ratio)); // may be negative

Expand Down

0 comments on commit 4428661

Please sign in to comment.