aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contract-wrappers
diff options
context:
space:
mode:
Diffstat (limited to 'packages/contract-wrappers')
-rw-r--r--packages/contract-wrappers/CHANGELOG.json14
-rw-r--r--packages/contract-wrappers/package.json14
-rw-r--r--packages/contract-wrappers/src/artifacts.ts2
-rw-r--r--packages/contract-wrappers/src/contract_wrappers/contract_wrapper.ts2
-rw-r--r--packages/contract-wrappers/src/contract_wrappers/erc20_proxy_wrapper.ts7
-rw-r--r--packages/contract-wrappers/src/contract_wrappers/erc20_token_wrapper.ts7
-rw-r--r--packages/contract-wrappers/src/contract_wrappers/erc721_proxy_wrapper.ts7
-rw-r--r--packages/contract-wrappers/src/contract_wrappers/erc721_token_wrapper.ts7
-rw-r--r--packages/contract-wrappers/src/contract_wrappers/ether_token_wrapper.ts7
-rw-r--r--packages/contract-wrappers/src/contract_wrappers/exchange_wrapper.ts16
-rw-r--r--packages/contract-wrappers/src/index.ts43
-rw-r--r--packages/contract-wrappers/src/monorepo_scripts/postpublish.ts8
-rw-r--r--packages/contract-wrappers/src/utils/assert.ts6
-rw-r--r--packages/contract-wrappers/src/utils/transaction_encoder.ts6
-rw-r--r--packages/contract-wrappers/test/calldata_optimization_utils_test.ts2
-rw-r--r--packages/contract-wrappers/test/erc20_wrapper_test.ts3
-rw-r--r--packages/contract-wrappers/test/erc721_wrapper_test.ts2
-rw-r--r--packages/contract-wrappers/test/ether_token_wrapper_test.ts3
-rw-r--r--packages/contract-wrappers/test/exchange_wrapper_test.ts10
-rw-r--r--packages/contract-wrappers/test/forwarder_wrapper_test.ts10
-rw-r--r--packages/contract-wrappers/test/subscription_test.ts3
-rw-r--r--packages/contract-wrappers/test/transaction_encoder_test.ts4
22 files changed, 113 insertions, 70 deletions
diff --git a/packages/contract-wrappers/CHANGELOG.json b/packages/contract-wrappers/CHANGELOG.json
index d50043b0d..645315db8 100644
--- a/packages/contract-wrappers/CHANGELOG.json
+++ b/packages/contract-wrappers/CHANGELOG.json
@@ -3,8 +3,18 @@
"version": "1.0.1-rc.4",
"changes": [
{
- "pr": 975,
- "note": "Added Transaction Encoder for use with 0x Exchange executeTransaction"
+ "note":
+ "Export missing types: `TransactionEncoder`, `EventCallback`, `DecodedLogEvent`, `ContractAbi`, `JSONRPCRequestPayload`, `JSONRPCResponsePayload`, `JSONRPCErrorCallback`, `AbiDefinition`, `LogWithDecodedArgs`, `FunctionAbi`, `EventAbi`, `EventParameter`, `DecodedLogArgs`, `MethodAbi`, `ConstructorAbi`, `FallbackAbi`, `DataItem`, `ConstructorStateMutability`, `StateMutability` & `ExchangeSignatureValidatorApprovalEventArgs`",
+ "pr": 924
+ },
+ {
+ "note":
+ "Remove superfluous exported types: `EventCallback`, `ContractEvent`, `Token`, `OrderFillRequest`, `ContractEventArgs`, `LogEvent`, `DecodedLogEvent`, `OnOrderStateChangeCallback`, `ECSignature`, `OrderStateValid`, `OrderStateInvalid`, `OrderState`, `FilterObject`, `LogWithDecodedArgs`, `TransactionReceipt` & `TransactionReceiptWithDecodedLogs`",
+ "pr": 924
+ },
+ {
+ "note": "Added Transaction Encoder for use with 0x Exchange executeTransaction",
+ "pr": 975
}
]
},
diff --git a/packages/contract-wrappers/package.json b/packages/contract-wrappers/package.json
index 1dc55020a..f8477e878 100644
--- a/packages/contract-wrappers/package.json
+++ b/packages/contract-wrappers/package.json
@@ -12,7 +12,7 @@
"types": "lib/src/index.d.ts",
"scripts": {
"watch_without_deps": "yarn pre_build && tsc -w",
- "build": "yarn pre_build && tsc && copyfiles -u 3 './lib/src/monorepo_scripts/**/*' ./scripts",
+ "build": "yarn pre_build && tsc",
"pre_build": "run-s update_artifacts_v2_beta update_artifacts_v2 generate_contract_wrappers copy_artifacts",
"generate_contract_wrappers": "abi-gen --abis 'src/artifacts/@(Exchange|DummyERC20Token|DummyERC721Token|ZRXToken|ERC20Token|ERC721Token|WETH9|ERC20Proxy|ERC721Proxy|Forwarder).json' --template ../contract_templates/contract.handlebars --partials '../contract_templates/partials/**/*.handlebars' --output src/contract_wrappers/generated --backend ethers",
"lint": "tslint --project . --exclude **/src/contract_wrappers/**/* --exclude **/lib/**/*",
@@ -24,13 +24,16 @@
"update_artifacts_v2_beta": "for i in ${npm_package_config_contracts_v2_beta}; do copyfiles -u 4 ../migrations/artifacts/2.0.0-beta-testnet/$i.json src/artifacts; done;",
"update_artifacts_v2": "for i in ${npm_package_config_contracts_v2}; do copyfiles -u 4 ../migrations/artifacts/2.0.0/$i.json src/artifacts; done;",
"copy_artifacts": "copyfiles -u 2 './src/artifacts/**/*.json' ./lib/src/artifacts",
- "clean": "shx rm -rf _bundles lib test_temp scripts test/artifacts src/contract_wrappers/generated src/artifacts",
+ "clean": "shx rm -rf _bundles lib test_temp test/artifacts src/contract_wrappers/generated src/artifacts generated_docs",
"run_mocha": "mocha --require source-map-support/register --require make-promises-safe lib/test/**/*_test.js lib/test/global_hooks.js --timeout 10000 --bail --exit",
- "manual:postpublish": "yarn build; node ./scripts/postpublish.js"
+ "docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --json $JSON_FILE_PATH $PROJECT_FILES"
},
"config": {
"contracts_v2_beta": "AssetProxyOwner Exchange ERC20Proxy ERC20Token ERC721Proxy ERC721Token WETH9 ZRXToken Forwarder OrderValidator",
- "contracts_v2": "DummyERC20Token DummyERC721Token"
+ "contracts_v2": "DummyERC20Token DummyERC721Token",
+ "postpublish": {
+ "assets": []
+ }
},
"repository": {
"type": "git",
@@ -44,8 +47,6 @@
"@0xproject/abi-gen": "^1.0.5",
"@0xproject/dev-utils": "^1.0.4",
"@0xproject/migrations": "^1.0.4",
- "@0xproject/monorepo-scripts": "^1.0.5",
- "@0xproject/sol-compiler": "^1.0.5",
"@0xproject/subproviders": "^1.0.5",
"@0xproject/tslint-config": "^1.0.5",
"@types/lodash": "4.14.104",
@@ -68,6 +69,7 @@
"sinon": "^4.0.0",
"source-map-support": "^0.5.0",
"tslint": "5.11.0",
+ "typedoc": "0xProject/typedoc",
"typescript": "3.0.1",
"web3-provider-engine": "14.0.6"
},
diff --git a/packages/contract-wrappers/src/artifacts.ts b/packages/contract-wrappers/src/artifacts.ts
index 2481b311a..7e67544d2 100644
--- a/packages/contract-wrappers/src/artifacts.ts
+++ b/packages/contract-wrappers/src/artifacts.ts
@@ -1,4 +1,4 @@
-import { ContractArtifact } from '@0xproject/sol-compiler';
+import { ContractArtifact } from 'ethereum-types';
import * as DummyERC20Token from './artifacts/DummyERC20Token.json';
import * as DummyERC721Token from './artifacts/DummyERC721Token.json';
diff --git a/packages/contract-wrappers/src/contract_wrappers/contract_wrapper.ts b/packages/contract-wrappers/src/contract_wrappers/contract_wrapper.ts
index daf70253a..490a6c50a 100644
--- a/packages/contract-wrappers/src/contract_wrappers/contract_wrapper.ts
+++ b/packages/contract-wrappers/src/contract_wrappers/contract_wrapper.ts
@@ -1,6 +1,6 @@
-import { ContractArtifact } from '@0xproject/sol-compiler';
import { AbiDecoder, intervalUtils, logUtils } from '@0xproject/utils';
import { Web3Wrapper } from '@0xproject/web3-wrapper';
+import { ContractArtifact } from 'ethereum-types';
import { BlockParamLiteral, ContractAbi, FilterObject, LogEntry, LogWithDecodedArgs, RawLog } from 'ethereum-types';
import { Block, BlockAndLogStreamer, Log } from 'ethereumjs-blockstream';
import * as _ from 'lodash';
diff --git a/packages/contract-wrappers/src/contract_wrappers/erc20_proxy_wrapper.ts b/packages/contract-wrappers/src/contract_wrappers/erc20_proxy_wrapper.ts
index 821d1a8a2..ff027d78a 100644
--- a/packages/contract-wrappers/src/contract_wrappers/erc20_proxy_wrapper.ts
+++ b/packages/contract-wrappers/src/contract_wrappers/erc20_proxy_wrapper.ts
@@ -16,6 +16,13 @@ export class ERC20ProxyWrapper extends ContractWrapper {
public abi: ContractAbi = artifacts.ERC20Proxy.compilerOutput.abi;
private _erc20ProxyContractIfExists?: ERC20ProxyContract;
private _contractAddressIfExists?: string;
+ /**
+ * Instantiate ERC20ProxyWrapper
+ * @param web3Wrapper Web3Wrapper instance to use
+ * @param networkId Desired networkId
+ * @param contractAddressIfExists The contract address to use. This is usually pulled from
+ * the artifacts but needs to be specified when using with your own custom testnet.
+ */
constructor(web3Wrapper: Web3Wrapper, networkId: number, contractAddressIfExists?: string) {
super(web3Wrapper, networkId);
this._contractAddressIfExists = contractAddressIfExists;
diff --git a/packages/contract-wrappers/src/contract_wrappers/erc20_token_wrapper.ts b/packages/contract-wrappers/src/contract_wrappers/erc20_token_wrapper.ts
index 17bda5085..4625cef6a 100644
--- a/packages/contract-wrappers/src/contract_wrappers/erc20_token_wrapper.ts
+++ b/packages/contract-wrappers/src/contract_wrappers/erc20_token_wrapper.ts
@@ -34,6 +34,13 @@ export class ERC20TokenWrapper extends ContractWrapper {
public UNLIMITED_ALLOWANCE_IN_BASE_UNITS = constants.UNLIMITED_ALLOWANCE_IN_BASE_UNITS;
private _tokenContractsByAddress: { [address: string]: ERC20TokenContract };
private _erc20ProxyWrapper: ERC20ProxyWrapper;
+ /**
+ * Instantiate ERC20TokenWrapper
+ * @param web3Wrapper Web3Wrapper instance to use
+ * @param networkId Desired networkId
+ * @param erc20ProxyWrapper The ERC20ProxyWrapper instance to use
+ * @param blockPollingIntervalMs The block polling interval to use for active subscriptions
+ */
constructor(
web3Wrapper: Web3Wrapper,
networkId: number,
diff --git a/packages/contract-wrappers/src/contract_wrappers/erc721_proxy_wrapper.ts b/packages/contract-wrappers/src/contract_wrappers/erc721_proxy_wrapper.ts
index 38ecd4687..933c1dc27 100644
--- a/packages/contract-wrappers/src/contract_wrappers/erc721_proxy_wrapper.ts
+++ b/packages/contract-wrappers/src/contract_wrappers/erc721_proxy_wrapper.ts
@@ -16,6 +16,13 @@ export class ERC721ProxyWrapper extends ContractWrapper {
public abi: ContractAbi = artifacts.ERC20Proxy.compilerOutput.abi;
private _erc721ProxyContractIfExists?: ERC721ProxyContract;
private _contractAddressIfExists?: string;
+ /**
+ * Instantiate ERC721ProxyWrapper
+ * @param web3Wrapper Web3Wrapper instance to use
+ * @param networkId Desired networkId
+ * @param contractAddressIfExists The contract address to use. This is usually pulled from
+ * the artifacts but needs to be specified when using with your own custom testnet.
+ */
constructor(web3Wrapper: Web3Wrapper, networkId: number, contractAddressIfExists?: string) {
super(web3Wrapper, networkId);
this._contractAddressIfExists = contractAddressIfExists;
diff --git a/packages/contract-wrappers/src/contract_wrappers/erc721_token_wrapper.ts b/packages/contract-wrappers/src/contract_wrappers/erc721_token_wrapper.ts
index 7231e0bde..590dbbf74 100644
--- a/packages/contract-wrappers/src/contract_wrappers/erc721_token_wrapper.ts
+++ b/packages/contract-wrappers/src/contract_wrappers/erc721_token_wrapper.ts
@@ -33,6 +33,13 @@ export class ERC721TokenWrapper extends ContractWrapper {
public abi: ContractAbi = artifacts.ERC721Token.compilerOutput.abi;
private _tokenContractsByAddress: { [address: string]: ERC721TokenContract };
private _erc721ProxyWrapper: ERC721ProxyWrapper;
+ /**
+ * Instantiate ERC721TokenWrapper
+ * @param web3Wrapper Web3Wrapper instance to use
+ * @param networkId Desired networkId
+ * @param erc721ProxyWrapper The ERC721ProxyWrapper instance to use
+ * @param blockPollingIntervalMs The block polling interval to use for active subscriptions
+ */
constructor(
web3Wrapper: Web3Wrapper,
networkId: number,
diff --git a/packages/contract-wrappers/src/contract_wrappers/ether_token_wrapper.ts b/packages/contract-wrappers/src/contract_wrappers/ether_token_wrapper.ts
index 5046d3667..1ac01812e 100644
--- a/packages/contract-wrappers/src/contract_wrappers/ether_token_wrapper.ts
+++ b/packages/contract-wrappers/src/contract_wrappers/ether_token_wrapper.ts
@@ -24,6 +24,13 @@ export class EtherTokenWrapper extends ContractWrapper {
[address: string]: WETH9Contract;
} = {};
private _erc20TokenWrapper: ERC20TokenWrapper;
+ /**
+ * Instantiate EtherTokenWrapper.
+ * @param web3Wrapper Web3Wrapper instance to use
+ * @param networkId Desired networkId
+ * @param erc20TokenWrapper The ERC20TokenWrapper instance to use
+ * @param blockPollingIntervalMs The block polling interval to use for active subscriptions
+ */
constructor(
web3Wrapper: Web3Wrapper,
networkId: number,
diff --git a/packages/contract-wrappers/src/contract_wrappers/exchange_wrapper.ts b/packages/contract-wrappers/src/contract_wrappers/exchange_wrapper.ts
index 5a4b40547..7b1663daa 100644
--- a/packages/contract-wrappers/src/contract_wrappers/exchange_wrapper.ts
+++ b/packages/contract-wrappers/src/contract_wrappers/exchange_wrapper.ts
@@ -35,6 +35,16 @@ export class ExchangeWrapper extends ContractWrapper {
private _exchangeContractIfExists?: ExchangeContract;
private _contractAddressIfExists?: string;
private _zrxContractAddressIfExists?: string;
+ /**
+ * Instantiate ExchangeWrapper
+ * @param web3Wrapper Web3Wrapper instance to use
+ * @param networkId Desired networkId
+ * @param contractAddressIfExists The exchange contract address to use. This is usually pulled from
+ * the artifacts but needs to be specified when using with your own custom testnet.
+ * @param zrxContractAddressIfExists The ZRXToken contract address to use. This is usually pulled from
+ * the artifacts but needs to be specified when using with your own custom testnet.
+ * @param blockPollingIntervalMs The block polling interval to use for active subscriptions
+ */
constructor(
web3Wrapper: Web3Wrapper,
networkId: number,
@@ -627,7 +637,7 @@ export class ExchangeWrapper extends ContractWrapper {
}
/**
* Batch version of cancelOrderAsync. Executes multiple cancels atomically in a single transaction.
- * @param orders An array of orders to cancel.
+ * @param orders An array of orders to cancel.Optional arguments this method accepts.
* @param orderTransactionOpts Optional arguments this method accepts.
* @return Transaction hash.
*/
@@ -666,6 +676,7 @@ export class ExchangeWrapper extends ContractWrapper {
* @param leftSignedOrder First order to match.
* @param rightSignedOrder Second order to match.
* @param takerAddress The address that sends the transaction and gets the spread.
+ * @param orderTransactionOpts Optional arguments this method accepts.
* @return Transaction hash.
*/
@decorators.asyncZeroExErrorHandler
@@ -724,6 +735,7 @@ export class ExchangeWrapper extends ContractWrapper {
* @param signerAddress Address that should have signed the given hash.
* @param signature Proof that the hash has been signed by signer.
* @param senderAddress Address that should send the transaction.
+ * @param orderTransactionOpts Optional arguments this method accepts.
* @returns Transaction hash.
*/
@decorators.asyncZeroExErrorHandler
@@ -902,7 +914,7 @@ export class ExchangeWrapper extends ContractWrapper {
/**
* Cancel a given order.
* @param order An object that conforms to the Order or SignedOrder interface. The order you would like to cancel.
- * @param transactionOpts Optional arguments this method accepts.
+ * @param orderTransactionOpts Optional arguments this method accepts.
* @return Transaction hash.
*/
@decorators.asyncZeroExErrorHandler
diff --git a/packages/contract-wrappers/src/index.ts b/packages/contract-wrappers/src/index.ts
index 1986e0004..5e691fc21 100644
--- a/packages/contract-wrappers/src/index.ts
+++ b/packages/contract-wrappers/src/index.ts
@@ -7,45 +7,45 @@ export { ERC20ProxyWrapper } from './contract_wrappers/erc20_proxy_wrapper';
export { ERC721ProxyWrapper } from './contract_wrappers/erc721_proxy_wrapper';
export { ForwarderWrapper } from './contract_wrappers/forwarder_wrapper';
+export { TransactionEncoder } from './utils/transaction_encoder';
+
export {
ContractWrappersError,
- EventCallback,
- ContractEvent,
- Token,
IndexedFilterValues,
BlockRange,
- OrderFillRequest,
- ContractEventArgs,
ContractWrappersConfig,
MethodOpts,
OrderTransactionOpts,
TransactionOpts,
- LogEvent,
- DecodedLogEvent,
- OnOrderStateChangeCallback,
OrderStatus,
OrderInfo,
+ EventCallback,
+ DecodedLogEvent,
} from './types';
-export {
- Order,
- SignedOrder,
- ECSignature,
- OrderStateValid,
- OrderStateInvalid,
- OrderState,
- AssetProxyId,
-} from '@0xproject/types';
+export { Order, SignedOrder, AssetProxyId } from '@0xproject/types';
export {
BlockParamLiteral,
- FilterObject,
BlockParam,
ContractEventArg,
- LogWithDecodedArgs,
Provider,
- TransactionReceipt,
- TransactionReceiptWithDecodedLogs,
+ ContractAbi,
+ JSONRPCRequestPayload,
+ JSONRPCResponsePayload,
+ JSONRPCErrorCallback,
+ AbiDefinition,
+ LogWithDecodedArgs,
+ FunctionAbi,
+ EventAbi,
+ EventParameter,
+ DecodedLogArgs,
+ MethodAbi,
+ ConstructorAbi,
+ FallbackAbi,
+ DataItem,
+ ConstructorStateMutability,
+ StateMutability,
} from 'ethereum-types';
export {
@@ -75,6 +75,7 @@ export {
export {
ExchangeCancelUpToEventArgs,
ExchangeAssetProxyRegisteredEventArgs,
+ ExchangeSignatureValidatorApprovalEventArgs,
ExchangeFillEventArgs,
ExchangeCancelEventArgs,
ExchangeEventArgs,
diff --git a/packages/contract-wrappers/src/monorepo_scripts/postpublish.ts b/packages/contract-wrappers/src/monorepo_scripts/postpublish.ts
deleted file mode 100644
index dcb99d0f7..000000000
--- a/packages/contract-wrappers/src/monorepo_scripts/postpublish.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-import { postpublishUtils } from '@0xproject/monorepo-scripts';
-
-import * as packageJSON from '../package.json';
-import * as tsConfigJSON from '../tsconfig.json';
-
-const cwd = `${__dirname}/..`;
-// tslint:disable-next-line:no-floating-promises
-postpublishUtils.runAsync(packageJSON, tsConfigJSON, cwd);
diff --git a/packages/contract-wrappers/src/utils/assert.ts b/packages/contract-wrappers/src/utils/assert.ts
index 183642170..bed833b8f 100644
--- a/packages/contract-wrappers/src/utils/assert.ts
+++ b/packages/contract-wrappers/src/utils/assert.ts
@@ -1,8 +1,8 @@
import { assert as sharedAssert } from '@0xproject/assert';
// HACK: We need those two unused imports because they're actually used by sharedAssert which gets injected here
import { Schema } from '@0xproject/json-schemas'; // tslint:disable-line:no-unused-variable
-import { assetDataUtils, isValidSignatureAsync } from '@0xproject/order-utils';
-import { ECSignature, Order } from '@0xproject/types'; // tslint:disable-line:no-unused-variable
+import { signatureUtils, assetDataUtils } from '@0xproject/order-utils';
+import { Order } from '@0xproject/types'; // tslint:disable-line:no-unused-variable
import { BigNumber } from '@0xproject/utils'; // tslint:disable-line:no-unused-variable
import { Web3Wrapper } from '@0xproject/web3-wrapper';
import { Provider } from 'ethereum-types';
@@ -18,7 +18,7 @@ export const assert = {
signature: string,
signerAddress: string,
): Promise<void> {
- const isValid = await isValidSignatureAsync(provider, orderHash, signature, signerAddress);
+ const isValid = await signatureUtils.isValidSignatureAsync(provider, orderHash, signature, signerAddress);
sharedAssert.assert(isValid, `Expected order with hash '${orderHash}' to have a valid signature`);
},
isValidSubscriptionToken(variableName: string, subscriptionToken: string): void {
diff --git a/packages/contract-wrappers/src/utils/transaction_encoder.ts b/packages/contract-wrappers/src/utils/transaction_encoder.ts
index 5c2a94b74..8821079dc 100644
--- a/packages/contract-wrappers/src/utils/transaction_encoder.ts
+++ b/packages/contract-wrappers/src/utils/transaction_encoder.ts
@@ -1,5 +1,5 @@
import { schemas } from '@0xproject/json-schemas';
-import { EIP712Schema, EIP712Types, EIP712Utils } from '@0xproject/order-utils';
+import { EIP712Schema, EIP712Types, eip712Utils } from '@0xproject/order-utils';
import { Order, SignedOrder } from '@0xproject/types';
import { BigNumber } from '@0xproject/utils';
import _ = require('lodash');
@@ -41,11 +41,11 @@ export class TransactionEncoder {
signerAddress,
data,
};
- const executeTransactionHashBuff = EIP712Utils.structHash(
+ const executeTransactionHashBuff = eip712Utils.structHash(
EIP712_ZEROEX_TRANSACTION_SCHEMA,
executeTransactionData,
);
- const eip721MessageBuffer = EIP712Utils.createEIP712Message(executeTransactionHashBuff, exchangeAddress);
+ const eip721MessageBuffer = eip712Utils.createEIP712Message(executeTransactionHashBuff, exchangeAddress);
const messageHex = `0x${eip721MessageBuffer.toString('hex')}`;
return messageHex;
}
diff --git a/packages/contract-wrappers/test/calldata_optimization_utils_test.ts b/packages/contract-wrappers/test/calldata_optimization_utils_test.ts
index a4cea772f..a3abb8503 100644
--- a/packages/contract-wrappers/test/calldata_optimization_utils_test.ts
+++ b/packages/contract-wrappers/test/calldata_optimization_utils_test.ts
@@ -1,4 +1,4 @@
-import { orderFactory } from '@0xproject/order-utils';
+import { orderFactory } from '@0xproject/order-utils/lib/src/order_factory';
import * as chai from 'chai';
import * as _ from 'lodash';
import 'mocha';
diff --git a/packages/contract-wrappers/test/erc20_wrapper_test.ts b/packages/contract-wrappers/test/erc20_wrapper_test.ts
index cf7ac527e..fde587dec 100644
--- a/packages/contract-wrappers/test/erc20_wrapper_test.ts
+++ b/packages/contract-wrappers/test/erc20_wrapper_test.ts
@@ -11,12 +11,13 @@ import {
BlockRange,
ContractWrappers,
ContractWrappersError,
- DecodedLogEvent,
ERC20TokenApprovalEventArgs,
ERC20TokenEvents,
ERC20TokenTransferEventArgs,
} from '../src';
+import { DecodedLogEvent } from '../src/types';
+
import { chaiSetup } from './utils/chai_setup';
import { constants } from './utils/constants';
import { tokenUtils } from './utils/token_utils';
diff --git a/packages/contract-wrappers/test/erc721_wrapper_test.ts b/packages/contract-wrappers/test/erc721_wrapper_test.ts
index f005ac2e0..ab6ff0984 100644
--- a/packages/contract-wrappers/test/erc721_wrapper_test.ts
+++ b/packages/contract-wrappers/test/erc721_wrapper_test.ts
@@ -11,12 +11,12 @@ import {
BlockRange,
ContractWrappers,
ContractWrappersError,
- DecodedLogEvent,
ERC721TokenApprovalEventArgs,
ERC721TokenApprovalForAllEventArgs,
ERC721TokenEvents,
ERC721TokenTransferEventArgs,
} from '../src';
+import { DecodedLogEvent } from '../src/types';
import { chaiSetup } from './utils/chai_setup';
import { constants } from './utils/constants';
diff --git a/packages/contract-wrappers/test/ether_token_wrapper_test.ts b/packages/contract-wrappers/test/ether_token_wrapper_test.ts
index 48bd6d3f6..c15b8c016 100644
--- a/packages/contract-wrappers/test/ether_token_wrapper_test.ts
+++ b/packages/contract-wrappers/test/ether_token_wrapper_test.ts
@@ -10,7 +10,6 @@ import {
BlockRange,
ContractWrappers,
ContractWrappersError,
- DecodedLogEvent,
WETH9ApprovalEventArgs,
WETH9DepositEventArgs,
WETH9Events,
@@ -18,6 +17,8 @@ import {
WETH9WithdrawalEventArgs,
} from '../src';
+import { DecodedLogEvent } from '../src/types';
+
import { chaiSetup } from './utils/chai_setup';
import { constants } from './utils/constants';
import { tokenUtils } from './utils/token_utils';
diff --git a/packages/contract-wrappers/test/exchange_wrapper_test.ts b/packages/contract-wrappers/test/exchange_wrapper_test.ts
index fa3b49eb9..6762c1d43 100644
--- a/packages/contract-wrappers/test/exchange_wrapper_test.ts
+++ b/packages/contract-wrappers/test/exchange_wrapper_test.ts
@@ -7,14 +7,8 @@ import * as chai from 'chai';
import { BlockParamLiteral } from 'ethereum-types';
import 'mocha';
-import {
- ContractWrappers,
- DecodedLogEvent,
- ExchangeCancelEventArgs,
- ExchangeEvents,
- ExchangeFillEventArgs,
- OrderStatus,
-} from '../src';
+import { ContractWrappers, ExchangeCancelEventArgs, ExchangeEvents, ExchangeFillEventArgs, OrderStatus } from '../src';
+import { DecodedLogEvent } from '../src/types';
import { chaiSetup } from './utils/chai_setup';
import { constants } from './utils/constants';
diff --git a/packages/contract-wrappers/test/forwarder_wrapper_test.ts b/packages/contract-wrappers/test/forwarder_wrapper_test.ts
index 3f3b40e0b..d0b21225c 100644
--- a/packages/contract-wrappers/test/forwarder_wrapper_test.ts
+++ b/packages/contract-wrappers/test/forwarder_wrapper_test.ts
@@ -7,14 +7,8 @@ import * as chai from 'chai';
import { BlockParamLiteral } from 'ethereum-types';
import 'mocha';
-import {
- ContractWrappers,
- DecodedLogEvent,
- ExchangeCancelEventArgs,
- ExchangeEvents,
- ExchangeFillEventArgs,
- OrderStatus,
-} from '../src';
+import { ContractWrappers, ExchangeCancelEventArgs, ExchangeEvents, ExchangeFillEventArgs, OrderStatus } from '../src';
+import { DecodedLogEvent } from '../src/types';
import { chaiSetup } from './utils/chai_setup';
import { constants } from './utils/constants';
diff --git a/packages/contract-wrappers/test/subscription_test.ts b/packages/contract-wrappers/test/subscription_test.ts
index 80d17576f..81b9012bd 100644
--- a/packages/contract-wrappers/test/subscription_test.ts
+++ b/packages/contract-wrappers/test/subscription_test.ts
@@ -5,7 +5,8 @@ import * as _ from 'lodash';
import 'mocha';
import * as Sinon from 'sinon';
-import { ContractWrappers, DecodedLogEvent, ERC20TokenApprovalEventArgs, ERC20TokenEvents, Token } from '../src';
+import { ContractWrappers, ERC20TokenApprovalEventArgs, ERC20TokenEvents } from '../src';
+import { DecodedLogEvent } from '../src/types';
import { chaiSetup } from './utils/chai_setup';
import { constants } from './utils/constants';
diff --git a/packages/contract-wrappers/test/transaction_encoder_test.ts b/packages/contract-wrappers/test/transaction_encoder_test.ts
index 10222dbc1..e76c5b12d 100644
--- a/packages/contract-wrappers/test/transaction_encoder_test.ts
+++ b/packages/contract-wrappers/test/transaction_encoder_test.ts
@@ -1,6 +1,6 @@
import { BlockchainLifecycle } from '@0xproject/dev-utils';
import { FillScenarios } from '@0xproject/fill-scenarios';
-import { assetDataUtils, ecSignOrderHashAsync, generatePseudoRandomSalt, orderHashUtils } from '@0xproject/order-utils';
+import { assetDataUtils, signatureUtils, generatePseudoRandomSalt, orderHashUtils } from '@0xproject/order-utils';
import { SignedOrder, SignerType } from '@0xproject/types';
import { BigNumber } from '@0xproject/utils';
import 'mocha';
@@ -80,7 +80,7 @@ describe('TransactionEncoder', () => {
): Promise<void> => {
const salt = generatePseudoRandomSalt();
const encodedTransaction = encoder.getTransactionHex(data, salt, signerAddress);
- const signature = await ecSignOrderHashAsync(
+ const signature = await signatureUtils.ecSignOrderHashAsync(
provider,
encodedTransaction,
signerAddress,