@@ -4,13 +4,13 @@ import {DelegateProxy} from "./DelegateProxy.sol";
44
55contract UpgradableProxy is DelegateProxy {
66 event ProxyUpdated (address indexed _new , address indexed _old );
7- event OwnerUpdate (address _new , address _old );
7+ event ProxyOwnerUpdate (address _new , address _old );
88
99 bytes32 constant IMPLEMENTATION_SLOT = keccak256 ("matic.network.proxy.implementation " );
1010 bytes32 constant OWNER_SLOT = keccak256 ("matic.network.proxy.owner " );
1111
1212 constructor (address _proxyTo ) public {
13- setOwner (msg .sender );
13+ setProxyOwner (msg .sender );
1414 setImplementation (_proxyTo);
1515 }
1616
@@ -21,15 +21,15 @@ contract UpgradableProxy is DelegateProxy {
2121 }
2222
2323 modifier onlyProxyOwner () {
24- require (loadOwner () == msg .sender , "NOT_OWNER " );
24+ require (loadProxyOwner () == msg .sender , "NOT_OWNER " );
2525 _;
2626 }
2727
28- function owner () external view returns (address ) {
29- return loadOwner ();
28+ function proxyOwner () external view returns (address ) {
29+ return loadProxyOwner ();
3030 }
3131
32- function loadOwner () internal view returns (address ) {
32+ function loadProxyOwner () internal view returns (address ) {
3333 address _owner;
3434 bytes32 position = OWNER_SLOT;
3535 assembly {
@@ -51,13 +51,13 @@ contract UpgradableProxy is DelegateProxy {
5151 return _impl;
5252 }
5353
54- function transferOwnership (address newOwner ) public onlyProxyOwner {
54+ function transferProxyOwnership (address newOwner ) public onlyProxyOwner {
5555 require (newOwner != address (0 ), "ZERO_ADDRESS " );
56- emit OwnerUpdate (newOwner, loadOwner ());
57- setOwner (newOwner);
56+ emit ProxyOwnerUpdate (newOwner, loadProxyOwner ());
57+ setProxyOwner (newOwner);
5858 }
5959
60- function setOwner (address newOwner ) private {
60+ function setProxyOwner (address newOwner ) private {
6161 bytes32 position = OWNER_SLOT;
6262 assembly {
6363 sstore (position, newOwner)
0 commit comments