Introduce publicFacingContracts config in all package.jsons, refactor all imports from src in contracts packages
This commit is contained in:
@@ -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;
|
||||
|
||||
|
@@ -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
|
||||
|
@@ -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;
|
||||
|
@@ -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;
|
||||
|
@@ -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;
|
||||
|
||||
|
@@ -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;
|
||||
|
@@ -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 = [
|
||||
|
@@ -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;
|
||||
|
@@ -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;
|
||||
|
@@ -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;
|
||||
|
@@ -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';
|
||||
|
@@ -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';
|
||||
|
||||
|
@@ -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';
|
||||
|
||||
|
@@ -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;
|
||||
|
@@ -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;
|
||||
|
@@ -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';
|
||||
|
||||
|
@@ -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[];
|
||||
|
Reference in New Issue
Block a user