Introduce publicFacingContracts config in all package.jsons, refactor all imports from src in contracts packages

This commit is contained in:
fabioberger
2019-11-11 15:10:15 +00:00
parent bc1dca3f6f
commit 86b76a3e75
123 changed files with 288 additions and 663 deletions

View File

@@ -37,6 +37,7 @@
"compile:truffle": "truffle compile"
},
"config": {
"publicInterfaceContracts": "IStaking,IStakingEvents,IStakingProxy,IZrxVault,LibStakingRichErrors,Staking,StakingProxy,ZrxVault,TestStaking",
"abis:comment": "This list is auto-generated by contracts-gen. Don't edit manually.",
"abis": "./test/generated-artifacts/@(IStaking|IStakingEvents|IStakingProxy|IStorage|IStorageInit|IStructs|IZrxVault|LibCobbDouglas|LibFixedMath|LibFixedMathRichErrors|LibSafeDowncast|LibStakingRichErrors|MixinAbstract|MixinConstants|MixinCumulativeRewards|MixinDeploymentConstants|MixinExchangeFees|MixinExchangeManager|MixinFinalizer|MixinParams|MixinScheduler|MixinStake|MixinStakeBalances|MixinStakeStorage|MixinStakingPool|MixinStakingPoolRewards|MixinStorage|Staking|StakingProxy|TestAssertStorageParams|TestCobbDouglas|TestCumulativeRewardTracking|TestDelegatorRewards|TestExchangeManager|TestFinalizer|TestInitTarget|TestLibFixedMath|TestLibSafeDowncast|TestMixinCumulativeRewards|TestMixinParams|TestMixinScheduler|TestMixinStake|TestMixinStakeBalances|TestMixinStakeStorage|TestMixinStakingPool|TestMixinStakingPoolRewards|TestProtocolFees|TestProxyDestination|TestStaking|TestStakingNoWETH|TestStakingProxy|TestStakingProxyUnit|TestStorageLayoutAndConstants|ZrxVault).json"
},

View File

@@ -8,110 +8,20 @@ import { ContractArtifact } from 'ethereum-types';
import * as IStaking from '../generated-artifacts/IStaking.json';
import * as IStakingEvents from '../generated-artifacts/IStakingEvents.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 IZrxVault from '../generated-artifacts/IZrxVault.json';
import * as LibCobbDouglas from '../generated-artifacts/LibCobbDouglas.json';
import * as LibFixedMath from '../generated-artifacts/LibFixedMath.json';
import * as LibFixedMathRichErrors from '../generated-artifacts/LibFixedMathRichErrors.json';
import * as LibSafeDowncast from '../generated-artifacts/LibSafeDowncast.json';
import * as LibStakingRichErrors from '../generated-artifacts/LibStakingRichErrors.json';
import * as MixinAbstract from '../generated-artifacts/MixinAbstract.json';
import * as MixinConstants from '../generated-artifacts/MixinConstants.json';
import * as MixinCumulativeRewards from '../generated-artifacts/MixinCumulativeRewards.json';
import * as MixinDeploymentConstants from '../generated-artifacts/MixinDeploymentConstants.json';
import * as MixinExchangeFees from '../generated-artifacts/MixinExchangeFees.json';
import * as MixinExchangeManager from '../generated-artifacts/MixinExchangeManager.json';
import * as MixinFinalizer from '../generated-artifacts/MixinFinalizer.json';
import * as MixinParams from '../generated-artifacts/MixinParams.json';
import * as MixinScheduler from '../generated-artifacts/MixinScheduler.json';
import * as MixinStake from '../generated-artifacts/MixinStake.json';
import * as MixinStakeBalances from '../generated-artifacts/MixinStakeBalances.json';
import * as MixinStakeStorage from '../generated-artifacts/MixinStakeStorage.json';
import * as MixinStakingPool from '../generated-artifacts/MixinStakingPool.json';
import * as MixinStakingPoolRewards from '../generated-artifacts/MixinStakingPoolRewards.json';
import * as MixinStorage from '../generated-artifacts/MixinStorage.json';
import * as Staking from '../generated-artifacts/Staking.json';
import * as StakingProxy from '../generated-artifacts/StakingProxy.json';
import * as TestAssertStorageParams from '../generated-artifacts/TestAssertStorageParams.json';
import * as TestCobbDouglas from '../generated-artifacts/TestCobbDouglas.json';
import * as TestCumulativeRewardTracking from '../generated-artifacts/TestCumulativeRewardTracking.json';
import * as TestDelegatorRewards from '../generated-artifacts/TestDelegatorRewards.json';
import * as TestExchangeManager from '../generated-artifacts/TestExchangeManager.json';
import * as TestFinalizer from '../generated-artifacts/TestFinalizer.json';
import * as TestInitTarget from '../generated-artifacts/TestInitTarget.json';
import * as TestLibFixedMath from '../generated-artifacts/TestLibFixedMath.json';
import * as TestLibSafeDowncast from '../generated-artifacts/TestLibSafeDowncast.json';
import * as TestMixinCumulativeRewards from '../generated-artifacts/TestMixinCumulativeRewards.json';
import * as TestMixinParams from '../generated-artifacts/TestMixinParams.json';
import * as TestMixinScheduler from '../generated-artifacts/TestMixinScheduler.json';
import * as TestMixinStake from '../generated-artifacts/TestMixinStake.json';
import * as TestMixinStakeBalances from '../generated-artifacts/TestMixinStakeBalances.json';
import * as TestMixinStakeStorage from '../generated-artifacts/TestMixinStakeStorage.json';
import * as TestMixinStakingPool from '../generated-artifacts/TestMixinStakingPool.json';
import * as TestMixinStakingPoolRewards from '../generated-artifacts/TestMixinStakingPoolRewards.json';
import * as TestProtocolFees from '../generated-artifacts/TestProtocolFees.json';
import * as TestProxyDestination from '../generated-artifacts/TestProxyDestination.json';
import * as TestStaking from '../generated-artifacts/TestStaking.json';
import * as TestStakingNoWETH from '../generated-artifacts/TestStakingNoWETH.json';
import * as TestStakingProxy from '../generated-artifacts/TestStakingProxy.json';
import * as TestStakingProxyUnit from '../generated-artifacts/TestStakingProxyUnit.json';
import * as TestStorageLayoutAndConstants from '../generated-artifacts/TestStorageLayoutAndConstants.json';
import * as ZrxVault from '../generated-artifacts/ZrxVault.json';
export const artifacts = {
Staking: Staking as ContractArtifact,
StakingProxy: StakingProxy as ContractArtifact,
ZrxVault: ZrxVault as ContractArtifact,
MixinExchangeFees: MixinExchangeFees as ContractArtifact,
MixinExchangeManager: MixinExchangeManager as ContractArtifact,
MixinConstants: MixinConstants as ContractArtifact,
MixinDeploymentConstants: MixinDeploymentConstants as ContractArtifact,
MixinStorage: MixinStorage as ContractArtifact,
IStaking: IStaking as ContractArtifact,
IStakingEvents: IStakingEvents as ContractArtifact,
IStakingProxy: IStakingProxy as ContractArtifact,
IStorage: IStorage as ContractArtifact,
IStorageInit: IStorageInit as ContractArtifact,
IStructs: IStructs as ContractArtifact,
IZrxVault: IZrxVault as ContractArtifact,
LibCobbDouglas: LibCobbDouglas as ContractArtifact,
LibFixedMath: LibFixedMath as ContractArtifact,
LibFixedMathRichErrors: LibFixedMathRichErrors as ContractArtifact,
LibSafeDowncast: LibSafeDowncast as ContractArtifact,
LibStakingRichErrors: LibStakingRichErrors as ContractArtifact,
MixinStake: MixinStake as ContractArtifact,
MixinStakeBalances: MixinStakeBalances as ContractArtifact,
MixinStakeStorage: MixinStakeStorage as ContractArtifact,
MixinCumulativeRewards: MixinCumulativeRewards as ContractArtifact,
MixinStakingPool: MixinStakingPool as ContractArtifact,
MixinStakingPoolRewards: MixinStakingPoolRewards as ContractArtifact,
MixinAbstract: MixinAbstract as ContractArtifact,
MixinFinalizer: MixinFinalizer as ContractArtifact,
MixinParams: MixinParams as ContractArtifact,
MixinScheduler: MixinScheduler as ContractArtifact,
TestAssertStorageParams: TestAssertStorageParams as ContractArtifact,
TestCobbDouglas: TestCobbDouglas as ContractArtifact,
TestCumulativeRewardTracking: TestCumulativeRewardTracking as ContractArtifact,
TestDelegatorRewards: TestDelegatorRewards as ContractArtifact,
TestExchangeManager: TestExchangeManager as ContractArtifact,
TestFinalizer: TestFinalizer as ContractArtifact,
TestInitTarget: TestInitTarget as ContractArtifact,
TestLibFixedMath: TestLibFixedMath as ContractArtifact,
TestLibSafeDowncast: TestLibSafeDowncast as ContractArtifact,
TestMixinCumulativeRewards: TestMixinCumulativeRewards as ContractArtifact,
TestMixinParams: TestMixinParams as ContractArtifact,
TestMixinScheduler: TestMixinScheduler as ContractArtifact,
TestMixinStake: TestMixinStake as ContractArtifact,
TestMixinStakeBalances: TestMixinStakeBalances as ContractArtifact,
TestMixinStakeStorage: TestMixinStakeStorage as ContractArtifact,
TestMixinStakingPool: TestMixinStakingPool as ContractArtifact,
TestMixinStakingPoolRewards: TestMixinStakingPoolRewards as ContractArtifact,
TestProtocolFees: TestProtocolFees as ContractArtifact,
TestProxyDestination: TestProxyDestination as ContractArtifact,
Staking: Staking as ContractArtifact,
StakingProxy: StakingProxy as ContractArtifact,
ZrxVault: ZrxVault as ContractArtifact,
TestStaking: TestStaking as ContractArtifact,
TestStakingNoWETH: TestStakingNoWETH as ContractArtifact,
TestStakingProxy: TestStakingProxy as ContractArtifact,
TestStakingProxyUnit: TestStakingProxyUnit as ContractArtifact,
TestStorageLayoutAndConstants: TestStorageLayoutAndConstants as ContractArtifact,
};

View File

@@ -6,54 +6,9 @@
export * from '../generated-wrappers/i_staking';
export * from '../generated-wrappers/i_staking_events';
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_zrx_vault';
export * from '../generated-wrappers/lib_cobb_douglas';
export * from '../generated-wrappers/lib_fixed_math';
export * from '../generated-wrappers/lib_fixed_math_rich_errors';
export * from '../generated-wrappers/lib_safe_downcast';
export * from '../generated-wrappers/lib_staking_rich_errors';
export * from '../generated-wrappers/mixin_abstract';
export * from '../generated-wrappers/mixin_constants';
export * from '../generated-wrappers/mixin_cumulative_rewards';
export * from '../generated-wrappers/mixin_deployment_constants';
export * from '../generated-wrappers/mixin_exchange_fees';
export * from '../generated-wrappers/mixin_exchange_manager';
export * from '../generated-wrappers/mixin_finalizer';
export * from '../generated-wrappers/mixin_params';
export * from '../generated-wrappers/mixin_scheduler';
export * from '../generated-wrappers/mixin_stake';
export * from '../generated-wrappers/mixin_stake_balances';
export * from '../generated-wrappers/mixin_stake_storage';
export * from '../generated-wrappers/mixin_staking_pool';
export * from '../generated-wrappers/mixin_staking_pool_rewards';
export * from '../generated-wrappers/mixin_storage';
export * from '../generated-wrappers/staking';
export * from '../generated-wrappers/staking_proxy';
export * from '../generated-wrappers/test_assert_storage_params';
export * from '../generated-wrappers/test_cobb_douglas';
export * from '../generated-wrappers/test_cumulative_reward_tracking';
export * from '../generated-wrappers/test_delegator_rewards';
export * from '../generated-wrappers/test_exchange_manager';
export * from '../generated-wrappers/test_finalizer';
export * from '../generated-wrappers/test_init_target';
export * from '../generated-wrappers/test_lib_fixed_math';
export * from '../generated-wrappers/test_lib_safe_downcast';
export * from '../generated-wrappers/test_mixin_cumulative_rewards';
export * from '../generated-wrappers/test_mixin_params';
export * from '../generated-wrappers/test_mixin_scheduler';
export * from '../generated-wrappers/test_mixin_stake';
export * from '../generated-wrappers/test_mixin_stake_balances';
export * from '../generated-wrappers/test_mixin_stake_storage';
export * from '../generated-wrappers/test_mixin_staking_pool';
export * from '../generated-wrappers/test_mixin_staking_pool_rewards';
export * from '../generated-wrappers/test_protocol_fees';
export * from '../generated-wrappers/test_proxy_destination';
export * from '../generated-wrappers/test_staking';
export * from '../generated-wrappers/test_staking_no_w_e_t_h';
export * from '../generated-wrappers/test_staking_proxy';
export * from '../generated-wrappers/test_staking_proxy_unit';
export * from '../generated-wrappers/test_storage_layout_and_constants';
export * from '../generated-wrappers/zrx_vault';

View File

@@ -1,6 +1,6 @@
import { constants, expect, getCodesizeFromArtifact } from '@0x/contracts-test-utils';
import { artifacts } from '../src';
import { artifacts } from './artifacts';
describe('Contract Size Checks', () => {
describe('Staking', () => {

View File

@@ -1,6 +1,7 @@
import { blockchainTests } from '@0x/contracts-test-utils';
import { artifacts, TestStorageLayoutAndConstantsContract } from '../src';
import { artifacts } from './artifacts';
import { TestStorageLayoutAndConstantsContract } from './wrappers';
blockchainTests('Storage Layout and Deployment Constants Regression Tests', env => {
it('Should successfully deploy the staking contract after running the layout and regression test', async () => {

View File

@@ -3,14 +3,15 @@ import { StakingRevertErrors } from '@0x/order-utils';
import { AuthorizableRevertErrors, BigNumber, StringRevertError } from '@0x/utils';
import {
artifacts,
StakingContract,
StakingProxyContract,
TestAssertStorageParamsContract,
TestInitTargetContract,
TestStakingProxyContract,
TestStakingProxyStakingContractAttachedToProxyEventArgs,
} from '../src/';
} from './wrappers';
import { artifacts } from './artifacts';
import { constants as stakingConstants } from './utils/constants';

View File

@@ -12,19 +12,19 @@ import {
import { BigNumber } from '@0x/utils';
import { LogEntry } from 'ethereum-types';
import {
artifacts,
TestDelegatorRewardsContract,
TestDelegatorRewardsEvents,
TestDelegatorRewardsTransferEventArgs,
} from '../../src';
import { artifacts } from '../artifacts';
import {
assertIntegerRoughlyEquals as assertRoughlyEquals,
getRandomInteger,
toBaseUnitAmount,
} from '../utils/number_utils';
import {
TestDelegatorRewardsContract,
TestDelegatorRewardsEvents,
TestDelegatorRewardsTransferEventArgs,
} from '../wrappers';
blockchainTests.resets('Delegator rewards unit tests', env => {
let testContract: TestDelegatorRewardsContract;

View File

@@ -3,12 +3,12 @@ import { StakingRevertErrors } from '@0x/order-utils';
import { AuthorizableRevertErrors } from '@0x/utils';
import { LogWithDecodedArgs, TransactionReceiptWithDecodedLogs } from 'ethereum-types';
import { artifacts } from '../artifacts';
import {
artifacts,
TestExchangeManagerContract,
TestExchangeManagerExchangeAddedEventArgs,
TestExchangeManagerExchangeRemovedEventArgs,
} from '../../src';
} from '../wrappers';
blockchainTests.resets('Exchange Unit Tests', env => {
// Addresses

View File

@@ -12,8 +12,11 @@ import { BigNumber } from '@0x/utils';
import { LogEntry } from 'ethereum-types';
import * as _ from 'lodash';
import { artifacts } from '../artifacts';
import { constants as stakingConstants } from '../utils/constants';
import { assertIntegerRoughlyEquals, getRandomInteger, toBaseUnitAmount } from '../utils/number_utils';
import {
artifacts,
IStakingEventsEpochEndedEventArgs,
IStakingEventsEpochFinalizedEventArgs,
IStakingEventsEvents,
@@ -21,9 +24,7 @@ import {
TestFinalizerContract,
TestFinalizerDepositStakingPoolRewardsEventArgs as DepositStakingPoolRewardsEventArgs,
TestFinalizerEvents,
} from '../../src';
import { constants as stakingConstants } from '../utils/constants';
import { assertIntegerRoughlyEquals, getRandomInteger, toBaseUnitAmount } from '../utils/number_utils';
} from '../wrappers';
blockchainTests.resets('Finalizer unit tests', env => {
const { ZERO_AMOUNT } = constants;

View File

@@ -2,10 +2,11 @@ import { blockchainTests, Numberish } from '@0x/contracts-test-utils';
import { BigNumber } from '@0x/utils';
import * as _ from 'lodash';
import { artifacts, TestCobbDouglasContract } from '../../src/';
import { assertRoughlyEquals, getRandomInteger, getRandomPortion, toDecimal } from '../utils/number_utils';
import { artifacts } from '../artifacts';
import { TestCobbDouglasContract } from '../wrappers';
// tslint:disable: no-unnecessary-type-assertion
blockchainTests('LibCobbDouglas unit tests', env => {
const FUZZ_COUNT = 1024;

View File

@@ -3,10 +3,11 @@ import { BigNumber, FixedMathRevertErrors } from '@0x/utils';
import { Decimal } from 'decimal.js';
import * as _ from 'lodash';
import { artifacts, TestLibFixedMathContract } from '../../src';
import { assertRoughlyEquals, fromFixed, toDecimal, toFixed } from '../utils/number_utils';
import { artifacts } from '../artifacts';
import { TestLibFixedMathContract } from '../wrappers';
blockchainTests('LibFixedMath unit tests', env => {
let testContract: TestLibFixedMathContract;

View File

@@ -1,7 +1,8 @@
import { blockchainTests, expect, Numberish } from '@0x/contracts-test-utils';
import { BigNumber, SafeMathRevertErrors } from '@0x/utils';
import { artifacts, TestLibSafeDowncastContract } from '../../src/';
import { artifacts } from '../artifacts';
import { TestLibSafeDowncastContract } from '../wrappers';
blockchainTests('LibSafeDowncast unit tests', env => {
let testContract: TestLibSafeDowncastContract;

View File

@@ -2,11 +2,12 @@ import { blockchainTests, expect } from '@0x/contracts-test-utils';
import { BigNumber } from '@0x/utils';
import * as _ from 'lodash';
import { artifacts, TestMixinCumulativeRewardsContract } from '../../src';
import { constants as stakingConstants } from '../utils/constants';
import { toBaseUnitAmount } from '../utils/number_utils';
import { artifacts } from '../artifacts';
import { TestMixinCumulativeRewardsContract } from '../wrappers';
blockchainTests.resets('MixinCumulativeRewards unit tests', env => {
const ZERO = new BigNumber(0);
const testRewards = [

View File

@@ -3,14 +3,14 @@ import { StakingRevertErrors } from '@0x/order-utils';
import { BigNumber } from '@0x/utils';
import { LogWithDecodedArgs } from 'ethereum-types';
import { constants as stakingConstants } from '../utils/constants';
import { artifacts } from '../artifacts';
import {
artifacts,
TestMixinSchedulerContract,
TestMixinSchedulerEvents,
TestMixinSchedulerGoToNextEpochTestInfoEventArgs,
} from '../../src';
import { constants as stakingConstants } from '../utils/constants';
} from '../wrappers';
blockchainTests.resets('MixinScheduler unit tests', env => {
let testContract: TestMixinSchedulerContract;

View File

@@ -2,10 +2,11 @@ import { blockchainTests, expect, Numberish } from '@0x/contracts-test-utils';
import { StakingRevertErrors } from '@0x/order-utils';
import { BigNumber } from '@0x/utils';
import { constants } from '../utils/constants';
import { StoredBalance } from '../utils/types';
import { artifacts, TestMixinStakeStorageContract } from '../../src';
import { constants } from '../utils/constants';
import { artifacts } from '../artifacts';
import { TestMixinStakeStorageContract } from '../wrappers';
blockchainTests.resets('MixinStakeStorage unit tests', env => {
let testContract: TestMixinStakeStorageContract;

View File

@@ -16,7 +16,8 @@ import { LogEntry, TransactionReceiptWithDecodedLogs } from 'ethereum-types';
import { StoredBalance } from '../utils/types';
import { artifacts, TestMixinStakingPoolRewardsContract, TestMixinStakingPoolRewardsEvents as Events } from '../../src';
import { artifacts } from '../artifacts';
import { TestMixinStakingPoolRewardsContract, TestMixinStakingPoolRewardsEvents as Events } from '../wrappers';
blockchainTests.resets('MixinStakingPoolRewards unit tests', env => {
let testContract: TestMixinStakingPoolRewardsContract;

View File

@@ -3,7 +3,8 @@ import { AuthorizableRevertErrors, BigNumber } from '@0x/utils';
import { TransactionReceiptWithDecodedLogs } from 'ethereum-types';
import * as _ from 'lodash';
import { artifacts, IStakingEventsParamsSetEventArgs, TestMixinParamsContract } from '../../src/';
import { artifacts } from '../artifacts';
import { IStakingEventsParamsSetEventArgs, TestMixinParamsContract } from '../wrappers';
import { constants as stakingConstants } from '../utils/constants';
import { StakingParams } from '../utils/types';

View File

@@ -12,14 +12,14 @@ import { BigNumber } from '@0x/utils';
import { LogEntry } from 'ethereum-types';
import * as _ from 'lodash';
import { artifacts } from '../artifacts';
import {
artifacts,
IStakingEventsEvents,
IStakingEventsStakingPoolEarnedRewardsInEpochEventArgs,
TestProtocolFeesContract,
TestProtocolFeesERC20ProxyTransferFromEventArgs,
TestProtocolFeesEvents,
} from '../../src';
} from '../wrappers';
import { getRandomInteger } from '../utils/number_utils';

View File

@@ -8,7 +8,9 @@ import {
} from '@0x/contracts-test-utils';
import { BigNumber, SafeMathRevertErrors } from '@0x/utils';
import { artifacts, TestMixinStakeBalancesContract } from '../../src';
import { artifacts } from '../artifacts';
import { TestMixinStakeBalancesContract } from '../wrappers';
import { constants as stakingConstants } from '../utils/constants';
import { StakeStatus, StoredBalance } from '../utils/types';

View File

@@ -15,8 +15,8 @@ import * as _ from 'lodash';
import { StakeStatus } from '../utils/types';
import { artifacts } from '../artifacts';
import {
artifacts,
TestMixinStakeContract,
TestMixinStakeDecreaseCurrentAndNextBalanceEventArgs as DecreaseCurrentAndNextBalanceEventArgs,
TestMixinStakeDecreaseNextBalanceEventArgs as DecreaseNextBalanceEventArgs,
@@ -30,7 +30,7 @@ import {
TestMixinStakeWithdrawAndSyncDelegatorRewardsEventArgs as WithdrawAndSyncDelegatorRewardsEventArgs,
TestMixinStakeZrxVaultDepositFromEventArgs as ZrxVaultDepositFromEventArgs,
TestMixinStakeZrxVaultWithdrawFromEventArgs as ZrxVaultWithdrawFromEventArgs,
} from '../../src';
} from '../wrappers';
blockchainTests.resets('MixinStake unit tests', env => {
let testContract: TestMixinStakeContract;

View File

@@ -12,12 +12,12 @@ import { StakingRevertErrors } from '@0x/order-utils';
import { BigNumber, SafeMathRevertErrors } from '@0x/utils';
import * as _ from 'lodash';
import { artifacts } from '../artifacts';
import {
artifacts,
TestMixinStakingPoolContract,
TestMixinStakingPoolEvents,
TestMixinStakingPoolStakingPoolCreatedEventArgs as StakingPoolCreated,
} from '../../src';
} from '../wrappers';
blockchainTests.resets('MixinStakingPool unit tests', env => {
let testContract: TestMixinStakingPoolContract;

View File

@@ -3,13 +3,13 @@ import { StakingRevertErrors } from '@0x/order-utils';
import { AuthorizableRevertErrors, BigNumber } from '@0x/utils';
import * as _ from 'lodash';
import { artifacts } from '../artifacts';
import {
artifacts,
StakingProxyEvents,
TestProxyDestinationContract,
TestProxyDestinationEvents,
TestStakingProxyUnitContract,
} from '../../src';
} from '../wrappers';
import { constants as stakingConstants } from '../utils/constants';

View File

@@ -15,15 +15,15 @@ import { TransactionReceiptWithDecodedLogs } from 'ethereum-types';
import { constants as stakingConstants } from '../utils/constants';
import { artifacts } from '../artifacts';
import {
artifacts,
ZrxVaultContract,
ZrxVaultDepositEventArgs,
ZrxVaultInCatastrophicFailureModeEventArgs,
ZrxVaultStakingProxySetEventArgs,
ZrxVaultWithdrawEventArgs,
ZrxVaultZrxProxySetEventArgs,
} from '../../src';
} from '../wrappers';
blockchainTests.resets('ZrxVault unit tests', env => {
let accounts: string[];

View File

@@ -6,8 +6,8 @@ import { Web3Wrapper } from '@0x/web3-wrapper';
import { BlockParamLiteral, ContractArtifact, TransactionReceiptWithDecodedLogs } from 'ethereum-types';
import * as _ from 'lodash';
import { artifacts } from '../artifacts';
import {
artifacts,
IStakingEventsEpochEndedEventArgs,
IStakingEventsStakingPoolEarnedRewardsInEpochEventArgs,
StakingProxyContract,
@@ -15,7 +15,7 @@ import {
TestStakingContract,
TestStakingEvents,
ZrxVaultContract,
} from '../../src';
} from '../wrappers';
import { constants as stakingConstants } from './constants';
import { DecodedLogs, EndOfEpochInfo, StakingParams } from './types';

View File

@@ -3,7 +3,8 @@ import { BigNumber } from '@0x/utils';
import { DecodedLogEntry, TransactionReceiptWithDecodedLogs } from 'ethereum-types';
import * as _ from 'lodash';
import { artifacts, TestCumulativeRewardTrackingContract, TestCumulativeRewardTrackingEvents } from '../../src';
import { artifacts } from '../artifacts';
import { TestCumulativeRewardTrackingContract, TestCumulativeRewardTrackingEvents } from '../wrappers';
import { StakingApiWrapper } from './api_wrapper';
import { toBaseUnitAmount } from './number_utils';

View File

@@ -6,56 +6,11 @@
"generated-artifacts/IStaking.json",
"generated-artifacts/IStakingEvents.json",
"generated-artifacts/IStakingProxy.json",
"generated-artifacts/IStorage.json",
"generated-artifacts/IStorageInit.json",
"generated-artifacts/IStructs.json",
"generated-artifacts/IZrxVault.json",
"generated-artifacts/LibCobbDouglas.json",
"generated-artifacts/LibFixedMath.json",
"generated-artifacts/LibFixedMathRichErrors.json",
"generated-artifacts/LibSafeDowncast.json",
"generated-artifacts/LibStakingRichErrors.json",
"generated-artifacts/MixinAbstract.json",
"generated-artifacts/MixinConstants.json",
"generated-artifacts/MixinCumulativeRewards.json",
"generated-artifacts/MixinDeploymentConstants.json",
"generated-artifacts/MixinExchangeFees.json",
"generated-artifacts/MixinExchangeManager.json",
"generated-artifacts/MixinFinalizer.json",
"generated-artifacts/MixinParams.json",
"generated-artifacts/MixinScheduler.json",
"generated-artifacts/MixinStake.json",
"generated-artifacts/MixinStakeBalances.json",
"generated-artifacts/MixinStakeStorage.json",
"generated-artifacts/MixinStakingPool.json",
"generated-artifacts/MixinStakingPoolRewards.json",
"generated-artifacts/MixinStorage.json",
"generated-artifacts/Staking.json",
"generated-artifacts/StakingProxy.json",
"generated-artifacts/TestAssertStorageParams.json",
"generated-artifacts/TestCobbDouglas.json",
"generated-artifacts/TestCumulativeRewardTracking.json",
"generated-artifacts/TestDelegatorRewards.json",
"generated-artifacts/TestExchangeManager.json",
"generated-artifacts/TestFinalizer.json",
"generated-artifacts/TestInitTarget.json",
"generated-artifacts/TestLibFixedMath.json",
"generated-artifacts/TestLibSafeDowncast.json",
"generated-artifacts/TestMixinCumulativeRewards.json",
"generated-artifacts/TestMixinParams.json",
"generated-artifacts/TestMixinScheduler.json",
"generated-artifacts/TestMixinStake.json",
"generated-artifacts/TestMixinStakeBalances.json",
"generated-artifacts/TestMixinStakeStorage.json",
"generated-artifacts/TestMixinStakingPool.json",
"generated-artifacts/TestMixinStakingPoolRewards.json",
"generated-artifacts/TestProtocolFees.json",
"generated-artifacts/TestProxyDestination.json",
"generated-artifacts/TestStaking.json",
"generated-artifacts/TestStakingNoWETH.json",
"generated-artifacts/TestStakingProxy.json",
"generated-artifacts/TestStakingProxyUnit.json",
"generated-artifacts/TestStorageLayoutAndConstants.json",
"generated-artifacts/ZrxVault.json",
"test/generated-artifacts/IStaking.json",
"test/generated-artifacts/IStakingEvents.json",