Implement recommendations from 5.0 audit Phase 1B (#4502)
Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com> Co-authored-by: Francisco Giordano <fg@frang.io>
This commit is contained in:
@ -25,7 +25,7 @@ abstract contract UUPSUpgradeable is IERC1822Proxiable {
|
||||
* and `upgradeToAndCall(address,bytes)` are present, and `upgradeTo` must be used if no function should be called,
|
||||
* while `upgradeToAndCall` will invoke the `receive` function if the second argument is the empty byte string.
|
||||
* If the getter returns `"5.0.0"`, only `upgradeToAndCall(address,bytes)` is present, and the second argument must
|
||||
* be the empty byte string if no function should be called, being impossible to invoke the `receive` function
|
||||
* be the empty byte string if no function should be called, making it impossible to invoke the `receive` function
|
||||
* during an upgrade.
|
||||
*/
|
||||
string public constant UPGRADE_INTERFACE_VERSION = "5.0.0";
|
||||
@ -126,7 +126,10 @@ abstract contract UUPSUpgradeable is IERC1822Proxiable {
|
||||
function _authorizeUpgrade(address newImplementation) internal virtual;
|
||||
|
||||
/**
|
||||
* @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.
|
||||
* @dev Performs an implementation upgrade with a security check for UUPS proxies, and additional setup call.
|
||||
*
|
||||
* As a security check, {proxiableUUID} is invoked in the new implementation, and the return value
|
||||
* is expected to be the implementation slot in ERC1967.
|
||||
*
|
||||
* Emits an {IERC1967-Upgraded} event.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user