Change onlyOwner -> onlyAuthorized everywhere
This commit is contained in:
		@@ -54,7 +54,7 @@ contract Staking is
 | 
			
		||||
        address _zrxVaultAddress        
 | 
			
		||||
    )
 | 
			
		||||
        external
 | 
			
		||||
        onlyOwner
 | 
			
		||||
        onlyAuthorized
 | 
			
		||||
    {
 | 
			
		||||
        // DANGER! When performing upgrades, take care to modify this logic
 | 
			
		||||
        // to prevent accidentally clearing prior state.
 | 
			
		||||
 
 | 
			
		||||
@@ -90,7 +90,7 @@ contract StakingProxy is
 | 
			
		||||
        address _zrxVaultAddress
 | 
			
		||||
    )
 | 
			
		||||
        external
 | 
			
		||||
        onlyOwner
 | 
			
		||||
        onlyAuthorized
 | 
			
		||||
    {
 | 
			
		||||
        _attachStakingContract(
 | 
			
		||||
            _stakingContract,
 | 
			
		||||
@@ -105,7 +105,7 @@ contract StakingProxy is
 | 
			
		||||
    /// Note that this is callable only by this contract's owner.
 | 
			
		||||
    function detachStakingContract()
 | 
			
		||||
        external
 | 
			
		||||
        onlyOwner
 | 
			
		||||
        onlyAuthorized
 | 
			
		||||
    {
 | 
			
		||||
        stakingContract = NIL_ADDRESS;
 | 
			
		||||
        emit StakingContractDetachedFromProxy();
 | 
			
		||||
@@ -114,7 +114,7 @@ contract StakingProxy is
 | 
			
		||||
    /// @dev Set read-only mode (state cannot be changed).
 | 
			
		||||
    function setReadOnlyMode(bool readOnlyMode)
 | 
			
		||||
        external
 | 
			
		||||
        onlyOwner
 | 
			
		||||
        onlyAuthorized
 | 
			
		||||
    {
 | 
			
		||||
        if (readOnlyMode) {
 | 
			
		||||
            stakingContract = readOnlyProxy;
 | 
			
		||||
 
 | 
			
		||||
@@ -46,7 +46,7 @@ contract MixinExchangeManager is
 | 
			
		||||
    /// @param addr Address of exchange contract to add
 | 
			
		||||
    function addExchangeAddress(address addr)
 | 
			
		||||
        external
 | 
			
		||||
        onlyOwner
 | 
			
		||||
        onlyAuthorized
 | 
			
		||||
    {
 | 
			
		||||
        if (validExchanges[addr]) {
 | 
			
		||||
            LibRichErrors.rrevert(LibStakingRichErrors.ExchangeAddressAlreadyRegisteredError(
 | 
			
		||||
@@ -61,7 +61,7 @@ contract MixinExchangeManager is
 | 
			
		||||
    /// @param addr Address of exchange contract to remove
 | 
			
		||||
    function removeExchangeAddress(address addr)
 | 
			
		||||
        external
 | 
			
		||||
        onlyOwner
 | 
			
		||||
        onlyAuthorized
 | 
			
		||||
    {
 | 
			
		||||
        if (!validExchanges[addr]) {
 | 
			
		||||
            LibRichErrors.rrevert(LibStakingRichErrors.ExchangeAddressNotRegisteredError(
 | 
			
		||||
 
 | 
			
		||||
@@ -21,7 +21,7 @@ pragma experimental ABIEncoderV2;
 | 
			
		||||
 | 
			
		||||
import "@0x/contracts-asset-proxy/contracts/src/interfaces/IAssetProxy.sol";
 | 
			
		||||
import "@0x/contracts-utils/contracts/src/LibRichErrors.sol";
 | 
			
		||||
import "@0x/contracts-utils/contracts/src/Ownable.sol";
 | 
			
		||||
import "@0x/contracts-utils/contracts/src/Authorizable.sol";
 | 
			
		||||
import "./MixinConstants.sol";
 | 
			
		||||
import "../interfaces/IZrxVault.sol";
 | 
			
		||||
import "../interfaces/IEthVault.sol";
 | 
			
		||||
@@ -33,7 +33,7 @@ import "../libs/LibStakingRichErrors.sol";
 | 
			
		||||
// solhint-disable max-states-count, no-empty-blocks
 | 
			
		||||
contract MixinStorage is
 | 
			
		||||
    MixinConstants,
 | 
			
		||||
    Ownable
 | 
			
		||||
    Authorizable
 | 
			
		||||
{
 | 
			
		||||
    // WETH Asset Proxy
 | 
			
		||||
    IAssetProxy public wethAssetProxy;
 | 
			
		||||
@@ -134,4 +134,12 @@ contract MixinStorage is
 | 
			
		||||
 | 
			
		||||
    // Denominator for cobb douglas alpha factor.
 | 
			
		||||
    uint32 public cobbDouglasAlphaDenominator;
 | 
			
		||||
 | 
			
		||||
    /// @dev Adds owner as an authorized address.
 | 
			
		||||
    constructor()
 | 
			
		||||
        public
 | 
			
		||||
        Ownable()
 | 
			
		||||
    {
 | 
			
		||||
        _addAuthorizedAddress(owner);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -56,7 +56,7 @@ contract MixinParams is
 | 
			
		||||
        address _zrxVaultAddress
 | 
			
		||||
    )
 | 
			
		||||
        external
 | 
			
		||||
        onlyOwner
 | 
			
		||||
        onlyAuthorized
 | 
			
		||||
    {
 | 
			
		||||
        _setParams(
 | 
			
		||||
            _epochDurationInSeconds,
 | 
			
		||||
 
 | 
			
		||||
@@ -84,7 +84,7 @@ contract MixinVaultCore is
 | 
			
		||||
    /// @param _stakingProxyAddress Address of Staking proxy contract.
 | 
			
		||||
    function setStakingProxy(address payable _stakingProxyAddress)
 | 
			
		||||
        external
 | 
			
		||||
        onlyOwner
 | 
			
		||||
        onlyAuthorized
 | 
			
		||||
    {
 | 
			
		||||
        stakingProxyAddress = _stakingProxyAddress;
 | 
			
		||||
        emit StakingProxySet(_stakingProxyAddress);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user