Add IStorage interface

This commit is contained in:
Amir Bandeali
2019-09-15 10:16:38 -05:00
parent e9362439c3
commit 2eada9db62
6 changed files with 141 additions and 1 deletions

View File

@@ -23,6 +23,7 @@ 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 "./MixinConstants.sol";
import "../interfaces/IStorage.sol";
import "../interfaces/IZrxVault.sol";
import "../interfaces/IEthVault.sol";
import "../interfaces/IStakingPoolRewardVault.sol";
@@ -32,6 +33,7 @@ import "../libs/LibStakingRichErrors.sol";
// solhint-disable max-states-count, no-empty-blocks
contract MixinStorage is
IStorage,
MixinConstants,
Ownable
{

View File

@@ -0,0 +1,134 @@
/*
Copyright 2019 ZeroEx Intl.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
pragma solidity ^0.5.9;
pragma experimental ABIEncoderV2;
import "@0x/contracts-asset-proxy/contracts/src/interfaces/IAssetProxy.sol";
import "../interfaces/IZrxVault.sol";
import "../interfaces/IEthVault.sol";
import "../interfaces/IStakingPoolRewardVault.sol";
import "../interfaces/IStructs.sol";
contract IStorage {
function wethAssetProxy()
external
view
returns (IAssetProxy);
function stakingContract()
external
view
returns (address);
function readOnlyProxy()
external
view
returns (address);
function readOnlyProxyCallee()
external
view
returns (address);
function nextPoolId()
external
view
returns (bytes32);
function poolJoinedByMakerAddress(address makerAddress)
external
view
returns (IStructs.MakerPoolJoinStatus memory);
function numMakersByPoolId(bytes32 poolId)
external
view
returns (uint256);
function currentEpoch()
external
view
returns (uint256);
function currentEpochStartTimeInSeconds()
external
view
returns (uint256);
function protocolFeesThisEpochByPool(bytes32 poolId)
external
view
returns (uint256);
function activePoolsThisEpoch()
external
view
returns (bytes32[] memory);
function validExchanges(address exchangeAddress)
external
view
returns (bool);
function zrxVault()
external
view
returns (IZrxVault);
function ethVault()
external
view
returns (IEthVault);
function rewardVault()
external
view
returns (IStakingPoolRewardVault);
function epochDurationInSeconds()
external
view
returns (uint256);
function rewardDelegatedStakeWeight()
external
view
returns(uint32);
function minimumPoolStake()
external
view
returns (uint256);
function maximumMakersInPool()
external
returns(uint256);
function cobbDouglasAlphaNumerator()
external
view
returns (uint32);
function cobbDouglasAlphaDenomintor()
external
view
returns (uint32);
}

View File

@@ -37,7 +37,7 @@
},
"config": {
"abis:comment": "This list is auto-generated by contracts-gen. Don't edit manually.",
"abis": "./generated-artifacts/@(EthVault|IEthVault|IStaking|IStakingEvents|IStakingPoolRewardVault|IStakingProxy|IStorageInit|IStructs|IVaultCore|IZrxVault|LibFixedMath|LibFixedMathRichErrors|LibProxy|LibSafeDowncast|LibStakingRichErrors|MixinConstants|MixinCumulativeRewards|MixinDeploymentConstants|MixinExchangeFees|MixinExchangeManager|MixinParams|MixinScheduler|MixinStake|MixinStakeBalances|MixinStakeStorage|MixinStakingPool|MixinStakingPoolRewardVault|MixinStakingPoolRewards|MixinStorage|MixinVaultCore|MixinZrxVault|ReadOnlyProxy|Staking|StakingPoolRewardVault|StakingProxy|TestCobbDouglas|TestCumulativeRewardTracking|TestInitTarget|TestLibFixedMath|TestLibProxy|TestLibProxyReceiver|TestLibSafeDowncast|TestProtocolFees|TestProtocolFeesERC20Proxy|TestStaking|TestStakingProxy|TestStorageLayout|ZrxVault).json"
"abis": "./generated-artifacts/@(EthVault|IEthVault|IStaking|IStakingEvents|IStakingPoolRewardVault|IStakingProxy|IStorage|IStorageInit|IStructs|IVaultCore|IZrxVault|LibFixedMath|LibFixedMathRichErrors|LibProxy|LibSafeDowncast|LibStakingRichErrors|MixinConstants|MixinCumulativeRewards|MixinDeploymentConstants|MixinExchangeFees|MixinExchangeManager|MixinParams|MixinScheduler|MixinStake|MixinStakeBalances|MixinStakeStorage|MixinStakingPool|MixinStakingPoolRewardVault|MixinStakingPoolRewards|MixinStorage|MixinVaultCore|MixinZrxVault|ReadOnlyProxy|Staking|StakingPoolRewardVault|StakingProxy|TestCobbDouglas|TestCumulativeRewardTracking|TestInitTarget|TestLibFixedMath|TestLibProxy|TestLibProxyReceiver|TestLibSafeDowncast|TestProtocolFees|TestProtocolFeesERC20Proxy|TestStaking|TestStakingProxy|TestStorageLayout|ZrxVault).json"
},
"repository": {
"type": "git",

View File

@@ -11,6 +11,7 @@ import * as IStaking from '../generated-artifacts/IStaking.json';
import * as IStakingEvents from '../generated-artifacts/IStakingEvents.json';
import * as IStakingPoolRewardVault from '../generated-artifacts/IStakingPoolRewardVault.json';
import * as IStakingProxy from '../generated-artifacts/IStakingProxy.json';
import * as IStorage from '../generated-artifacts/IStorage.json';
import * as IStorageInit from '../generated-artifacts/IStorageInit.json';
import * as IStructs from '../generated-artifacts/IStructs.json';
import * as IVaultCore from '../generated-artifacts/IVaultCore.json';
@@ -67,6 +68,7 @@ export const artifacts = {
IStakingEvents: IStakingEvents as ContractArtifact,
IStakingPoolRewardVault: IStakingPoolRewardVault as ContractArtifact,
IStakingProxy: IStakingProxy as ContractArtifact,
IStorage: IStorage as ContractArtifact,
IStorageInit: IStorageInit as ContractArtifact,
IStructs: IStructs as ContractArtifact,
IVaultCore: IVaultCore as ContractArtifact,

View File

@@ -9,6 +9,7 @@ export * from '../generated-wrappers/i_staking';
export * from '../generated-wrappers/i_staking_events';
export * from '../generated-wrappers/i_staking_pool_reward_vault';
export * from '../generated-wrappers/i_staking_proxy';
export * from '../generated-wrappers/i_storage';
export * from '../generated-wrappers/i_storage_init';
export * from '../generated-wrappers/i_structs';
export * from '../generated-wrappers/i_vault_core';

View File

@@ -9,6 +9,7 @@
"generated-artifacts/IStakingEvents.json",
"generated-artifacts/IStakingPoolRewardVault.json",
"generated-artifacts/IStakingProxy.json",
"generated-artifacts/IStorage.json",
"generated-artifacts/IStorageInit.json",
"generated-artifacts/IStructs.json",
"generated-artifacts/IVaultCore.json",