Remove redundant setters and require statements
This commit is contained in:
parent
b70db37b4f
commit
16ebdfad9a
@ -134,10 +134,4 @@ interface IStakingEvents {
|
||||
bytes32 poolId,
|
||||
address makerAddress
|
||||
);
|
||||
|
||||
/// @dev Emitted by MixinStakingPoolRewardVault when the vault's address is changed.
|
||||
/// @param rewardVaultAddress Address of new reward vault.
|
||||
event StakingPoolRewardVaultChanged(
|
||||
address rewardVaultAddress
|
||||
);
|
||||
}
|
||||
|
@ -27,15 +27,6 @@ import "../immutable/MixinStorage.sol";
|
||||
contract MixinZrxVault is
|
||||
MixinStorage
|
||||
{
|
||||
/// @dev Set the Zrx Vault.
|
||||
/// @param zrxVaultAddress Address of the Zrx Vault.
|
||||
function setZrxVault(address zrxVaultAddress)
|
||||
external
|
||||
onlyOwner
|
||||
{
|
||||
zrxVault = IZrxVault(zrxVaultAddress);
|
||||
}
|
||||
|
||||
/// @dev Deposits Zrx Tokens from the `owner` into the vault.
|
||||
/// @param owner of Zrx Tokens
|
||||
/// @param amount of tokens to deposit.
|
||||
@ -43,10 +34,6 @@ contract MixinZrxVault is
|
||||
internal
|
||||
{
|
||||
IZrxVault _zrxVault = zrxVault;
|
||||
require(
|
||||
address(_zrxVault) != address(0),
|
||||
"INVALID_ZRX_VAULT"
|
||||
);
|
||||
_zrxVault.depositFrom(owner, amount);
|
||||
}
|
||||
|
||||
@ -57,10 +44,6 @@ contract MixinZrxVault is
|
||||
internal
|
||||
{
|
||||
IZrxVault _zrxVault = zrxVault;
|
||||
require(
|
||||
address(_zrxVault) != address(0),
|
||||
"INVALID_ZRX_VAULT"
|
||||
);
|
||||
_zrxVault.withdrawFrom(owner, amount);
|
||||
}
|
||||
|
||||
@ -72,10 +55,6 @@ contract MixinZrxVault is
|
||||
returns (uint256)
|
||||
{
|
||||
IZrxVault _zrxVault = zrxVault;
|
||||
require(
|
||||
address(_zrxVault) != address(0),
|
||||
"INVALID_ZRX_VAULT"
|
||||
);
|
||||
return _zrxVault.balanceOf(owner);
|
||||
}
|
||||
}
|
||||
|
@ -67,16 +67,6 @@ contract MixinStakingPoolRewardVault is
|
||||
_;
|
||||
}
|
||||
|
||||
/// @dev Sets the address of the reward vault.
|
||||
/// This can only be called by the owner of this contract.
|
||||
function setStakingPoolRewardVault(address payable rewardVaultAddress)
|
||||
external
|
||||
onlyOwner
|
||||
{
|
||||
rewardVault = IStakingPoolRewardVault(rewardVaultAddress);
|
||||
emit StakingPoolRewardVaultChanged(rewardVaultAddress);
|
||||
}
|
||||
|
||||
/// @dev Decreases the operator share for the given pool (i.e. increases pool rewards for members).
|
||||
/// Note that this is only callable by the pool operator, and will revert if the new operator
|
||||
/// share value is greater than the old value.
|
||||
|
@ -19,6 +19,7 @@
|
||||
pragma solidity ^0.5.9;
|
||||
|
||||
import "@0x/contracts-utils/contracts/src/LibRichErrors.sol";
|
||||
import "@0x/contracts-asset-proxy/contracts/src/interfaces/IAssetProxy.sol";
|
||||
import "../immutable/MixinStorage.sol";
|
||||
import "../interfaces/IStakingEvents.sol";
|
||||
import "../interfaces/IEthVault.sol";
|
||||
|
Loading…
x
Reference in New Issue
Block a user