Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * @dev Allows the upgradeability owner to upgrade the current version of the proxy and call the new implementation
- * to initialize whatever is needed through a low level call.
- * @param _newVersion representing the version name of the new implementation to be set.
- * @param _newImplementation representing the address of the new implementation to be set.
- * @param _data represents the msg.data to bet sent in the low level call. This parameter may include the function
- * signature of the implementation to be called with the needed payload
- */
- function upgradeToAndCall(string _newVersion, address _newImplementation, bytes _data) external payable ifOwner {
- _upgradeTo(_newVersion, _newImplementation);
- /*solium-disable-next-line security/no-call-value*/
- require(address(this).call.value(msg.value)(_data), "Fail in executing the function of implementation contract");
- }
Add Comment
Please, Sign In to add comment