diff --git a/.gas-snapshot b/.gas-snapshot index 2448445..64f2726 100644 --- a/.gas-snapshot +++ b/.gas-snapshot @@ -10,25 +10,25 @@ IETest:testCommandSendETHRawAddrPrecisePercent() (gas: 79648) IETest:testCommandSendUSDCRawAddr() (gas: 91856) IETest:testCommandSendUSDCRawAddr100Percent() (gas: 95371) IETest:testCommandSendUSDCRawAddr50Percent() (gas: 120623) -IETest:testCommandStakeETH() (gas: 145671) -IETest:testCommandSwapAllETH() (gas: 147104) -IETest:testCommandSwapAllETHSend() (gas: 169101) -IETest:testCommandSwapDAI() (gas: 138684) -IETest:testCommandSwapDAI100Percent() (gas: 109845) -IETest:testCommandSwapDAI50Percent() (gas: 134909) -IETest:testCommandSwapDAIExactOut() (gas: 157206) -IETest:testCommandSwapDAIExactOutSendETH() (gas: 201891) -IETest:testCommandSwapDAIExactOutSendWETH() (gas: 200470) -IETest:testCommandSwapDAIMinOut() (gas: 159193) -IETest:testCommandSwapDAIMinOutAll() (gas: 8686961) -IETest:testCommandSwapDAIMinOutPercentage() (gas: 8687463) -IETest:testCommandSwapDAIPercentageExactOutSendUSDC() (gas: 206296) -IETest:testCommandSwapETH() (gas: 153548) -IETest:testCommandSwapForETH() (gas: 145655) -IETest:testCommandSwapUSDC() (gas: 168429) -IETest:testCommandSwapUSDC50Percent() (gas: 153492) -IETest:testCommandSwapUSDCForWBTC() (gas: 192521) -IETest:testDeploy() (gas: 3923895) +IETest:testCommandStakeETH() (gas: 145693) +IETest:testCommandSwapAllETH() (gas: 146978) +IETest:testCommandSwapAllETHSend() (gas: 168975) +IETest:testCommandSwapDAI() (gas: 129984) +IETest:testCommandSwapDAI100Percent() (gas: 109889) +IETest:testCommandSwapDAI50Percent() (gas: 134915) +IETest:testCommandSwapDAIExactOut() (gas: 157182) +IETest:testCommandSwapDAIExactOutSendETH() (gas: 201867) +IETest:testCommandSwapDAIExactOutSendWETH() (gas: 200446) +IETest:testCommandSwapDAIMinOut() (gas: 159231) +IETest:testCommandSwapDAIMinOutAll() (gas: 8446844) +IETest:testCommandSwapDAIMinOutPercentage() (gas: 8447346) +IETest:testCommandSwapDAIPercentageExactOutSendUSDC() (gas: 206302) +IETest:testCommandSwapETH() (gas: 153532) +IETest:testCommandSwapForETH() (gas: 137192) +IETest:testCommandSwapUSDC() (gas: 168431) +IETest:testCommandSwapUSDC50Percent() (gas: 153500) +IETest:testCommandSwapUSDCForWBTC() (gas: 192495) +IETest:testDeploy() (gas: 3875145) IETest:testFailCommandSendETHRawAddr1000Percent() (gas: 76740) IETest:testPreviewCommandSendDecimals() (gas: 121286) IETest:testPreviewCommandSendUSDC() (gas: 61575) diff --git a/src/IE.sol b/src/IE.sol index 7982548..d7a287e 100644 --- a/src/IE.sol +++ b/src/IE.sol @@ -865,7 +865,7 @@ contract IE { function _isNumber(bytes memory s) internal pure virtual returns (bool) { uint256 len = s.length; if (len == 0) return false; - if (len == 3 && s[0] == "a" && s[1] == "l" && s[2] == "l") return true; + if (bytes32(s) == "all") return true; // Early exit for single digit. if (len == 1) return (s[0] >= 0x30 && s[0] <= 0x39);