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,5 +1,5 @@
import { blockchainTests, expect, hexRandom } from '@0x/contracts-test-utils';
import { coerceThrownErrorAsRevertError, StringRevertError } from '@0x/utils';
import { blockchainTests, expect } from '@0x/contracts-test-utils';
import { coerceThrownErrorAsRevertError, hexUtils, StringRevertError } from '@0x/utils';
import { artifacts } from './artifacts';
import { TestLibRichErrorsContract } from './wrappers';
@@ -19,7 +19,7 @@ blockchainTests('LibRichErrors', env => {
describe('_rrevert', () => {
it('should correctly revert the extra bytes', async () => {
const extraBytes = hexRandom(100);
const extraBytes = hexUtils.random(100);
try {
await lib.externalRRevert(extraBytes).callAsync();
} catch (err) {