Remove Address.isContract (#3945)
Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com> Co-authored-by: Francisco Giordano <fg@frang.io>
This commit is contained in:
@ -1,11 +1,10 @@
|
||||
// SPDX-License-Identifier: MIT
|
||||
// OpenZeppelin Contracts v4.4.1 (proxy/beacon/UpgradeableBeacon.sol)
|
||||
|
||||
pragma solidity ^0.8.0;
|
||||
pragma solidity ^0.8.1;
|
||||
|
||||
import "./IBeacon.sol";
|
||||
import "../../access/Ownable.sol";
|
||||
import "../../utils/Address.sol";
|
||||
|
||||
/**
|
||||
* @dev This contract is used in conjunction with one or more instances of {BeaconProxy} to determine their
|
||||
@ -59,7 +58,7 @@ contract UpgradeableBeacon is IBeacon, Ownable {
|
||||
* - `newImplementation` must be a contract.
|
||||
*/
|
||||
function _setImplementation(address newImplementation) private {
|
||||
require(Address.isContract(newImplementation), "UpgradeableBeacon: implementation is not a contract");
|
||||
require(newImplementation.code.length > 0, "UpgradeableBeacon: implementation is not a contract");
|
||||
_implementation = newImplementation;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user