diff --git a/contracts/sfc/NodeDriverAuth.sol b/contracts/sfc/NodeDriverAuth.sol index 961dda6..0fb2d2f 100644 --- a/contracts/sfc/NodeDriverAuth.sol +++ b/contracts/sfc/NodeDriverAuth.sol @@ -171,19 +171,10 @@ contract NodeDriverAuth is OwnableUpgradeable, UUPSUpgradeable { } function isContract(address account) internal view returns (bool) { - uint256 size; - // solhint-disable-next-line no-inline-assembly - assembly { - size := extcodesize(account) - } - return size > 0; + return account.code.length > 0; } function _getCodeHash(address addr) internal view returns (bytes32) { - bytes32 codeHash; - assembly { - codeHash := extcodehash(addr) - } - return codeHash; + return addr.codehash; } }