From ed7ee9b2c41ad85ab8cf5c3e98bf4ea9189620a6 Mon Sep 17 00:00:00 2001 From: shafu Date: Wed, 13 Sep 2023 13:20:32 +0200 Subject: [PATCH] Use the ternary operator to provide a more compact condition --- src/HuffConfig.sol | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/HuffConfig.sol b/src/HuffConfig.sol index a6f8b09..d8c5df6 100644 --- a/src/HuffConfig.sol +++ b/src/HuffConfig.sol @@ -135,11 +135,8 @@ contract HuffConfig { /// @notice Get the evm version string | else return default ("shanghai") function get_evm_version() public view returns (string memory) { - bytes32 _evm_version = bytes32(bytes(abi.encodePacked(evm_version))); - if (_evm_version == bytes32(0x0)) { - return "shanghai"; - } - return evm_version; + bytes32 _evm_version = bytes32(bytes(abi.encodePacked(evm_version))); + return (_evm_version == bytes32(0x0)) ? "shanghai" : evm_version; } /// @notice Get the creation bytecode of a contract