Cleanup imports
This commit is contained in:
@@ -25,7 +25,6 @@ import "./libs/LibProxy.sol";
|
||||
contract ReadOnlyProxy is
|
||||
MixinStorage
|
||||
{
|
||||
|
||||
using LibProxy for address;
|
||||
|
||||
// solhint-disable payable-fallback
|
||||
|
@@ -20,32 +20,15 @@ pragma solidity ^0.5.9;
|
||||
pragma experimental ABIEncoderV2;
|
||||
|
||||
import "./interfaces/IStaking.sol";
|
||||
import "./fees/MixinExchangeManager.sol";
|
||||
import "./stake/MixinZrxVault.sol";
|
||||
import "./staking_pools/MixinStakingPoolRewardVault.sol";
|
||||
import "./sys/MixinScheduler.sol";
|
||||
import "./sys/MixinParams.sol";
|
||||
import "./stake/MixinStakeBalances.sol";
|
||||
import "./stake/MixinStake.sol";
|
||||
import "./staking_pools/MixinStakingPool.sol";
|
||||
import "./fees/MixinExchangeFees.sol";
|
||||
import "./staking_pools/MixinStakingPoolRewards.sol";
|
||||
|
||||
|
||||
contract Staking is
|
||||
IStaking,
|
||||
IStakingEvents,
|
||||
MixinConstants,
|
||||
Ownable,
|
||||
MixinStorage,
|
||||
MixinParams,
|
||||
MixinZrxVault,
|
||||
MixinExchangeManager,
|
||||
MixinStakingPoolRewardVault,
|
||||
MixinScheduler,
|
||||
MixinStakeStorage,
|
||||
MixinStakeBalances,
|
||||
MixinStakingPoolRewards,
|
||||
MixinStake,
|
||||
MixinStakingPool,
|
||||
MixinExchangeFees
|
||||
|
@@ -19,23 +19,16 @@
|
||||
pragma solidity ^0.5.9;
|
||||
pragma experimental ABIEncoderV2;
|
||||
|
||||
import "@0x/contracts-utils/contracts/src/Ownable.sol";
|
||||
import "./libs/LibProxy.sol";
|
||||
import "./immutable/MixinStorage.sol";
|
||||
import "./interfaces/IStorageInit.sol";
|
||||
import "./interfaces/IStaking.sol";
|
||||
import "./interfaces/IStakingEvents.sol";
|
||||
import "./interfaces/IStakingProxy.sol";
|
||||
|
||||
|
||||
contract StakingProxy is
|
||||
IStakingEvents,
|
||||
IStakingProxy,
|
||||
MixinConstants,
|
||||
Ownable,
|
||||
MixinStorage
|
||||
{
|
||||
|
||||
using LibProxy for address;
|
||||
|
||||
/// @dev Constructor.
|
||||
|
@@ -24,15 +24,9 @@ import "@0x/contracts-utils/contracts/src/LibRichErrors.sol";
|
||||
import "@0x/contracts-utils/contracts/src/LibSafeMath.sol";
|
||||
import "../libs/LibStakingRichErrors.sol";
|
||||
import "../libs/LibFixedMath.sol";
|
||||
import "../immutable/MixinStorage.sol";
|
||||
import "../immutable/MixinConstants.sol";
|
||||
import "../immutable/MixinDeploymentConstants.sol";
|
||||
import "../interfaces/IStakingEvents.sol";
|
||||
import "../interfaces/IStructs.sol";
|
||||
import "../stake/MixinStakeBalances.sol";
|
||||
import "../sys/MixinScheduler.sol";
|
||||
import "../staking_pools/MixinStakingPool.sol";
|
||||
import "../staking_pools/MixinStakingPoolRewardVault.sol";
|
||||
import "./MixinExchangeManager.sol";
|
||||
|
||||
|
||||
@@ -46,18 +40,8 @@ import "./MixinExchangeManager.sol";
|
||||
/// stake provided by directly by the maker; this is a disincentive for market makers to
|
||||
/// monopolize a single pool that they all delegate to.
|
||||
contract MixinExchangeFees is
|
||||
IStakingEvents,
|
||||
MixinConstants,
|
||||
MixinDeploymentConstants,
|
||||
Ownable,
|
||||
MixinStorage,
|
||||
MixinZrxVault,
|
||||
MixinExchangeManager,
|
||||
MixinStakingPoolRewardVault,
|
||||
MixinScheduler,
|
||||
MixinStakeStorage,
|
||||
MixinStakeBalances,
|
||||
MixinStakingPoolRewards,
|
||||
MixinStakingPool
|
||||
{
|
||||
|
||||
|
@@ -21,7 +21,6 @@ pragma solidity ^0.5.9;
|
||||
import "@0x/contracts-utils/contracts/src/LibRichErrors.sol";
|
||||
import "../libs/LibStakingRichErrors.sol";
|
||||
import "../interfaces/IStakingEvents.sol";
|
||||
import "../immutable/MixinConstants.sol";
|
||||
import "../immutable/MixinStorage.sol";
|
||||
|
||||
|
||||
@@ -31,8 +30,6 @@ import "../immutable/MixinStorage.sol";
|
||||
/// then it should be removed.
|
||||
contract MixinExchangeManager is
|
||||
IStakingEvents,
|
||||
MixinConstants,
|
||||
Ownable,
|
||||
MixinStorage
|
||||
{
|
||||
|
||||
|
@@ -20,33 +20,14 @@ pragma solidity ^0.5.9;
|
||||
pragma experimental ABIEncoderV2;
|
||||
|
||||
import "@0x/contracts-utils/contracts/src/LibSafeMath.sol";
|
||||
import "../immutable/MixinConstants.sol";
|
||||
import "../immutable/MixinStorage.sol";
|
||||
import "../interfaces/IStakingEvents.sol";
|
||||
import "./MixinZrxVault.sol";
|
||||
import "../staking_pools/MixinStakingPoolRewardVault.sol";
|
||||
import "../staking_pools/MixinStakingPoolRewards.sol";
|
||||
import "../sys/MixinScheduler.sol";
|
||||
import "../libs/LibStakingRichErrors.sol";
|
||||
import "./MixinZrxVault.sol";
|
||||
import "./MixinStakeBalances.sol";
|
||||
import "./MixinStakeStorage.sol";
|
||||
|
||||
|
||||
/// @dev This mixin contains logic for managing ZRX tokens and Stake.
|
||||
contract MixinStake is
|
||||
IStakingEvents,
|
||||
MixinConstants,
|
||||
Ownable,
|
||||
MixinStorage,
|
||||
MixinZrxVault,
|
||||
MixinStakingPoolRewardVault,
|
||||
MixinScheduler,
|
||||
MixinStakeStorage,
|
||||
MixinStakeBalances,
|
||||
MixinStakingPoolRewards
|
||||
{
|
||||
|
||||
using LibSafeMath for uint256;
|
||||
|
||||
/// @dev Stake ZRX tokens. Tokens are deposited into the ZRX Vault. Unstake to retrieve the ZRX.
|
||||
|
@@ -21,9 +21,6 @@ pragma experimental ABIEncoderV2;
|
||||
|
||||
import "@0x/contracts-utils/contracts/src/LibSafeMath.sol";
|
||||
import "../interfaces/IStructs.sol";
|
||||
import "../immutable/MixinConstants.sol";
|
||||
import "../immutable/MixinStorage.sol";
|
||||
import "../sys/MixinScheduler.sol";
|
||||
import "./MixinZrxVault.sol";
|
||||
import "./MixinStakeStorage.sol";
|
||||
|
||||
@@ -31,15 +28,9 @@ import "./MixinStakeStorage.sol";
|
||||
/// @dev This mixin contains logic for querying stake balances.
|
||||
/// **** Read MixinStake before continuing ****
|
||||
contract MixinStakeBalances is
|
||||
IStakingEvents,
|
||||
MixinConstants,
|
||||
Ownable,
|
||||
MixinStorage,
|
||||
MixinZrxVault,
|
||||
MixinScheduler,
|
||||
MixinStakeStorage
|
||||
{
|
||||
|
||||
using LibSafeMath for uint256;
|
||||
|
||||
/// @dev Returns the total stake for a given owner.
|
||||
|
@@ -21,21 +21,13 @@ pragma solidity ^0.5.9;
|
||||
import "../libs/LibSafeDowncast.sol";
|
||||
import "@0x/contracts-utils/contracts/src/LibSafeMath.sol";
|
||||
import "../interfaces/IStructs.sol";
|
||||
import "../immutable/MixinConstants.sol";
|
||||
import "../immutable/MixinStorage.sol";
|
||||
import "../sys/MixinScheduler.sol";
|
||||
import "./MixinZrxVault.sol";
|
||||
|
||||
|
||||
/// @dev This mixin contains logic for managing stake storage.
|
||||
contract MixinStakeStorage is
|
||||
IStakingEvents,
|
||||
MixinConstants,
|
||||
Ownable,
|
||||
MixinStorage,
|
||||
MixinScheduler
|
||||
{
|
||||
|
||||
using LibSafeMath for uint256;
|
||||
using LibSafeDowncast for uint256;
|
||||
|
||||
|
@@ -25,11 +25,9 @@ import "../immutable/MixinStorage.sol";
|
||||
/// @dev This mixin contains logic for managing and interfacing with the Zrx Vault.
|
||||
/// (see vaults/ZrxVault.sol).
|
||||
contract MixinZrxVault is
|
||||
MixinConstants,
|
||||
Ownable,
|
||||
IZrxVault,
|
||||
MixinStorage
|
||||
{
|
||||
|
||||
/// @dev Set the Zrx Vault.
|
||||
/// @param zrxVaultAddress Address of the Zrx Vault.
|
||||
function setZrxVault(address zrxVaultAddress)
|
||||
|
@@ -18,17 +18,12 @@
|
||||
|
||||
pragma solidity ^0.5.9;
|
||||
|
||||
import "../interfaces/IStakingEvents.sol";
|
||||
import "../interfaces/IEthVault.sol";
|
||||
import "../immutable/MixinStorage.sol";
|
||||
|
||||
|
||||
/// @dev This mixin contains logic for managing and interfacing with the Eth Vault.
|
||||
/// (see vaults/EthVault.sol).
|
||||
contract MixinEthVault is
|
||||
IStakingEvents,
|
||||
MixinConstants,
|
||||
Ownable,
|
||||
MixinStorage
|
||||
{
|
||||
|
||||
|
@@ -23,9 +23,6 @@ import "@0x/contracts-utils/contracts/src/LibRichErrors.sol";
|
||||
import "@0x/contracts-utils/contracts/src/LibSafeMath.sol";
|
||||
import "../libs/LibStakingRichErrors.sol";
|
||||
import "../interfaces/IStructs.sol";
|
||||
import "../interfaces/IStakingEvents.sol";
|
||||
import "../immutable/MixinConstants.sol";
|
||||
import "../immutable/MixinStorage.sol";
|
||||
import "./MixinStakingPoolRewards.sol";
|
||||
|
||||
|
||||
@@ -53,18 +50,8 @@ import "./MixinStakingPoolRewards.sol";
|
||||
/// 2. Add the addresses that you use to market make on 0x.
|
||||
/// 3. Leverage the staking power of others by convincing them to delegate to your pool.
|
||||
contract MixinStakingPool is
|
||||
IStakingEvents,
|
||||
MixinConstants,
|
||||
Ownable,
|
||||
MixinStorage,
|
||||
MixinZrxVault,
|
||||
MixinStakingPoolRewardVault,
|
||||
MixinScheduler,
|
||||
MixinStakeStorage,
|
||||
MixinStakeBalances,
|
||||
MixinStakingPoolRewards
|
||||
{
|
||||
|
||||
using LibSafeMath for uint256;
|
||||
|
||||
/// @dev Create a new staking pool. The sender will be the operator of this pool.
|
||||
|
@@ -30,8 +30,6 @@ import "../immutable/MixinStorage.sol";
|
||||
/// from within this contract.
|
||||
contract MixinStakingPoolRewardVault is
|
||||
IStakingEvents,
|
||||
MixinConstants,
|
||||
Ownable,
|
||||
MixinStorage
|
||||
{
|
||||
|
||||
|
@@ -21,26 +21,12 @@ pragma experimental ABIEncoderV2;
|
||||
|
||||
import "@0x/contracts-utils/contracts/src/LibFractions.sol";
|
||||
import "@0x/contracts-utils/contracts/src/LibSafeMath.sol";
|
||||
import "../immutable/MixinStorage.sol";
|
||||
import "../immutable/MixinConstants.sol";
|
||||
import "../stake/MixinStakeBalances.sol";
|
||||
import "./MixinStakingPoolRewardVault.sol";
|
||||
import "./MixinCumulativeRewards.sol";
|
||||
|
||||
|
||||
contract MixinStakingPoolRewards is
|
||||
IStakingEvents,
|
||||
MixinConstants,
|
||||
Ownable,
|
||||
MixinStorage,
|
||||
MixinZrxVault,
|
||||
MixinStakingPoolRewardVault,
|
||||
MixinScheduler,
|
||||
MixinStakeStorage,
|
||||
MixinStakeBalances,
|
||||
MixinCumulativeRewards
|
||||
{
|
||||
|
||||
using LibSafeMath for uint256;
|
||||
|
||||
/// @dev Computes the reward balance in ETH of a specific member of a pool.
|
||||
|
@@ -19,8 +19,6 @@
|
||||
pragma solidity ^0.5.9;
|
||||
|
||||
import "@0x/contracts-utils/contracts/src/LibRichErrors.sol";
|
||||
import "@0x/contracts-utils/contracts/src/Ownable.sol";
|
||||
import "../immutable/MixinConstants.sol";
|
||||
import "../immutable/MixinStorage.sol";
|
||||
import "../interfaces/IStakingEvents.sol";
|
||||
import "../libs/LibStakingRichErrors.sol";
|
||||
@@ -28,11 +26,8 @@ import "../libs/LibStakingRichErrors.sol";
|
||||
|
||||
contract MixinParams is
|
||||
IStakingEvents,
|
||||
MixinConstants,
|
||||
Ownable,
|
||||
MixinStorage
|
||||
{
|
||||
|
||||
/// @dev Set all configurable parameters at once.
|
||||
/// @param _epochDurationInSeconds Minimum seconds between epochs.
|
||||
/// @param _rewardDelegatedStakeWeight How much delegated stake is weighted vs operator stake, in ppm.
|
||||
|
@@ -21,9 +21,7 @@ pragma solidity ^0.5.9;
|
||||
import "@0x/contracts-utils/contracts/src/LibRichErrors.sol";
|
||||
import "@0x/contracts-utils/contracts/src/LibSafeMath.sol";
|
||||
import "../libs/LibStakingRichErrors.sol";
|
||||
import "../immutable/MixinConstants.sol";
|
||||
import "../immutable/MixinStorage.sol";
|
||||
import "../interfaces/IStructs.sol";
|
||||
import "../interfaces/IStakingEvents.sol";
|
||||
|
||||
|
||||
@@ -35,11 +33,8 @@ import "../interfaces/IStakingEvents.sol";
|
||||
/// and consistent scheduling metric than time. TimeLocks, for example, are measured in epochs.
|
||||
contract MixinScheduler is
|
||||
IStakingEvents,
|
||||
MixinConstants,
|
||||
Ownable,
|
||||
MixinStorage
|
||||
{
|
||||
|
||||
using LibSafeMath for uint256;
|
||||
|
||||
/// @dev Returns the current epoch.
|
||||
|
@@ -25,12 +25,9 @@ import "./MixinVaultCore.sol";
|
||||
|
||||
/// @dev This vault manages ETH.
|
||||
contract EthVault is
|
||||
Authorizable,
|
||||
IEthVault,
|
||||
IVaultCore,
|
||||
MixinVaultCore
|
||||
{
|
||||
|
||||
using LibSafeMath for uint256;
|
||||
|
||||
// mapping from Owner to ETH balance
|
||||
|
@@ -18,7 +18,7 @@
|
||||
|
||||
pragma solidity ^0.5.9;
|
||||
|
||||
import "@0x/contracts-utils/contracts/src/Authorizable.sol";
|
||||
import "@0x/contracts-utils/contracts/src/Ownable.sol";
|
||||
import "@0x/contracts-utils/contracts/src/LibRichErrors.sol";
|
||||
import "../libs/LibStakingRichErrors.sol";
|
||||
import "../interfaces/IVaultCore.sol";
|
||||
@@ -36,10 +36,9 @@ import "../interfaces/IVaultCore.sol";
|
||||
/// a vault cannot be reset to normal mode; this prevents corruption of related
|
||||
/// status in the staking contract.
|
||||
contract MixinVaultCore is
|
||||
Authorizable,
|
||||
Ownable,
|
||||
IVaultCore
|
||||
{
|
||||
|
||||
// Address of staking contract
|
||||
address payable internal stakingContractAddress;
|
||||
|
||||
|
@@ -40,13 +40,11 @@ import "../immutable/MixinConstants.sol";
|
||||
/// When in Catastrophic Failure Mode, the Staking contract can still
|
||||
/// perform withdrawals on behalf of its users.
|
||||
contract StakingPoolRewardVault is
|
||||
Authorizable,
|
||||
IStakingPoolRewardVault,
|
||||
IVaultCore,
|
||||
MixinConstants,
|
||||
MixinVaultCore
|
||||
{
|
||||
|
||||
using LibSafeMath for uint256;
|
||||
using LibSafeDowncast for uint256;
|
||||
|
||||
|
@@ -34,12 +34,9 @@ import "./MixinVaultCore.sol";
|
||||
/// failure mode, it cannot be returned to normal mode; this prevents
|
||||
/// corruption of related state in the staking contract.
|
||||
contract ZrxVault is
|
||||
Authorizable,
|
||||
IVaultCore,
|
||||
IZrxVault,
|
||||
MixinVaultCore
|
||||
{
|
||||
|
||||
using LibSafeMath for uint256;
|
||||
|
||||
// mapping from Owner to ZRX balance
|
||||
|
Reference in New Issue
Block a user