Remove redundant inheritance and imports
This commit is contained in:
parent
4784131dca
commit
98698f702f
@ -21,28 +21,13 @@ pragma experimental ABIEncoderV2;
|
|||||||
|
|
||||||
import "./interfaces/IStaking.sol";
|
import "./interfaces/IStaking.sol";
|
||||||
import "./sys/MixinParams.sol";
|
import "./sys/MixinParams.sol";
|
||||||
import "./sys/MixinFinalizer.sol";
|
|
||||||
import "./stake/MixinStake.sol";
|
import "./stake/MixinStake.sol";
|
||||||
import "./staking_pools/MixinStakingPool.sol";
|
|
||||||
import "./fees/MixinExchangeFees.sol";
|
import "./fees/MixinExchangeFees.sol";
|
||||||
|
|
||||||
|
|
||||||
contract Staking is
|
contract Staking is
|
||||||
IStaking,
|
IStaking,
|
||||||
IStakingEvents,
|
|
||||||
MixinAbstract,
|
|
||||||
MixinConstants,
|
|
||||||
Ownable,
|
|
||||||
MixinStorage,
|
|
||||||
MixinExchangeManager,
|
|
||||||
MixinScheduler,
|
|
||||||
MixinParams,
|
MixinParams,
|
||||||
MixinStakeStorage,
|
|
||||||
MixinStakeBalances,
|
|
||||||
MixinCumulativeRewards,
|
|
||||||
MixinStakingPoolRewards,
|
|
||||||
MixinFinalizer,
|
|
||||||
MixinStakingPool,
|
|
||||||
MixinStake,
|
MixinStake,
|
||||||
MixinExchangeFees
|
MixinExchangeFees
|
||||||
{
|
{
|
||||||
|
@ -27,8 +27,6 @@ import "./interfaces/IStakingProxy.sol";
|
|||||||
|
|
||||||
contract StakingProxy is
|
contract StakingProxy is
|
||||||
IStakingProxy,
|
IStakingProxy,
|
||||||
MixinConstants,
|
|
||||||
Ownable,
|
|
||||||
MixinStorage
|
MixinStorage
|
||||||
{
|
{
|
||||||
using LibProxy for address;
|
using LibProxy for address;
|
||||||
|
@ -19,33 +19,20 @@
|
|||||||
pragma solidity ^0.5.9;
|
pragma solidity ^0.5.9;
|
||||||
pragma experimental ABIEncoderV2;
|
pragma experimental ABIEncoderV2;
|
||||||
|
|
||||||
import "@0x/contracts-erc20/contracts/src/interfaces/IEtherToken.sol";
|
|
||||||
import "@0x/contracts-exchange-libs/contracts/src/LibMath.sol";
|
import "@0x/contracts-exchange-libs/contracts/src/LibMath.sol";
|
||||||
import "@0x/contracts-utils/contracts/src/LibRichErrors.sol";
|
import "@0x/contracts-utils/contracts/src/LibRichErrors.sol";
|
||||||
import "@0x/contracts-utils/contracts/src/LibSafeMath.sol";
|
import "@0x/contracts-utils/contracts/src/LibSafeMath.sol";
|
||||||
import "../libs/LibStakingRichErrors.sol";
|
import "../libs/LibStakingRichErrors.sol";
|
||||||
import "../libs/LibCobbDouglas.sol";
|
|
||||||
import "../interfaces/IStructs.sol";
|
import "../interfaces/IStructs.sol";
|
||||||
import "../stake/MixinStakeBalances.sol";
|
|
||||||
import "../sys/MixinFinalizer.sol";
|
import "../sys/MixinFinalizer.sol";
|
||||||
import "../staking_pools/MixinStakingPool.sol";
|
import "../staking_pools/MixinStakingPool.sol";
|
||||||
import "./MixinExchangeManager.sol";
|
import "./MixinExchangeManager.sol";
|
||||||
|
|
||||||
|
|
||||||
contract MixinExchangeFees is
|
contract MixinExchangeFees is
|
||||||
IStakingEvents,
|
|
||||||
MixinAbstract,
|
|
||||||
MixinConstants,
|
|
||||||
Ownable,
|
|
||||||
MixinStorage,
|
|
||||||
MixinExchangeManager,
|
MixinExchangeManager,
|
||||||
MixinScheduler,
|
MixinStakingPool,
|
||||||
MixinStakeStorage,
|
MixinFinalizer
|
||||||
MixinStakeBalances,
|
|
||||||
MixinCumulativeRewards,
|
|
||||||
MixinStakingPoolRewards,
|
|
||||||
MixinFinalizer,
|
|
||||||
MixinStakingPool
|
|
||||||
{
|
{
|
||||||
using LibSafeMath for uint256;
|
using LibSafeMath for uint256;
|
||||||
|
|
||||||
|
@ -30,8 +30,6 @@ import "../immutable/MixinStorage.sol";
|
|||||||
/// then it should be removed.
|
/// then it should be removed.
|
||||||
contract MixinExchangeManager is
|
contract MixinExchangeManager is
|
||||||
IStakingEvents,
|
IStakingEvents,
|
||||||
MixinConstants,
|
|
||||||
Ownable,
|
|
||||||
MixinStorage
|
MixinStorage
|
||||||
{
|
{
|
||||||
/// @dev Asserts that the call is coming from a valid exchange.
|
/// @dev Asserts that the call is coming from a valid exchange.
|
||||||
|
@ -20,23 +20,12 @@ pragma solidity ^0.5.9;
|
|||||||
pragma experimental ABIEncoderV2;
|
pragma experimental ABIEncoderV2;
|
||||||
|
|
||||||
import "@0x/contracts-utils/contracts/src/LibSafeMath.sol";
|
import "@0x/contracts-utils/contracts/src/LibSafeMath.sol";
|
||||||
import "../staking_pools/MixinStakingPoolRewards.sol";
|
|
||||||
import "../staking_pools/MixinStakingPool.sol";
|
import "../staking_pools/MixinStakingPool.sol";
|
||||||
import "../libs/LibStakingRichErrors.sol";
|
import "../libs/LibStakingRichErrors.sol";
|
||||||
|
|
||||||
|
|
||||||
/// @dev This mixin contains logic for managing ZRX tokens and Stake.
|
/// @dev This mixin contains logic for managing ZRX tokens and Stake.
|
||||||
contract MixinStake is
|
contract MixinStake is
|
||||||
IStakingEvents,
|
|
||||||
MixinAbstract,
|
|
||||||
MixinConstants,
|
|
||||||
Ownable,
|
|
||||||
MixinStorage,
|
|
||||||
MixinScheduler,
|
|
||||||
MixinStakeStorage,
|
|
||||||
MixinStakeBalances,
|
|
||||||
MixinCumulativeRewards,
|
|
||||||
MixinStakingPoolRewards,
|
|
||||||
MixinStakingPool
|
MixinStakingPool
|
||||||
{
|
{
|
||||||
using LibSafeMath for uint256;
|
using LibSafeMath for uint256;
|
||||||
|
@ -27,11 +27,6 @@ import "./MixinStakeStorage.sol";
|
|||||||
/// @dev This mixin contains logic for querying stake balances.
|
/// @dev This mixin contains logic for querying stake balances.
|
||||||
/// **** Read MixinStake before continuing ****
|
/// **** Read MixinStake before continuing ****
|
||||||
contract MixinStakeBalances is
|
contract MixinStakeBalances is
|
||||||
IStakingEvents,
|
|
||||||
MixinConstants,
|
|
||||||
Ownable,
|
|
||||||
MixinStorage,
|
|
||||||
MixinScheduler,
|
|
||||||
MixinStakeStorage
|
MixinStakeStorage
|
||||||
{
|
{
|
||||||
using LibSafeMath for uint256;
|
using LibSafeMath for uint256;
|
||||||
|
@ -26,10 +26,6 @@ import "../sys/MixinScheduler.sol";
|
|||||||
|
|
||||||
/// @dev This mixin contains logic for managing stake storage.
|
/// @dev This mixin contains logic for managing stake storage.
|
||||||
contract MixinStakeStorage is
|
contract MixinStakeStorage is
|
||||||
IStakingEvents,
|
|
||||||
MixinConstants,
|
|
||||||
Ownable,
|
|
||||||
MixinStorage,
|
|
||||||
MixinScheduler
|
MixinScheduler
|
||||||
{
|
{
|
||||||
using LibSafeMath for uint256;
|
using LibSafeMath for uint256;
|
||||||
|
@ -25,12 +25,6 @@ import "../stake/MixinStakeBalances.sol";
|
|||||||
|
|
||||||
|
|
||||||
contract MixinCumulativeRewards is
|
contract MixinCumulativeRewards is
|
||||||
IStakingEvents,
|
|
||||||
MixinConstants,
|
|
||||||
Ownable,
|
|
||||||
MixinStorage,
|
|
||||||
MixinScheduler,
|
|
||||||
MixinStakeStorage,
|
|
||||||
MixinStakeBalances
|
MixinStakeBalances
|
||||||
{
|
{
|
||||||
using LibSafeMath for uint256;
|
using LibSafeMath for uint256;
|
||||||
|
@ -23,19 +23,12 @@ import "@0x/contracts-utils/contracts/src/LibRichErrors.sol";
|
|||||||
import "@0x/contracts-utils/contracts/src/LibSafeMath.sol";
|
import "@0x/contracts-utils/contracts/src/LibSafeMath.sol";
|
||||||
import "../libs/LibStakingRichErrors.sol";
|
import "../libs/LibStakingRichErrors.sol";
|
||||||
import "../interfaces/IStructs.sol";
|
import "../interfaces/IStructs.sol";
|
||||||
|
import "../sys/MixinAbstract.sol";
|
||||||
import "./MixinStakingPoolRewards.sol";
|
import "./MixinStakingPoolRewards.sol";
|
||||||
|
|
||||||
|
|
||||||
contract MixinStakingPool is
|
contract MixinStakingPool is
|
||||||
IStakingEvents,
|
|
||||||
MixinAbstract,
|
MixinAbstract,
|
||||||
MixinConstants,
|
|
||||||
Ownable,
|
|
||||||
MixinStorage,
|
|
||||||
MixinScheduler,
|
|
||||||
MixinStakeStorage,
|
|
||||||
MixinStakeBalances,
|
|
||||||
MixinCumulativeRewards,
|
|
||||||
MixinStakingPoolRewards
|
MixinStakingPoolRewards
|
||||||
{
|
{
|
||||||
using LibSafeMath for uint256;
|
using LibSafeMath for uint256;
|
||||||
|
@ -27,14 +27,7 @@ import "../sys/MixinAbstract.sol";
|
|||||||
|
|
||||||
|
|
||||||
contract MixinStakingPoolRewards is
|
contract MixinStakingPoolRewards is
|
||||||
IStakingEvents,
|
|
||||||
MixinAbstract,
|
MixinAbstract,
|
||||||
MixinConstants,
|
|
||||||
Ownable,
|
|
||||||
MixinStorage,
|
|
||||||
MixinScheduler,
|
|
||||||
MixinStakeStorage,
|
|
||||||
MixinStakeBalances,
|
|
||||||
MixinCumulativeRewards
|
MixinCumulativeRewards
|
||||||
{
|
{
|
||||||
using LibSafeMath for uint256;
|
using LibSafeMath for uint256;
|
||||||
|
@ -19,8 +19,6 @@
|
|||||||
pragma solidity ^0.5.9;
|
pragma solidity ^0.5.9;
|
||||||
pragma experimental ABIEncoderV2;
|
pragma experimental ABIEncoderV2;
|
||||||
|
|
||||||
import "../interfaces/IStructs.sol";
|
|
||||||
|
|
||||||
|
|
||||||
/// @dev Exposes some internal functions from various contracts to avoid
|
/// @dev Exposes some internal functions from various contracts to avoid
|
||||||
/// cyclical dependencies.
|
/// cyclical dependencies.
|
||||||
|
@ -19,18 +19,12 @@
|
|||||||
pragma solidity ^0.5.9;
|
pragma solidity ^0.5.9;
|
||||||
pragma experimental ABIEncoderV2;
|
pragma experimental ABIEncoderV2;
|
||||||
|
|
||||||
import "@0x/contracts-erc20/contracts/src/interfaces/IEtherToken.sol";
|
|
||||||
import "@0x/contracts-utils/contracts/src/LibRichErrors.sol";
|
import "@0x/contracts-utils/contracts/src/LibRichErrors.sol";
|
||||||
import "@0x/contracts-utils/contracts/src/LibSafeMath.sol";
|
import "@0x/contracts-utils/contracts/src/LibSafeMath.sol";
|
||||||
import "../libs/LibCobbDouglas.sol";
|
import "../libs/LibCobbDouglas.sol";
|
||||||
import "../libs/LibStakingRichErrors.sol";
|
import "../libs/LibStakingRichErrors.sol";
|
||||||
import "../immutable/MixinStorage.sol";
|
|
||||||
import "../immutable/MixinConstants.sol";
|
|
||||||
import "../interfaces/IStakingEvents.sol";
|
|
||||||
import "../interfaces/IStructs.sol";
|
import "../interfaces/IStructs.sol";
|
||||||
import "../stake/MixinStakeBalances.sol";
|
import "../staking_pools/MixinStakingPoolRewards.sol";
|
||||||
import "../staking_pools/MixinStakingPool.sol";
|
|
||||||
import "./MixinScheduler.sol";
|
|
||||||
|
|
||||||
|
|
||||||
/// @dev This mixin contains functions related to finalizing epochs.
|
/// @dev This mixin contains functions related to finalizing epochs.
|
||||||
@ -39,15 +33,6 @@ import "./MixinScheduler.sol";
|
|||||||
/// the contract from stalling while we finalize rewards for the previous
|
/// the contract from stalling while we finalize rewards for the previous
|
||||||
/// epoch.
|
/// epoch.
|
||||||
contract MixinFinalizer is
|
contract MixinFinalizer is
|
||||||
IStakingEvents,
|
|
||||||
MixinAbstract,
|
|
||||||
MixinConstants,
|
|
||||||
Ownable,
|
|
||||||
MixinStorage,
|
|
||||||
MixinScheduler,
|
|
||||||
MixinStakeStorage,
|
|
||||||
MixinStakeBalances,
|
|
||||||
MixinCumulativeRewards,
|
|
||||||
MixinStakingPoolRewards
|
MixinStakingPoolRewards
|
||||||
{
|
{
|
||||||
using LibSafeMath for uint256;
|
using LibSafeMath for uint256;
|
||||||
|
@ -26,8 +26,6 @@ import "../libs/LibStakingRichErrors.sol";
|
|||||||
|
|
||||||
contract MixinParams is
|
contract MixinParams is
|
||||||
IStakingEvents,
|
IStakingEvents,
|
||||||
MixinConstants,
|
|
||||||
Ownable,
|
|
||||||
MixinStorage
|
MixinStorage
|
||||||
{
|
{
|
||||||
/// @dev Set all configurable parameters at once.
|
/// @dev Set all configurable parameters at once.
|
||||||
|
@ -33,8 +33,6 @@ import "../interfaces/IStakingEvents.sol";
|
|||||||
/// and consistent scheduling metric than time. TimeLocks, for example, are measured in epochs.
|
/// and consistent scheduling metric than time. TimeLocks, for example, are measured in epochs.
|
||||||
contract MixinScheduler is
|
contract MixinScheduler is
|
||||||
IStakingEvents,
|
IStakingEvents,
|
||||||
MixinConstants,
|
|
||||||
Ownable,
|
|
||||||
MixinStorage
|
MixinStorage
|
||||||
{
|
{
|
||||||
using LibSafeMath for uint256;
|
using LibSafeMath for uint256;
|
||||||
|
@ -34,7 +34,6 @@ import "./MixinVaultCore.sol";
|
|||||||
/// failure mode, it cannot be returned to normal mode; this prevents
|
/// failure mode, it cannot be returned to normal mode; this prevents
|
||||||
/// corruption of related state in the staking contract.
|
/// corruption of related state in the staking contract.
|
||||||
contract ZrxVault is
|
contract ZrxVault is
|
||||||
IVaultCore,
|
|
||||||
IZrxVault,
|
IZrxVault,
|
||||||
MixinVaultCore
|
MixinVaultCore
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user