Import from @0x/utils
This commit is contained in:
parent
89dcbd0229
commit
389d4d10f1
@ -8,14 +8,12 @@ import {
|
||||
import { DevUtilsContract } from '@0x/contracts-dev-utils';
|
||||
import { constants, expect, LogDecoder, orderHashUtils, orderUtils, signingUtils } from '@0x/contracts-test-utils';
|
||||
import { FillResults, Order, SignatureType, SignedOrder } from '@0x/types';
|
||||
import { BigNumber, errorUtils, providerUtils, RevertError, StringRevertError } from '@0x/utils';
|
||||
import { BigNumber, errorUtils, ExchangeRevertErrors, providerUtils, RevertError, StringRevertError } from '@0x/utils';
|
||||
import { SupportedProvider, Web3Wrapper } from '@0x/web3-wrapper';
|
||||
import { LogWithDecodedArgs, TxData } from 'ethereum-types';
|
||||
import * as _ from 'lodash';
|
||||
import 'make-promises-safe';
|
||||
|
||||
import { ExchangeRevertErrors } from '../../src';
|
||||
|
||||
import { artifacts } from '../artifacts';
|
||||
|
||||
import { ExchangeContract, ExchangeFillEventArgs } from '../wrappers';
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { IAssetDataContract } from '@0x/contracts-asset-proxy';
|
||||
import { DummyERC721TokenContract } from '@0x/contracts-erc721';
|
||||
import { ForwarderContract, ForwarderRevertErrors } from '@0x/contracts-exchange-forwarder';
|
||||
import { ForwarderContract } from '@0x/contracts-exchange-forwarder';
|
||||
import {
|
||||
blockchainTests,
|
||||
constants,
|
||||
@ -10,7 +10,7 @@ import {
|
||||
} from '@0x/contracts-test-utils';
|
||||
import { generatePseudoRandomSalt } from '@0x/order-utils';
|
||||
import { SignatureType, SignedOrder } from '@0x/types';
|
||||
import { AbiEncoder, BigNumber } from '@0x/utils';
|
||||
import { AbiEncoder, BigNumber, ExchangeForwarderRevertErrors } from '@0x/utils';
|
||||
|
||||
import { deployEth2DaiBridgeAsync } from '../bridges/deploy_eth2dai_bridge';
|
||||
import { deployUniswapBridgeAsync } from '../bridges/deploy_uniswap_bridge';
|
||||
@ -251,7 +251,7 @@ blockchainTests.resets('Forwarder <> ERC20Bridge integration tests', env => {
|
||||
takerFee: toBaseUnitAmount(0.01),
|
||||
takerFeeAssetData: makerFeeTokenAssetData,
|
||||
};
|
||||
const expectedError = new ForwarderRevertErrors.UnsupportedFeeError(makerFeeTokenAssetData);
|
||||
const expectedError = new ExchangeForwarderRevertErrors.UnsupportedFeeError(makerFeeTokenAssetData);
|
||||
await testFactory.marketSellTestAsync([order], 1.23, { revertError: expectedError });
|
||||
});
|
||||
});
|
||||
@ -301,7 +301,7 @@ blockchainTests.resets('Forwarder <> ERC20Bridge integration tests', env => {
|
||||
await testFactory.marketBuyTestAsync(orders, 2.56, { forwarderFeePercentage: 1 });
|
||||
});
|
||||
it('should revert if the amount of ETH sent is too low to fill the makerAssetAmount (Eth2Dai)', async () => {
|
||||
const expectedError = new ForwarderRevertErrors.CompleteBuyFailedError(
|
||||
const expectedError = new ExchangeForwarderRevertErrors.CompleteBuyFailedError(
|
||||
eth2DaiBridgeOrder.makerAssetAmount.times(0.5),
|
||||
constants.ZERO_AMOUNT,
|
||||
);
|
||||
@ -352,7 +352,7 @@ blockchainTests.resets('Forwarder <> ERC20Bridge integration tests', env => {
|
||||
await testFactory.marketBuyTestAsync(orders, 2.56, { forwarderFeePercentage: 1 });
|
||||
});
|
||||
it('should revert if the amount of ETH sent is too low to fill the makerAssetAmount (Uniswap)', async () => {
|
||||
const expectedError = new ForwarderRevertErrors.CompleteBuyFailedError(
|
||||
const expectedError = new ExchangeForwarderRevertErrors.CompleteBuyFailedError(
|
||||
uniswapBridgeOrder.makerAssetAmount.times(0.5),
|
||||
constants.ZERO_AMOUNT,
|
||||
);
|
||||
@ -370,7 +370,7 @@ blockchainTests.resets('Forwarder <> ERC20Bridge integration tests', env => {
|
||||
takerFee: toBaseUnitAmount(0.01),
|
||||
takerFeeAssetData: makerFeeTokenAssetData,
|
||||
};
|
||||
const expectedError = new ForwarderRevertErrors.UnsupportedFeeError(makerFeeTokenAssetData);
|
||||
const expectedError = new ExchangeForwarderRevertErrors.UnsupportedFeeError(makerFeeTokenAssetData);
|
||||
await testFactory.marketBuyTestAsync([order], 1.23, { revertError: expectedError });
|
||||
});
|
||||
});
|
||||
|
@ -1,9 +1,8 @@
|
||||
import { blockchainTests, expect } from '@0x/contracts-test-utils';
|
||||
import { AuthorizableRevertErrors } from '@0x/contracts-utils';
|
||||
import { StakingRevertErrors } from '@0x/utils';
|
||||
import { LogWithDecodedArgs, TransactionReceiptWithDecodedLogs } from 'ethereum-types';
|
||||
|
||||
import { StakingRevertErrors } from '../../src';
|
||||
|
||||
import { artifacts } from '../artifacts';
|
||||
import {
|
||||
TestExchangeManagerContract,
|
||||
|
@ -7,11 +7,10 @@ import {
|
||||
Numberish,
|
||||
shortZip,
|
||||
} from '@0x/contracts-test-utils';
|
||||
import { BigNumber } from '@0x/utils';
|
||||
import { BigNumber, StakingRevertErrors } from '@0x/utils';
|
||||
import { LogEntry } from 'ethereum-types';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
import { StakingRevertErrors } from '../../src';
|
||||
import { constants as stakingConstants } from '../../src/constants';
|
||||
|
||||
import { artifacts } from '../artifacts';
|
||||
|
@ -1,9 +1,8 @@
|
||||
import { blockchainTests, expect, hexRandom, Numberish } from '@0x/contracts-test-utils';
|
||||
import { BigNumber } from '@0x/utils';
|
||||
import { BigNumber, FixedMathRevertErrors } from '@0x/utils';
|
||||
import { Decimal } from 'decimal.js';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
import { FixedMathRevertErrors } from '../../src';
|
||||
import { assertRoughlyEquals, fromFixed, toDecimal, toFixed } from '../utils/number_utils';
|
||||
|
||||
import { artifacts } from '../artifacts';
|
||||
|
@ -1,8 +1,7 @@
|
||||
import { blockchainTests, constants, expect, verifyEventsFromLogs } from '@0x/contracts-test-utils';
|
||||
import { BigNumber } from '@0x/utils';
|
||||
import { BigNumber, StakingRevertErrors } from '@0x/utils';
|
||||
import { LogWithDecodedArgs } from 'ethereum-types';
|
||||
|
||||
import { StakingRevertErrors } from '../../src';
|
||||
import { constants as stakingConstants } from '../../src/constants';
|
||||
|
||||
import { artifacts } from '../artifacts';
|
||||
|
@ -7,12 +7,10 @@ import {
|
||||
Numberish,
|
||||
randomAddress,
|
||||
} from '@0x/contracts-test-utils';
|
||||
import { BigNumber } from '@0x/utils';
|
||||
import { BigNumber, StakingRevertErrors } from '@0x/utils';
|
||||
import { LogEntry } from 'ethereum-types';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
import { StakingRevertErrors } from '../../src';
|
||||
|
||||
import { artifacts } from '../artifacts';
|
||||
import {
|
||||
IStakingEventsEvents,
|
||||
|
@ -9,10 +9,9 @@ import {
|
||||
Numberish,
|
||||
shortZip,
|
||||
} from '@0x/contracts-test-utils';
|
||||
import { BigNumber } from '@0x/utils';
|
||||
import { BigNumber, StakingRevertErrors } from '@0x/utils';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
import { StakingRevertErrors } from '../../src';
|
||||
import { StakeStatus } from '../../src/types';
|
||||
|
||||
import { artifacts } from '../artifacts';
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { blockchainTests, constants, expect, verifyEventsFromLogs } from '@0x/contracts-test-utils';
|
||||
import { AuthorizableRevertErrors } from '@0x/contracts-utils';
|
||||
import { BigNumber } from '@0x/utils';
|
||||
import { BigNumber, StakingRevertErrors } from '@0x/utils';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
import { artifacts } from '../artifacts';
|
||||
@ -11,7 +11,6 @@ import {
|
||||
TestStakingProxyUnitContract,
|
||||
} from '../wrappers';
|
||||
|
||||
import { StakingRevertErrors } from '../../src';
|
||||
import { constants as stakingConstants } from '../../src/constants';
|
||||
|
||||
blockchainTests.resets('StakingProxy unit tests', env => {
|
||||
|
@ -8,12 +8,10 @@ import {
|
||||
filterLogsToArguments,
|
||||
provider,
|
||||
} from '@0x/contracts-test-utils';
|
||||
import { AuthorizableRevertErrors, SafeMathRevertErrors } from '@0x/contracts-utils';
|
||||
import { RevertReason } from '@0x/types';
|
||||
import { BigNumber } from '@0x/utils';
|
||||
import { AuthorizableRevertErrors, BigNumber, SafeMathRevertErrors, StakingRevertErrors } from '@0x/utils';
|
||||
import { TransactionReceiptWithDecodedLogs } from 'ethereum-types';
|
||||
|
||||
import { StakingRevertErrors } from '../../src';
|
||||
import { constants as stakingConstants } from '../../src/constants';
|
||||
|
||||
import { artifacts } from '../artifacts';
|
||||
|
Loading…
x
Reference in New Issue
Block a user