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

@@ -1,13 +1,6 @@
import {
blockchainTests,
constants,
expect,
getRandomInteger,
hexRandom,
randomAddress,
} from '@0x/contracts-test-utils';
import { blockchainTests, constants, expect, getRandomInteger, randomAddress } from '@0x/contracts-test-utils';
import { SafeMathRevertErrors } from '@0x/contracts-utils';
import { BigNumber } from '@0x/utils';
import { BigNumber, hexUtils } from '@0x/utils';
import { artifacts } from '../artifacts';
import { TestMixinStakeBalancesContract } from '../wrappers';
@@ -170,8 +163,8 @@ blockchainTests.resets('MixinStakeBalances unit tests', env => {
describe('getStakeDelegatedToPoolByOwner()', () => {
const staker = randomAddress();
const notStaker = randomAddress();
const poolId = hexRandom();
const notPoolId = hexRandom();
const poolId = hexUtils.random();
const notPoolId = hexUtils.random();
const delegatedBalance = randomStoredBalance();
before(async () => {
@@ -197,8 +190,8 @@ blockchainTests.resets('MixinStakeBalances unit tests', env => {
});
describe('getTotalStakeDelegatedToPool()', () => {
const poolId = hexRandom();
const notPoolId = hexRandom();
const poolId = hexUtils.random();
const notPoolId = hexUtils.random();
const delegatedBalance = randomStoredBalance();
before(async () => {