Remove assetDataUtils everywhere (#2373)

* remove assetDataUtils everywhere

* export IAssetDataContract from @0x/contract-wrappers to allow @0x/instant to decode asset data  synchronously

* export generic function `decodeAssetDataOrThrow` and add ERC20Bridge support

* export `hexUtils` from order-utils instead of contracts-test-utils
This commit is contained in:
Xianny
2019-12-04 13:08:08 -08:00
committed by GitHub
parent b86d19028c
commit fcbcbac889
70 changed files with 1498 additions and 1129 deletions

View File

@@ -3,11 +3,10 @@ import {
constants,
expect,
filterLogsToArguments,
hexRandom,
Numberish,
randomAddress,
} from '@0x/contracts-test-utils';
import { BigNumber, StakingRevertErrors } from '@0x/utils';
import { BigNumber, hexUtils, StakingRevertErrors } from '@0x/utils';
import { LogEntry } from 'ethereum-types';
import * as _ from 'lodash';
@@ -56,7 +55,7 @@ blockchainTests('Protocol Fees unit tests', env => {
async function createTestPoolAsync(opts?: Partial<CreateTestPoolOpts>): Promise<CreateTestPoolOpts> {
const _opts = {
poolId: hexRandom(),
poolId: hexUtils.random(),
operatorStake: getRandomInteger(minimumStake, '100e18'),
membersStake: getRandomInteger(minimumStake, '100e18'),
makers: _.times(2, () => randomAddress()),