1
1
// SPDX-License-Identifier: UNLICENSED
2
2
pragma solidity ^ 0.8.0 ;
3
3
4
- import "@openzeppelin/contracts/access/AccessControl .sol " ;
4
+ import "@openzeppelin/contracts/access/Ownable .sol " ;
5
5
import "@openzeppelin/contracts/proxy/beacon/UpgradeableBeacon.sol " ;
6
6
import "@openzeppelin/contracts/proxy/beacon/BeaconProxy.sol " ;
7
7
import "./LimitedTokenPool.sol " ;
8
8
import "../../funds/RewardsBank.sol " ;
9
9
import "../../LockKeeper.sol " ;
10
10
11
- contract LimitedTokenPoolsManager is AccessControl {
11
+ contract LimitedTokenPoolsManager is Ownable {
12
12
LockKeeper lockKeeper;
13
13
RewardsBank public bank;
14
14
UpgradeableBeacon public limitedTokenPoolBeacon;
15
15
16
16
address [] public pools;
17
17
18
- constructor (RewardsBank bank_ , LockKeeper lockKeeper_ , UpgradeableBeacon doubleSideBeacon_ ) {
18
+ constructor (RewardsBank bank_ , LockKeeper lockKeeper_ , UpgradeableBeacon doubleSideBeacon_ ) Ownable () {
19
19
lockKeeper = lockKeeper_;
20
20
bank = bank_;
21
21
limitedTokenPoolBeacon = doubleSideBeacon_;
22
- _setupRole (DEFAULT_ADMIN_ROLE, msg .sender );
23
22
}
24
23
25
24
event LimitedPoolCreated (address pool );
@@ -28,7 +27,7 @@ contract LimitedTokenPoolsManager is AccessControl {
28
27
event LimitedPoolActivated (address pool );
29
28
30
29
// LIMITED POOL METHODS
31
- function createPool (LimitedTokenPool.MainConfig calldata params ) public onlyRole (DEFAULT_ADMIN_ROLE) returns (address ) {
30
+ function createPool (LimitedTokenPool.MainConfig calldata params ) public onlyOwner returns (address ) {
32
31
bytes memory data = abi.encodeWithSignature (
33
32
"initialize(address,address,(string,address,address,address)) " ,
34
33
bank, lockKeeper, params);
@@ -39,21 +38,21 @@ contract LimitedTokenPoolsManager is AccessControl {
39
38
return pool;
40
39
}
41
40
42
- function configurePool (address _pool , LimitedTokenPool.LimitsConfig calldata params ) public onlyRole (DEFAULT_ADMIN_ROLE) {
41
+ function configurePool (address _pool , LimitedTokenPool.LimitsConfig calldata params ) public onlyOwner {
43
42
require (_isPool (_pool),"Pool does not exist " );
44
43
LimitedTokenPool pool = LimitedTokenPool (_pool);
45
44
pool.setLimitsConfig (params);
46
45
emit LimitedPoolConfigured (_pool, params);
47
46
}
48
47
49
- function deactivatePool (address _pool ) public onlyRole (DEFAULT_ADMIN_ROLE) {
48
+ function deactivatePool (address _pool ) public onlyOwner {
50
49
require (_isPool (_pool),"Pool does not exist " );
51
50
LimitedTokenPool pool = LimitedTokenPool (_pool);
52
51
pool.deactivate ();
53
52
emit LimitedPoolDeactivated (_pool);
54
53
}
55
54
56
- function activatePool (address _pool ) public onlyRole (DEFAULT_ADMIN_ROLE) {
55
+ function activatePool (address _pool ) public onlyOwner {
57
56
require (_isPool (_pool),"Pool does not exist " );
58
57
LimitedTokenPool pool = LimitedTokenPool (_pool);
59
58
pool.activate ();
0 commit comments