Refactor contracts-* exports so none in test dir so npmignore works as intended

This commit is contained in:
fabioberger
2019-11-11 21:49:29 +00:00
parent 67e7b5c124
commit 6324a92ec5
64 changed files with 72 additions and 294 deletions

View File

@@ -1,4 +1,4 @@
export * from './wrappers';
export * from './artifacts';
export { constants } from '../test/utils/constants';
export { StakeInfo, StakeStatus } from '../test/utils/types';
export { constants } from './constants';
export { StakeInfo, StakeStatus } from './types';

View File

@@ -12,7 +12,7 @@ import {
OperatorShareByPoolId,
RewardBalanceByPoolId,
RewardByPoolId,
} from '../utils/types';
} from '../../src/types';
import { BaseActor } from './base_actor';

View File

@@ -3,7 +3,7 @@ import { BigNumber, RevertError } from '@0x/utils';
import * as _ from 'lodash';
import { StakingApiWrapper } from '../utils/api_wrapper';
import { StakeBalances, StakeInfo, StakeStatus, StoredBalance } from '../utils/types';
import { StakeBalances, StakeInfo, StakeStatus, StoredBalance } from '../../src/types';
import { BaseActor } from './base_actor';

View File

@@ -3,7 +3,7 @@ import { blockchainTests, expect } from '@0x/contracts-test-utils';
import * as _ from 'lodash';
import { deployAndConfigureContractsAsync, StakingApiWrapper } from './utils/api_wrapper';
import { constants as stakingConstants } from './utils/constants';
import { constants as stakingConstants } from '../src/constants';
// tslint:disable:no-unnecessary-type-assertion
blockchainTests('Epochs', env => {

View File

@@ -13,7 +13,7 @@ import {
import { artifacts } from './artifacts';
import { constants as stakingConstants } from './utils/constants';
import { constants as stakingConstants } from '../src/constants';
blockchainTests('Migration tests', env => {
let authorizedAddress: string;

View File

@@ -6,7 +6,7 @@ import * as _ from 'lodash';
import { MakerActor } from './actors/maker_actor';
import { PoolOperatorActor } from './actors/pool_operator_actor';
import { deployAndConfigureContractsAsync, StakingApiWrapper } from './utils/api_wrapper';
import { constants as stakingConstants } from './utils/constants';
import { constants as stakingConstants } from '../src/constants';
// tslint:disable:no-unnecessary-type-assertion
// tslint:disable:max-file-line-count

View File

@@ -13,7 +13,7 @@ import { LogEntry } from 'ethereum-types';
import * as _ from 'lodash';
import { artifacts } from '../artifacts';
import { constants as stakingConstants } from '../utils/constants';
import { constants as stakingConstants } from '.../src/constants';
import { assertIntegerRoughlyEquals, getRandomInteger, toBaseUnitAmount } from '../utils/number_utils';
import {

View File

@@ -2,7 +2,7 @@ import { blockchainTests, expect } from '@0x/contracts-test-utils';
import { BigNumber } from '@0x/utils';
import * as _ from 'lodash';
import { constants as stakingConstants } from '../utils/constants';
import { constants as stakingConstants } from '.../src/constants';
import { toBaseUnitAmount } from '../utils/number_utils';
import { artifacts } from '../artifacts';

View File

@@ -3,7 +3,7 @@ import { StakingRevertErrors } from '@0x/order-utils';
import { BigNumber } from '@0x/utils';
import { LogWithDecodedArgs } from 'ethereum-types';
import { constants as stakingConstants } from '../utils/constants';
import { constants as stakingConstants } from '.../src/constants';
import { artifacts } from '../artifacts';
import {

View File

@@ -2,8 +2,8 @@ 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 { constants } from '.../src/constants';
import { StoredBalance } from '../../src/types';
import { artifacts } from '../artifacts';
import { TestMixinStakeStorageContract } from '../wrappers';

View File

@@ -14,7 +14,7 @@ import {
import { BigNumber } from '@0x/utils';
import { LogEntry, TransactionReceiptWithDecodedLogs } from 'ethereum-types';
import { StoredBalance } from '../utils/types';
import { StoredBalance } from '../../src/types';
import { artifacts } from '../artifacts';
import { TestMixinStakingPoolRewardsContract, TestMixinStakingPoolRewardsEvents as Events } from '../wrappers';

View File

@@ -6,8 +6,8 @@ import * as _ from 'lodash';
import { artifacts } from '../artifacts';
import { IStakingEventsParamsSetEventArgs, TestMixinParamsContract } from '../wrappers';
import { constants as stakingConstants } from '../utils/constants';
import { StakingParams } from '../utils/types';
import { constants as stakingConstants } from '.../src/constants';
import { StakingParams } from '../../src/types';
blockchainTests('Configurable Parameters unit tests', env => {
let testContract: TestMixinParamsContract;

View File

@@ -11,8 +11,8 @@ import { BigNumber, SafeMathRevertErrors } from '@0x/utils';
import { artifacts } from '../artifacts';
import { TestMixinStakeBalancesContract } from '../wrappers';
import { constants as stakingConstants } from '../utils/constants';
import { StakeStatus, StoredBalance } from '../utils/types';
import { constants as stakingConstants } from '.../src/constants';
import { StakeStatus, StoredBalance } from '../../src/types';
blockchainTests.resets('MixinStakeBalances unit tests', env => {
let testContract: TestMixinStakeBalancesContract;

View File

@@ -13,7 +13,7 @@ import { StakingRevertErrors } from '@0x/order-utils';
import { BigNumber } from '@0x/utils';
import * as _ from 'lodash';
import { StakeStatus } from '../utils/types';
import { StakeStatus } from '../../src/types';
import { artifacts } from '../artifacts';
import {

View File

@@ -11,7 +11,7 @@ import {
TestStakingProxyUnitContract,
} from '../wrappers';
import { constants as stakingConstants } from '../utils/constants';
import { constants as stakingConstants } from '.../src/constants';
blockchainTests.resets('StakingProxy unit tests', env => {
const testString = 'Hello, World!';

View File

@@ -13,7 +13,7 @@ import { RevertReason } from '@0x/types';
import { AuthorizableRevertErrors, BigNumber, SafeMathRevertErrors } from '@0x/utils';
import { TransactionReceiptWithDecodedLogs } from 'ethereum-types';
import { constants as stakingConstants } from '../utils/constants';
import { constants as stakingConstants } from '.../src/constants';
import { artifacts } from '../artifacts';
import {