Remove moved RevertErrors
This commit is contained in:
@@ -8,7 +8,7 @@ export {
|
||||
LibOrderContract,
|
||||
LibZeroExTransactionContract,
|
||||
} from './wrappers';
|
||||
export import LibMathRevertErrors = require('./lib_math_revert_errors');
|
||||
export { LibMathRevertErrors } from '@0x/utils';
|
||||
|
||||
import * as ReferenceFunctionsToExport from './reference_functions';
|
||||
export import ReferenceFunctions = ReferenceFunctionsToExport;
|
||||
|
@@ -1,31 +0,0 @@
|
||||
import { BigNumber, RevertError } from '@0x/utils';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
// tslint:disable:max-classes-per-file
|
||||
|
||||
export class DivisionByZeroError extends RevertError {
|
||||
constructor() {
|
||||
super('DivisionByZeroError', 'DivisionByZeroError()', {});
|
||||
}
|
||||
}
|
||||
|
||||
export class RoundingError extends RevertError {
|
||||
constructor(
|
||||
numerator?: BigNumber | number | string,
|
||||
denominator?: BigNumber | number | string,
|
||||
target?: BigNumber | number | string,
|
||||
) {
|
||||
super('RoundingError', 'RoundingError(uint256 numerator, uint256 denominator, uint256 target)', {
|
||||
numerator,
|
||||
denominator,
|
||||
target,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
const types = [DivisionByZeroError, RoundingError];
|
||||
|
||||
// Register the types we've defined.
|
||||
for (const type of types) {
|
||||
RevertError.registerType(type);
|
||||
}
|
@@ -1,8 +1,6 @@
|
||||
import { ReferenceFunctions } from '@0x/contracts-utils';
|
||||
import { FillResults, Order } from '@0x/types';
|
||||
import { BigNumber } from '@0x/utils';
|
||||
|
||||
import LibMathRevertErrors = require('./lib_math_revert_errors');
|
||||
import { BigNumber, LibMathRevertErrors } from '@0x/utils';
|
||||
|
||||
const { safeAdd, safeSub, safeMul, safeDiv } = ReferenceFunctions;
|
||||
|
||||
|
@@ -9,11 +9,10 @@ import {
|
||||
} from '@0x/contracts-test-utils';
|
||||
import { SafeMathRevertErrors } from '@0x/contracts-utils';
|
||||
import { FillResults, MatchedFillResults, Order } from '@0x/types';
|
||||
import { BigNumber } from '@0x/utils';
|
||||
import { BigNumber, LibMathRevertErrors } from '@0x/utils';
|
||||
import { Web3Wrapper } from '@0x/web3-wrapper';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
import LibMathRevertErrors = require('../src/lib_math_revert_errors');
|
||||
import { addFillResults, calculateFillResults, getPartialAmountFloor } from '../src/reference_functions';
|
||||
|
||||
import { artifacts } from './artifacts';
|
||||
|
@@ -7,9 +7,8 @@ import {
|
||||
uint256Values,
|
||||
} from '@0x/contracts-test-utils';
|
||||
import { SafeMathRevertErrors } from '@0x/contracts-utils';
|
||||
import { BigNumber } from '@0x/utils';
|
||||
import { BigNumber, LibMathRevertErrors } from '@0x/utils';
|
||||
|
||||
import LibMathRevertErrors = require('../src/lib_math_revert_errors');
|
||||
import {
|
||||
getPartialAmountCeil,
|
||||
getPartialAmountFloor,
|
||||
|
@@ -1,9 +1,8 @@
|
||||
import { constants, describe, expect } from '@0x/contracts-test-utils';
|
||||
import { SafeMathRevertErrors } from '@0x/contracts-utils';
|
||||
import { BigNumber } from '@0x/utils';
|
||||
import { BigNumber, LibMathRevertErrors } from '@0x/utils';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
import LibMathRevertErrors = require('../src/lib_math_revert_errors');
|
||||
import {
|
||||
addFillResults,
|
||||
getPartialAmountCeil,
|
||||
|
Reference in New Issue
Block a user