Adapt proxies to Contracts conventions (#2345)
This commit is contained in:
committed by
GitHub
parent
6bc2ae3731
commit
91f16a7e47
@ -134,7 +134,7 @@ contract TransparentUpgradeableProxy is UpgradeableProxy {
|
||||
/**
|
||||
* @dev Stores a new address in the EIP1967 admin slot.
|
||||
*/
|
||||
function _setAdmin(address newAdmin) internal {
|
||||
function _setAdmin(address newAdmin) private {
|
||||
bytes32 slot = _ADMIN_SLOT;
|
||||
|
||||
// solhint-disable-next-line no-inline-assembly
|
||||
@ -144,10 +144,10 @@ contract TransparentUpgradeableProxy is UpgradeableProxy {
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev Makes sure the admin cannot access the fallback function. See {Proxy-_willFallback}.
|
||||
* @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.
|
||||
*/
|
||||
function _willFallback() internal override virtual {
|
||||
function _beforeFallback() internal override virtual {
|
||||
require(msg.sender != _admin(), "TransparentUpgradeableProxy: admin cannot fallback to proxy target");
|
||||
super._willFallback();
|
||||
super._beforeFallback();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user