forked from Benqi-fi/BENQI-Smart-Contracts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
QiErc20Delegate.sol
43 lines (36 loc) · 1.19 KB
/
QiErc20Delegate.sol
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
pragma solidity 0.5.17;
import "./QiErc20.sol";
/**
* @title Benqi's QiErc20Delegate Contract
* @notice QiTokens which wrap an EIP-20 underlying and are delegated to
* @author Benqi
*/
contract QiErc20Delegate is QiErc20, QiDelegateInterface {
/**
* @notice Construct an empty delegate
*/
constructor() public {}
/**
* @notice Called by the delegator on a delegate to initialize it for duty
* @param data The encoded bytes data for any initialization
*/
function _becomeImplementation(bytes memory data) public {
// Shh -- currently unused
data;
// Shh -- we don't ever want this hook to be marked pure
if (false) {
implementation = address(0);
}
require(msg.sender == admin, "only the admin may call _becomeImplementation");
}
/**
* @notice Called by the delegator on a delegate to forfeit its responsibility
*/
function _resignImplementation() public {
// Shh -- we don't ever want this hook to be marked pure
if (false) {
implementation = address(0);
}
require(msg.sender == admin, "only the admin may call _resignImplementation");
}
}