-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathProxyOwnable.sol
43 lines (35 loc) · 2.03 KB
/
ProxyOwnable.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
//SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.7;
/**
* $$$$$$$\ $$\ $$$$$$$$\ $$\
* $$ __$$\ $$ | $$ _____|\__|
* $$ | $$ | $$$$$$\ $$$$$$\ $$$$$$\ $$$$$$\ $$$$$$$ | $$ | $$\ $$$$$$$\ $$$$$$\ $$$$$$$\ $$$$$$$\ $$$$$$\
* $$$$$$$\ |$$ __$$\ $$ __$$\ $$ __$$\ $$ __$$\ $$ __$$ | $$$$$\ $$ |$$ __$$\ \____$$\ $$ __$$\ $$ _____|$$ __$$\
* $$ __$$\ $$ / $$ |$$ / $$ |$$ / $$ |$$$$$$$$ |$$ / $$ | $$ __| $$ |$$ | $$ | $$$$$$$ |$$ | $$ |$$ / $$$$$$$$ |
* $$ | $$ |$$ | $$ |$$ | $$ |$$ | $$ |$$ ____|$$ | $$ | $$ | $$ |$$ | $$ |$$ __$$ |$$ | $$ |$$ | $$ ____|
* $$$$$$$ |\$$$$$$ |\$$$$$$$ |\$$$$$$$ |\$$$$$$$\ \$$$$$$$ |$$\ $$ | $$ |$$ | $$ |\$$$$$$$ |$$ | $$ |\$$$$$$$\ \$$$$$$$\
* \_______/ \______/ \____$$ | \____$$ | \_______| \_______|\__|\__| \__|\__| \__| \_______|\__| \__| \_______| \_______|
* $$\ $$ |$$\ $$ |
* \$$$$$$ |\$$$$$$ |
* \______/ \______/
*
* https://bogged.finance/
*/
import "./LibCoreStorage.sol";
abstract contract ProxyOwnable {
constructor(){
LibCoreStorage.coreStorage().owner = msg.sender;
}
modifier onlyOwner {
require(msg.sender == getOwner(), "BOGProxy: !OWNER");
_;
}
function getOwner() public view returns (address) {
return LibCoreStorage.coreStorage().owner;
}
function transferOwnership(address newOwner) external onlyOwner {
LibCoreStorage.coreStorage().owner = newOwner;
emit OwnershipTransferred(newOwner);
}
event OwnershipTransferred(address newOwner);
}