You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As following, removeFunctions in ParaProxyLib.
It seems the program could check the equality of the oldImplementationAddress and the _implementationAddress, which prevents from removing functions by accidents.
function removeFunctions(
address _implementationAddress,
bytes4[] memory _functionSelectors
) internal {
require(
_functionSelectors.length > 0,
"ParaProxy: No selectors in implementation to cut"
);
ProxyStorage storage ds = diamondStorage();
// if function does not exist then do nothing and return
require(
_implementationAddress == address(0),
"ParaProxy: Remove implementation address must be address(0)"
);
for (
uint256 selectorIndex;
selectorIndex < _functionSelectors.length;
selectorIndex++
) {
bytes4 selector = _functionSelectors[selectorIndex];
address oldImplementationAddress = ds
.selectorToImplAndPosition[selector]
.implAddress;
removeFunction(ds, oldImplementationAddress, selector);
}
}
The text was updated successfully, but these errors were encountered:
As following, removeFunctions in ParaProxyLib.
It seems the program could check the equality of the oldImplementationAddress and the _implementationAddress, which prevents from removing functions by accidents.
The text was updated successfully, but these errors were encountered: