Adapt proxies to Contracts conventions (#2345)

This commit is contained in:
Francisco Giordano
2020-09-03 13:49:47 -03:00
committed by GitHub
parent 6bc2ae3731
commit 91f16a7e47
4 changed files with 9 additions and 9 deletions

View File

@ -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();
}
}