diff --git a/.gas-snapshot b/.gas-snapshot index 8efd53d3..b3218190 100644 --- a/.gas-snapshot +++ b/.gas-snapshot @@ -160,18 +160,18 @@ RolesAuthorityTest:testCanCallWithAuthorizedRole() (gas: 79601) RolesAuthorityTest:testSetPublicCapabilities() (gas: 29183) RolesAuthorityTest:testSetRoleCapabilities() (gas: 30258) RolesAuthorityTest:testSetRoles() (gas: 28986) -SSTORE2Test:testFailReadInvalidPointer() (gas: 2905) -SSTORE2Test:testFailReadInvalidPointerCustomBounds() (gas: 3143) -SSTORE2Test:testFailReadInvalidPointerCustomStartBound() (gas: 2982) -SSTORE2Test:testFailWriteReadEmptyOutOfBounds() (gas: 34432) -SSTORE2Test:testFailWriteReadOutOfBounds() (gas: 34453) -SSTORE2Test:testFailWriteReadOutOfStartBound() (gas: 34346) -SSTORE2Test:testWriteRead() (gas: 53511) -SSTORE2Test:testWriteReadCustomBounds() (gas: 34853) -SSTORE2Test:testWriteReadCustomStartBound() (gas: 34768) -SSTORE2Test:testWriteReadEmptyBound() (gas: 34639) -SSTORE2Test:testWriteReadFullBoundedRead() (gas: 53708) -SSTORE2Test:testWriteReadFullStartBound() (gas: 34725) +SSTORE2Test:testFailReadInvalidPointer() (gas: 2927) +SSTORE2Test:testFailReadInvalidPointerCustomBounds() (gas: 3099) +SSTORE2Test:testFailReadInvalidPointerCustomStartBound() (gas: 3004) +SSTORE2Test:testFailWriteReadEmptyOutOfBounds() (gas: 34470) +SSTORE2Test:testFailWriteReadOutOfBounds() (gas: 34426) +SSTORE2Test:testFailWriteReadOutOfStartBound() (gas: 34362) +SSTORE2Test:testWriteRead() (gas: 53497) +SSTORE2Test:testWriteReadCustomBounds() (gas: 34869) +SSTORE2Test:testWriteReadCustomStartBound() (gas: 34740) +SSTORE2Test:testWriteReadEmptyBound() (gas: 34677) +SSTORE2Test:testWriteReadFullBoundedRead() (gas: 53672) +SSTORE2Test:testWriteReadFullStartBound() (gas: 34764) SafeCastLibTest:testFailSafeCastTo128() (gas: 321) SafeCastLibTest:testFailSafeCastTo160() (gas: 342) SafeCastLibTest:testFailSafeCastTo192() (gas: 344) @@ -190,29 +190,29 @@ SafeCastLibTest:testSafeCastTo32() (gas: 471) SafeCastLibTest:testSafeCastTo64() (gas: 470) SafeCastLibTest:testSafeCastTo8() (gas: 469) SafeCastLibTest:testSafeCastTo96() (gas: 469) -SafeTransferLibTest:testApproveWithMissingReturn() (gas: 30774) -SafeTransferLibTest:testApproveWithNonContract() (gas: 3014) -SafeTransferLibTest:testApproveWithReturnsTooMuch() (gas: 31155) -SafeTransferLibTest:testApproveWithStandardERC20() (gas: 30839) -SafeTransferLibTest:testFailApproveWithReturnsFalse() (gas: 5626) -SafeTransferLibTest:testFailApproveWithReturnsTooLittle() (gas: 5569) -SafeTransferLibTest:testFailApproveWithReverting() (gas: 5524) +SafeTransferLibTest:testApproveWithMissingReturn() (gas: 30751) +SafeTransferLibTest:testApproveWithNonContract() (gas: 3035) +SafeTransferLibTest:testApproveWithReturnsTooMuch() (gas: 31134) +SafeTransferLibTest:testApproveWithStandardERC20() (gas: 30882) +SafeTransferLibTest:testFailApproveWithReturnsFalse() (gas: 5627) +SafeTransferLibTest:testFailApproveWithReturnsTooLittle() (gas: 5568) +SafeTransferLibTest:testFailApproveWithReverting() (gas: 5502) SafeTransferLibTest:testFailTransferETHToContractWithoutFallback() (gas: 7244) -SafeTransferLibTest:testFailTransferFromWithReturnsFalse() (gas: 13662) -SafeTransferLibTest:testFailTransferFromWithReturnsTooLittle() (gas: 13500) +SafeTransferLibTest:testFailTransferFromWithReturnsFalse() (gas: 13663) +SafeTransferLibTest:testFailTransferFromWithReturnsTooLittle() (gas: 13544) SafeTransferLibTest:testFailTransferFromWithReverting() (gas: 9757) SafeTransferLibTest:testFailTransferWithReturnsFalse() (gas: 8532) -SafeTransferLibTest:testFailTransferWithReturnsTooLittle() (gas: 8473) -SafeTransferLibTest:testFailTransferWithReverting() (gas: 8516) -SafeTransferLibTest:testTransferETH() (gas: 34637) -SafeTransferLibTest:testTransferFromWithMissingReturn() (gas: 49153) -SafeTransferLibTest:testTransferFromWithNonContract() (gas: 3036) +SafeTransferLibTest:testFailTransferWithReturnsTooLittle() (gas: 8538) +SafeTransferLibTest:testFailTransferWithReverting() (gas: 8494) +SafeTransferLibTest:testTransferETH() (gas: 34592) +SafeTransferLibTest:testTransferFromWithMissingReturn() (gas: 49188) +SafeTransferLibTest:testTransferFromWithNonContract() (gas: 3035) SafeTransferLibTest:testTransferFromWithReturnsTooMuch() (gas: 49812) -SafeTransferLibTest:testTransferFromWithStandardERC20() (gas: 47623) -SafeTransferLibTest:testTransferWithMissingReturn() (gas: 36668) -SafeTransferLibTest:testTransferWithNonContract() (gas: 2990) -SafeTransferLibTest:testTransferWithReturnsTooMuch() (gas: 37093) -SafeTransferLibTest:testTransferWithStandardERC20() (gas: 36722) +SafeTransferLibTest:testTransferFromWithStandardERC20() (gas: 47605) +SafeTransferLibTest:testTransferWithMissingReturn() (gas: 36669) +SafeTransferLibTest:testTransferWithNonContract() (gas: 3012) +SafeTransferLibTest:testTransferWithReturnsTooMuch() (gas: 37115) +SafeTransferLibTest:testTransferWithStandardERC20() (gas: 36699) WETHTest:testDeposit() (gas: 63260) WETHTest:testFallbackDeposit() (gas: 63524) WETHTest:testPartialWithdraw() (gas: 73281) diff --git a/src/test/FixedPointMathLib.t.sol b/src/test/FixedPointMathLib.t.sol index 7d5fbcab..6e259f7c 100644 --- a/src/test/FixedPointMathLib.t.sol +++ b/src/test/FixedPointMathLib.t.sol @@ -126,7 +126,7 @@ contract FixedPointMathLibTest is DSTestPlus { function testMulWadDown(uint256 x, uint256 y) public { // Ignore cases where x * y overflows. unchecked { - if ((x != 0 && (x * y) / x != y)) return; + if (x != 0 && (x * y) / x != y) return; } assertEq(FixedPointMathLib.mulWadDown(x, y), (x * y) / 1e18); @@ -144,7 +144,7 @@ contract FixedPointMathLibTest is DSTestPlus { function testMulWadUp(uint256 x, uint256 y) public { // Ignore cases where x * y overflows. unchecked { - if ((x != 0 && (x * y) / x != y)) return; + if (x != 0 && (x * y) / x != y) return; } assertEq(FixedPointMathLib.mulWadUp(x, y), x * y == 0 ? 0 : (x * y - 1) / 1e18 + 1);