diff --git a/src/ERC20Helper.sol b/src/ERC20Helper.sol index 9686816..54d2db6 100644 --- a/src/ERC20Helper.sol +++ b/src/ERC20Helper.sol @@ -34,13 +34,7 @@ library ERC20Helper { } function _call(address token_, bytes memory data_) private returns (bool success_) { - uint256 size; - - assembly { - size := extcodesize(token_) - } - - if (size == uint256(0)) return false; + if (token_.code.length == 0) return false; bytes memory returnData; ( success_, returnData ) = token_.call(data_);