Skip to content

Commit

Permalink
changed to onlyOwner
Browse files Browse the repository at this point in the history
  • Loading branch information
dovgopoly committed Oct 13, 2023
1 parent 0d97eaa commit 98266b6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 23 deletions.
14 changes: 1 addition & 13 deletions contracts/core/ContractsRegistry.sol
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,6 @@ contract ContractsRegistry is IContractsRegistry, OwnableContractsRegistry, UUPS

string public constant CORE_PROPERTIES_NAME = "CORE_PROPERTIES";

modifier onlyDexeGov() {
_onlyDexeGov();
_;
}

function getUserRegistryContract() external view override returns (address) {
return getContract(USER_REGISTRY_NAME);
}
Expand Down Expand Up @@ -81,7 +76,7 @@ contract ContractsRegistry is IContractsRegistry, OwnableContractsRegistry, UUPS
return getContract(DEXE_EXPERT_NFT_NAME);
}

function setSphereXEngine(address sphereXEngine) external onlyDexeGov {
function setSphereXEngine(address sphereXEngine) external onlyOwner {
_setSphereXEngine(USER_REGISTRY_NAME, sphereXEngine);
_setSphereXEngine(POOL_FACTORY_NAME, sphereXEngine);
_setSphereXEngine(POOL_REGISTRY_NAME, sphereXEngine);
Expand Down Expand Up @@ -116,12 +111,5 @@ contract ContractsRegistry is IContractsRegistry, OwnableContractsRegistry, UUPS
);
}

function _onlyDexeGov() internal view {
require(
getTreasuryContract() == msg.sender,
"ContractsRegistry: Caller is not a DEXE gov"
);
}

function _authorizeUpgrade(address newImplementation) internal override onlyOwner {}
}
11 changes: 1 addition & 10 deletions contracts/factory/PoolRegistry.sol
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,6 @@ contract PoolRegistry is IPoolRegistry, OwnablePoolContractsRegistry {
_;
}

modifier onlyDexeGov() {
_onlyDexeGov();
_;
}

function setDependencies(address contractsRegistry, bytes memory data) public override {
super.setDependencies(contractsRegistry, data);

Expand All @@ -59,7 +54,7 @@ contract PoolRegistry is IPoolRegistry, OwnablePoolContractsRegistry {
_addProxyPool(name, poolAddress);
}

function setSphereXEngine(address sphereXEngine) external onlyDexeGov {
function setSphereXEngine(address sphereXEngine) external onlyOwner {
_setSpherexEngine(GOV_POOL_NAME, sphereXEngine);
_setSpherexEngine(SETTINGS_NAME, sphereXEngine);
_setSpherexEngine(VALIDATORS_NAME, sphereXEngine);
Expand All @@ -84,10 +79,6 @@ contract PoolRegistry is IPoolRegistry, OwnablePoolContractsRegistry {
require(_poolFactory == msg.sender, "PoolRegistry: Caller is not a factory");
}

function _onlyDexeGov() internal view {
require(_dexeGovAddress == msg.sender, "PoolRegistry: Caller is not a DEXE gov");
}

function _deployProxyBeacon(address implementation) internal override returns (address) {
return address(new PoolBeacon(_dexeGovAddress, address(this), address(0), implementation));
}
Expand Down

0 comments on commit 98266b6

Please sign in to comment.