-
Notifications
You must be signed in to change notification settings - Fork 124
Expand file tree
/
Copy pathProxyOwner.sol
More file actions
26 lines (23 loc) · 852 Bytes
/
ProxyOwner.sol
File metadata and controls
26 lines (23 loc) · 852 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// SPDX-License-Identifier: Apache-2.0
// Copyright 2017 Loopring Technology Limited.
pragma solidity ^0.7.0;
import "./DelayedOwner.sol";
/// @title IProxy
/// @author Break Xiong - <kl456123@outlook.com>
interface IProxy {
function transferProxyOwnership(address newOwner) external;
function upgradeTo(address implementation) external;
function upgradeToAndCall(
address implementation,
bytes memory data
) external payable;
}
/// @title ProxyOwner
/// @author Break Xiong - <kl456123@outlook.com>
contract ProxyOwner is DelayedOwner {
constructor(IProxy proxy) DelayedOwner(address(proxy), 3 days) {
setFunctionDelay(proxy.transferProxyOwnership.selector, 7 days);
setFunctionDelay(proxy.upgradeTo.selector, 7 days);
setFunctionDelay(proxy.upgradeToAndCall.selector, 7 days);
}
}