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