aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeonid <logvinov.leon@gmail.com>2017-09-06 16:35:19 +0800
committerGitHub <noreply@github.com>2017-09-06 16:35:19 +0800
commit35c133caeda613121d7d90f3f1347ebdc8087d66 (patch)
tree6156865472010078a9f27b905bcaec7782f6521c
parent18a52a1ea758ee5640680f1097eba1ce9a9e81fc (diff)
parentf0a5ad2d2063fe8ba4682147ec2f73e2763b0275 (diff)
downloaddexon-0x-contracts-35c133caeda613121d7d90f3f1347ebdc8087d66.tar.gz
dexon-0x-contracts-35c133caeda613121d7d90f3f1347ebdc8087d66.tar.zst
dexon-0x-contracts-35c133caeda613121d7d90f3f1347ebdc8087d66.zip
Merge branch 'development' into fix/signature-verification
-rw-r--r--CHANGELOG.md7
-rw-r--r--package.json9
-rw-r--r--src/0x.ts76
-rw-r--r--src/artifacts.ts13
-rw-r--r--src/artifacts/EtherToken.json2
-rw-r--r--src/contract.ts80
-rw-r--r--src/contract_wrappers/contract_wrapper.ts51
-rw-r--r--src/contract_wrappers/ether_token_wrapper.ts22
-rw-r--r--src/contract_wrappers/exchange_wrapper.ts127
-rw-r--r--src/contract_wrappers/token_registry_wrapper.ts22
-rw-r--r--src/contract_wrappers/token_transfer_proxy_wrapper.ts10
-rw-r--r--src/contract_wrappers/token_wrapper.ts67
-rw-r--r--src/globals.d.ts35
-rw-r--r--src/index.ts3
-rw-r--r--src/types.ts203
-rw-r--r--src/web3_wrapper.ts39
-rw-r--r--test/0x.js_test.ts28
-rw-r--r--test/ether_token_wrapper_test.ts6
-rw-r--r--test/exchange_wrapper_test.ts70
-rw-r--r--test/token_wrapper_test.ts7
-rw-r--r--test/utils/web3_factory.ts6
-rw-r--r--test/web3_beta_test.ts16
-rw-r--r--yarn.lock906
23 files changed, 658 insertions, 1147 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index b45fb6478..680e55b42 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,7 +1,10 @@
# CHANGELOG
-v0.12.2 - _TBD_
- * Added signature validation to validateFillOrderThrowIfInvalidAsync (#152)
+v0.13.0 - _TBD, 2017_
+ * Made all the functions submitting transactions to the network to immediately return transaction hash (#151)
+ * Added `zeroEx.awaitTransactionMinedAsync` (#151)
+ * Added `TransactionReceiptWithDecodedLogs`, `LogWithDecodedArgs`, `DecodedLogArgs` to public types (#151)
+ * Added signature validation to `validateFillOrderThrowIfInvalidAsync` (#152)
v0.12.1 - _September 2, 2017_
* Added the support for web3@1.x.x provider (#142)
diff --git a/package.json b/package.json
index 90b6d9120..6983cf3d9 100644
--- a/package.json
+++ b/package.json
@@ -36,7 +36,7 @@
"pretest:umd": "run-s clean build:umd:dev build:commonjs",
"substitute_umd_bundle": "npm run remove_src_files_not_used_by_tests; shx mv _bundles/* lib/src",
"remove_src_files_not_used_by_tests": "find ./lib/src \\( -path ./lib/src/utils -o -path ./lib/src/subproviders -o -path ./lib/src/schemas -o -path \"./lib/src/types.*\" \\) -prune -o -type f -print | xargs rm",
- "run_mocha": "mocha lib/test/**/*_test.js --timeout 4000 --bail"
+ "run_mocha": "mocha lib/test/**/*_test.js --timeout 5000 --bail"
},
"config": {
"artifacts": "TokenTransferProxy Exchange TokenRegistry Token EtherToken",
@@ -85,13 +85,13 @@
"types-bn": "^0.0.1",
"types-ethereumjs-util": "^0.0.5",
"typescript": "^2.4.1",
- "web3_beta": "ethereum/web3.js#1.0",
"web3-provider-engine": "^13.0.1",
- "web3-typescript-typings": "^0.3.2",
+ "web3-typescript-typings": "^0.5.0",
"webpack": "^3.1.0"
},
"dependencies": {
- "0x-json-schemas": "^0.4.0",
+ "0x-json-schemas": "^0.5.1",
+ "abi-decoder": "^1.0.8",
"bignumber.js": "^4.0.2",
"compare-versions": "^3.0.1",
"es6-promisify": "^5.0.0",
@@ -100,7 +100,6 @@
"find-versions": "^2.0.0",
"lodash": "^4.17.4",
"publish-release": "^1.3.3",
- "truffle-contract": "^2.0.1",
"web3": "^0.20.0"
}
}
diff --git a/src/0x.ts b/src/0x.ts
index ba222f2c9..0af164b1e 100644
--- a/src/0x.ts
+++ b/src/0x.ts
@@ -1,9 +1,10 @@
import * as _ from 'lodash';
import * as BigNumber from 'bignumber.js';
+import * as Web3 from 'web3';
+import * as abiDecoder from 'abi-decoder';
import {SchemaValidator, schemas} from '0x-json-schemas';
import {bigNumberConfigs} from './bignumber_config';
import * as ethUtil from 'ethereumjs-util';
-import contract = require('truffle-contract');
import findVersions = require('find-versions');
import compareVersions = require('compare-versions');
import {Web3Wrapper} from './web3_wrapper';
@@ -11,12 +12,24 @@ import {constants} from './utils/constants';
import {utils} from './utils/utils';
import {signatureUtils} from './utils/signature_utils';
import {assert} from './utils/assert';
+import {artifacts} from './artifacts';
import {ExchangeWrapper} from './contract_wrappers/exchange_wrapper';
import {TokenRegistryWrapper} from './contract_wrappers/token_registry_wrapper';
import {EtherTokenWrapper} from './contract_wrappers/ether_token_wrapper';
import {TokenWrapper} from './contract_wrappers/token_wrapper';
import {TokenTransferProxyWrapper} from './contract_wrappers/token_transfer_proxy_wrapper';
-import {ECSignature, ZeroExError, Order, SignedOrder, Web3Provider, ZeroExConfig} from './types';
+import {
+ ECSignature,
+ ZeroExError,
+ Order,
+ SignedOrder,
+ Web3Provider,
+ ZeroExConfig,
+ TransactionReceipt,
+ DecodedLogArgs,
+ TransactionReceiptWithDecodedLogs,
+ LogWithDecodedArgs,
+} from './types';
// Customize our BigNumber instances
bigNumberConfigs.configure();
@@ -170,13 +183,17 @@ export class ZeroEx {
// We re-assign the send method so that Web3@1.0 providers work with 0x.js
(provider as any).sendAsync = (provider as any).send;
}
- this._web3Wrapper = new Web3Wrapper(provider);
+ this._registerArtifactsWithinABIDecoder();
const gasPrice = _.isUndefined(config) ? undefined : config.gasPrice;
- this.token = new TokenWrapper(this._web3Wrapper, gasPrice);
- this.proxy = new TokenTransferProxyWrapper(this._web3Wrapper, gasPrice);
- this.exchange = new ExchangeWrapper(this._web3Wrapper, this.token, gasPrice);
- this.tokenRegistry = new TokenRegistryWrapper(this._web3Wrapper, gasPrice);
- this.etherToken = new EtherTokenWrapper(this._web3Wrapper, this.token, gasPrice);
+ const defaults = {
+ gasPrice,
+ };
+ this._web3Wrapper = new Web3Wrapper(provider, defaults);
+ this.token = new TokenWrapper(this._web3Wrapper);
+ this.proxy = new TokenTransferProxyWrapper(this._web3Wrapper);
+ this.exchange = new ExchangeWrapper(this._web3Wrapper, this.token);
+ this.tokenRegistry = new TokenRegistryWrapper(this._web3Wrapper);
+ this.etherToken = new EtherTokenWrapper(this._web3Wrapper, this.token);
}
/**
* Sets a new web3 provider for 0x.js. Updating the provider will stop all
@@ -249,4 +266,47 @@ export class ZeroEx {
throw new Error(ZeroExError.InvalidSignature);
}
+ /**
+ * Waits for a transaction to be mined and returns the transaction receipt.
+ * @param txHash Transaction hash
+ * @param pollingIntervalMs How often (in ms) should we check if the transaction is mined.
+ * @return Transaction receipt with decoded log args.
+ */
+ public async awaitTransactionMinedAsync(
+ txHash: string, pollingIntervalMs: number = 1000): Promise<TransactionReceiptWithDecodedLogs> {
+ const txReceiptPromise = new Promise(
+ (resolve: (receipt: TransactionReceiptWithDecodedLogs) => void, reject) => {
+ const intervalId = setInterval(async () => {
+ const transactionReceipt = await this._web3Wrapper.getTransactionReceiptAsync(txHash);
+ if (!_.isNull(transactionReceipt)) {
+ clearInterval(intervalId);
+ const logsWithDecodedArgs = _.map(transactionReceipt.logs, (log: Web3.LogEntry) => {
+ const decodedLog = abiDecoder.decodeLogs([log])[0];
+ const decodedArgs = decodedLog.events;
+ const args: DecodedLogArgs = {};
+ _.forEach(decodedArgs, arg => {
+ args[arg.name] = arg.value;
+ });
+ const logWithDecodedArgs: LogWithDecodedArgs = {
+ ...log,
+ args,
+ event: decodedLog.name,
+ };
+ return logWithDecodedArgs;
+ });
+ const transactionReceiptWithDecodedLogArgs: TransactionReceiptWithDecodedLogs = {
+ ...transactionReceipt,
+ logs: logsWithDecodedArgs,
+ };
+ resolve(transactionReceiptWithDecodedLogArgs);
+ }
+ }, pollingIntervalMs);
+ });
+ return txReceiptPromise;
+ }
+ private _registerArtifactsWithinABIDecoder(): void {
+ for (const artifact of _.values(artifacts)) {
+ abiDecoder.addABI(artifact.abi);
+ }
+ }
}
diff --git a/src/artifacts.ts b/src/artifacts.ts
new file mode 100644
index 000000000..0c4627337
--- /dev/null
+++ b/src/artifacts.ts
@@ -0,0 +1,13 @@
+import * as TokenArtifact from './artifacts/Token.json';
+import * as ExchangeArtifact from './artifacts/Exchange.json';
+import * as EtherTokenArtifact from './artifacts/EtherToken.json';
+import * as TokenRegistryArtifact from './artifacts/TokenRegistry.json';
+import * as TokenTransferProxyArtifact from './artifacts/TokenTransferProxy.json';
+
+export const artifacts = {
+ TokenArtifact: TokenArtifact as any as Artifact,
+ ExchangeArtifact: ExchangeArtifact as any as Artifact,
+ EtherTokenArtifact: EtherTokenArtifact as any as Artifact,
+ TokenRegistryArtifact: TokenRegistryArtifact as any as Artifact,
+ TokenTransferProxyArtifact: TokenTransferProxyArtifact as any as Artifact,
+};
diff --git a/src/artifacts/EtherToken.json b/src/artifacts/EtherToken.json
index eca348530..54b5a032e 100644
--- a/src/artifacts/EtherToken.json
+++ b/src/artifacts/EtherToken.json
@@ -391,4 +391,4 @@
},
"schema_version": "0.0.5",
"updated_at": 1503318938233
-} \ No newline at end of file
+}
diff --git a/src/contract.ts b/src/contract.ts
new file mode 100644
index 000000000..1aacc65dc
--- /dev/null
+++ b/src/contract.ts
@@ -0,0 +1,80 @@
+import * as Web3 from 'web3';
+import * as _ from 'lodash';
+import promisify = require('es6-promisify');
+import {SchemaValidator, schemas} from '0x-json-schemas';
+import {AbiType} from './types';
+
+export class Contract implements Web3.ContractInstance {
+ public address: string;
+ public abi: Web3.ContractAbi;
+ private contract: Web3.ContractInstance;
+ private defaults: Partial<Web3.TxData>;
+ private validator: SchemaValidator;
+ // This class instance is going to be populated with functions and events depending on the ABI
+ // and we don't know their types in advance
+ [name: string]: any;
+ constructor(web3ContractInstance: Web3.ContractInstance, defaults: Partial<Web3.TxData>) {
+ this.contract = web3ContractInstance;
+ this.address = web3ContractInstance.address;
+ this.abi = web3ContractInstance.abi;
+ this.defaults = defaults;
+ this.populateEvents();
+ this.populateFunctions();
+ this.validator = new SchemaValidator();
+ }
+ private populateFunctions(): void {
+ const functionsAbi = _.filter(this.abi, abiPart => abiPart.type === AbiType.Function);
+ _.forEach(functionsAbi, (functionAbi: Web3.MethodAbi) => {
+ if (functionAbi.constant) {
+ const cbStyleCallFunction = this.contract[functionAbi.name].call;
+ this[functionAbi.name] = {
+ callAsync: promisify(cbStyleCallFunction, this.contract),
+ };
+ } else {
+ const cbStyleFunction = this.contract[functionAbi.name];
+ const cbStyleEstimateGasFunction = this.contract[functionAbi.name].estimateGas;
+ this[functionAbi.name] = {
+ estimateGasAsync: promisify(cbStyleEstimateGasFunction, this.contract),
+ sendTransactionAsync: this.promisifyWithDefaultParams(cbStyleFunction),
+ };
+ }
+ });
+ }
+ private populateEvents(): void {
+ const eventsAbi = _.filter(this.abi, abiPart => abiPart.type === AbiType.Event);
+ _.forEach(eventsAbi, (eventAbi: Web3.EventAbi) => {
+ this[eventAbi.name] = this.contract[eventAbi.name];
+ });
+ }
+ private promisifyWithDefaultParams(fn: (...args: any[]) => void): (...args: any[]) => Promise<any> {
+ const promisifiedWithDefaultParams = (...args: any[]) => {
+ const promise = new Promise((resolve, reject) => {
+ const lastArg = args[args.length - 1];
+ let txData: Partial<Web3.TxData> = {};
+ if (this.isTxData(lastArg)) {
+ txData = args.pop();
+ }
+ txData = {
+ ...this.defaults,
+ ...txData,
+ };
+ const callback = (err: Error, data: any) => {
+ if (_.isNull(err)) {
+ resolve(data);
+ } else {
+ reject(err);
+ }
+ };
+ args.push(txData);
+ args.push(callback);
+ fn.apply(this.contract, args);
+ });
+ return promise;
+ };
+ return promisifiedWithDefaultParams;
+ }
+ private isTxData(lastArg: any): boolean {
+ const isValid = this.validator.isValid(lastArg, schemas.txDataSchema);
+ return isValid;
+ }
+}
diff --git a/src/contract_wrappers/contract_wrapper.ts b/src/contract_wrappers/contract_wrapper.ts
index 28df82cee..ca19342f3 100644
--- a/src/contract_wrappers/contract_wrapper.ts
+++ b/src/contract_wrappers/contract_wrapper.ts
@@ -1,53 +1,18 @@
import * as _ from 'lodash';
-import contract = require('truffle-contract');
+import * as Web3 from 'web3';
import {Web3Wrapper} from '../web3_wrapper';
-import {ZeroExError, Artifact, ContractInstance} from '../types';
+import {ZeroExError} from '../types';
import {utils} from '../utils/utils';
export class ContractWrapper {
protected _web3Wrapper: Web3Wrapper;
- private _gasPrice?: BigNumber.BigNumber;
- constructor(web3Wrapper: Web3Wrapper, gasPrice?: BigNumber.BigNumber) {
+ constructor(web3Wrapper: Web3Wrapper) {
this._web3Wrapper = web3Wrapper;
- this._gasPrice = gasPrice;
}
- protected async _instantiateContractIfExistsAsync(artifact: Artifact, address?: string): Promise<ContractInstance> {
- const c = await contract(artifact);
- c.defaults({
- gasPrice: this._gasPrice,
- });
- const providerObj = this._web3Wrapper.getCurrentProvider();
- c.setProvider(providerObj);
-
- const networkIdIfExists = await this._web3Wrapper.getNetworkIdIfExistsAsync();
- const artifactNetworkConfigs = _.isUndefined(networkIdIfExists) ?
- undefined :
- artifact.networks[networkIdIfExists];
- let contractAddress;
- if (!_.isUndefined(address)) {
- contractAddress = address;
- } else if (!_.isUndefined(artifactNetworkConfigs)) {
- contractAddress = artifactNetworkConfigs.address.toLowerCase();
- }
-
- if (!_.isUndefined(contractAddress)) {
- const doesContractExist = await this._web3Wrapper.doesContractExistAtAddressAsync(contractAddress);
- if (!doesContractExist) {
- throw new Error(ZeroExError.ContractDoesNotExist);
- }
- }
-
- try {
- const contractInstance = _.isUndefined(address) ? await c.deployed() : await c.at(address);
- return contractInstance;
- } catch (err) {
- const errMsg = `${err}`;
- if (_.includes(errMsg, 'not been deployed to detected network')) {
- throw new Error(ZeroExError.ContractDoesNotExist);
- } else {
- utils.consoleLog(`Notice: Error encountered: ${err} ${err.stack}`);
- throw new Error(ZeroExError.UnhandledError);
- }
- }
+ protected async _instantiateContractIfExistsAsync<A extends Web3.ContractInstance>(artifact: Artifact,
+ address?: string): Promise<A> {
+ const contractInstance =
+ await this._web3Wrapper.getContractInstanceFromArtifactAsync<A>(artifact, address);
+ return contractInstance;
}
}
diff --git a/src/contract_wrappers/ether_token_wrapper.ts b/src/contract_wrappers/ether_token_wrapper.ts
index 3c282510f..b86309f90 100644
--- a/src/contract_wrappers/ether_token_wrapper.ts
+++ b/src/contract_wrappers/ether_token_wrapper.ts
@@ -4,7 +4,7 @@ import {ContractWrapper} from './contract_wrapper';
import {TokenWrapper} from './token_wrapper';
import {EtherTokenContract, ZeroExError} from '../types';
import {assert} from '../utils/assert';
-import * as EtherTokenArtifacts from '../artifacts/EtherToken.json';
+import {artifacts} from '../artifacts';
/**
* This class includes all the functionality related to interacting with a wrapped Ether ERC20 token contract.
@@ -13,8 +13,8 @@ import * as EtherTokenArtifacts from '../artifacts/EtherToken.json';
export class EtherTokenWrapper extends ContractWrapper {
private _etherTokenContractIfExists?: EtherTokenContract;
private _tokenWrapper: TokenWrapper;
- constructor(web3Wrapper: Web3Wrapper, tokenWrapper: TokenWrapper, gasPrice?: BigNumber.BigNumber) {
- super(web3Wrapper, gasPrice);
+ constructor(web3Wrapper: Web3Wrapper, tokenWrapper: TokenWrapper) {
+ super(web3Wrapper);
this._tokenWrapper = tokenWrapper;
}
/**
@@ -23,8 +23,9 @@ export class EtherTokenWrapper extends ContractWrapper {
* for ETH.
* @param amountInWei Amount of ETH in Wei the caller wishes to deposit.
* @param depositor The hex encoded user Ethereum address that would like to make the deposit.
+ * @return Transaction hash.
*/
- public async depositAsync(amountInWei: BigNumber.BigNumber, depositor: string): Promise<void> {
+ public async depositAsync(amountInWei: BigNumber.BigNumber, depositor: string): Promise<string> {
assert.isBigNumber('amountInWei', amountInWei);
await assert.isSenderAddressAsync('depositor', depositor, this._web3Wrapper);
@@ -32,18 +33,20 @@ export class EtherTokenWrapper extends ContractWrapper {
assert.assert(ethBalanceInWei.gte(amountInWei), ZeroExError.InsufficientEthBalanceForDeposit);
const wethContract = await this._getEtherTokenContractAsync();
- await wethContract.deposit({
+ const txHash = await wethContract.deposit.sendTransactionAsync({
from: depositor,
value: amountInWei,
});
+ return txHash;
}
/**
* Withdraw ETH to the withdrawer's address from the wrapped ETH smart contract in exchange for the
* equivalent number of wrapped ETH tokens.
* @param amountInWei Amount of ETH in Wei the caller wishes to withdraw.
* @param withdrawer The hex encoded user Ethereum address that would like to make the withdrawl.
+ * @return Transaction hash.
*/
- public async withdrawAsync(amountInWei: BigNumber.BigNumber, withdrawer: string): Promise<void> {
+ public async withdrawAsync(amountInWei: BigNumber.BigNumber, withdrawer: string): Promise<string> {
assert.isBigNumber('amountInWei', amountInWei);
await assert.isSenderAddressAsync('withdrawer', withdrawer, this._web3Wrapper);
@@ -52,9 +55,10 @@ export class EtherTokenWrapper extends ContractWrapper {
assert.assert(WETHBalanceInBaseUnits.gte(amountInWei), ZeroExError.InsufficientWEthBalanceForWithdrawal);
const wethContract = await this._getEtherTokenContractAsync();
- await wethContract.withdraw(amountInWei, {
+ const txHash = await wethContract.withdraw.sendTransactionAsync(amountInWei, {
from: withdrawer,
});
+ return txHash;
}
/**
* Retrieves the Wrapped Ether token contract address
@@ -71,7 +75,9 @@ export class EtherTokenWrapper extends ContractWrapper {
if (!_.isUndefined(this._etherTokenContractIfExists)) {
return this._etherTokenContractIfExists;
}
- const contractInstance = await this._instantiateContractIfExistsAsync((EtherTokenArtifacts as any));
+ const contractInstance = await this._instantiateContractIfExistsAsync<EtherTokenContract>(
+ artifacts.EtherTokenArtifact,
+ );
this._etherTokenContractIfExists = contractInstance as EtherTokenContract;
return this._etherTokenContractIfExists;
}
diff --git a/src/contract_wrappers/exchange_wrapper.ts b/src/contract_wrappers/exchange_wrapper.ts
index d09df236b..115bd1110 100644
--- a/src/contract_wrappers/exchange_wrapper.ts
+++ b/src/contract_wrappers/exchange_wrapper.ts
@@ -21,7 +21,6 @@ import {
IndexedFilterValues,
CreateContractEvent,
ContractEventObj,
- ContractResponse,
OrderCancellationRequest,
OrderFillRequest,
LogErrorContractEventArgs,
@@ -36,21 +35,13 @@ import {ContractWrapper} from './contract_wrapper';
import {constants} from '../utils/constants';
import {TokenWrapper} from './token_wrapper';
import {decorators} from '../utils/decorators';
-import * as ExchangeArtifacts from '../artifacts/Exchange.json';
+import {artifacts} from '../artifacts';
/**
* This class includes all the functionality related to calling methods and subscribing to
* events of the 0x Exchange smart contract.
*/
export class ExchangeWrapper extends ContractWrapper {
- private _exchangeContractErrCodesToMsg = {
- [ExchangeContractErrCodes.ERROR_FILL_EXPIRED]: ExchangeContractErrs.OrderFillExpired,
- [ExchangeContractErrCodes.ERROR_CANCEL_EXPIRED]: ExchangeContractErrs.OrderFillExpired,
- [ExchangeContractErrCodes.ERROR_FILL_NO_VALUE]: ExchangeContractErrs.OrderRemainingFillAmountZero,
- [ExchangeContractErrCodes.ERROR_CANCEL_NO_VALUE]: ExchangeContractErrs.OrderRemainingFillAmountZero,
- [ExchangeContractErrCodes.ERROR_FILL_TRUNCATION]: ExchangeContractErrs.OrderFillRoundingError,
- [ExchangeContractErrCodes.ERROR_FILL_BALANCE_ALLOWANCE]: ExchangeContractErrs.FillBalanceAllowanceError,
- };
private _exchangeContractIfExists?: ExchangeContract;
private _exchangeLogEventEmitters: ContractEventEmitter[];
private _orderValidationUtils: OrderValidationUtils;
@@ -73,8 +64,8 @@ export class ExchangeWrapper extends ContractWrapper {
];
return [orderAddresses, orderValues];
}
- constructor(web3Wrapper: Web3Wrapper, tokenWrapper: TokenWrapper, gasPrice?: BigNumber.BigNumber) {
- super(web3Wrapper, gasPrice);
+ constructor(web3Wrapper: Web3Wrapper, tokenWrapper: TokenWrapper) {
+ super(web3Wrapper);
this._tokenWrapper = tokenWrapper;
this._orderValidationUtils = new OrderValidationUtils(tokenWrapper, this);
this._exchangeLogEventEmitters = [];
@@ -91,7 +82,7 @@ export class ExchangeWrapper extends ContractWrapper {
assert.doesConformToSchema('orderHash', orderHash, schemas.orderHashSchema);
const exchangeContract = await this._getExchangeContractAsync();
- let unavailableTakerTokenAmount = await exchangeContract.getUnavailableTakerTokenAmount.call(orderHash);
+ let unavailableTakerTokenAmount = await exchangeContract.getUnavailableTakerTokenAmount.callAsync(orderHash);
// Wrap BigNumbers returned from web3 with our own (later) version of BigNumber
unavailableTakerTokenAmount = new BigNumber(unavailableTakerTokenAmount);
return unavailableTakerTokenAmount;
@@ -105,7 +96,7 @@ export class ExchangeWrapper extends ContractWrapper {
assert.doesConformToSchema('orderHash', orderHash, schemas.orderHashSchema);
const exchangeContract = await this._getExchangeContractAsync();
- let fillAmountInBaseUnits = await exchangeContract.filled.call(orderHash);
+ let fillAmountInBaseUnits = await exchangeContract.filled.callAsync(orderHash);
// Wrap BigNumbers returned from web3 with our own (later) version of BigNumber
fillAmountInBaseUnits = new BigNumber(fillAmountInBaseUnits);
return fillAmountInBaseUnits;
@@ -120,7 +111,7 @@ export class ExchangeWrapper extends ContractWrapper {
assert.doesConformToSchema('orderHash', orderHash, schemas.orderHashSchema);
const exchangeContract = await this._getExchangeContractAsync();
- let cancelledAmountInBaseUnits = await exchangeContract.cancelled.call(orderHash);
+ let cancelledAmountInBaseUnits = await exchangeContract.cancelled.callAsync(orderHash);
// Wrap BigNumbers returned from web3 with our own (later) version of BigNumber
cancelledAmountInBaseUnits = new BigNumber(cancelledAmountInBaseUnits);
return cancelledAmountInBaseUnits;
@@ -141,12 +132,12 @@ export class ExchangeWrapper extends ContractWrapper {
* @param takerAddress The user Ethereum address who would like to fill this order.
* Must be available via the supplied Web3.Provider
* passed to 0x.js.
- * @return The amount of the order that was filled (in taker token baseUnits).
+ * @return Transaction hash.
*/
@decorators.contractCallErrorHandler
public async fillOrderAsync(signedOrder: SignedOrder, fillTakerTokenAmount: BigNumber.BigNumber,
shouldThrowOnInsufficientBalanceOrAllowance: boolean,
- takerAddress: string): Promise<BigNumber.BigNumber> {
+ takerAddress: string): Promise<string> {
assert.doesConformToSchema('signedOrder', signedOrder, schemas.signedOrderSchema);
assert.isBigNumber('fillTakerTokenAmount', fillTakerTokenAmount);
assert.isBoolean('shouldThrowOnInsufficientBalanceOrAllowance', shouldThrowOnInsufficientBalanceOrAllowance);
@@ -157,7 +148,7 @@ export class ExchangeWrapper extends ContractWrapper {
const [orderAddresses, orderValues] = ExchangeWrapper._getOrderAddressesAndValues(signedOrder);
- const gas = await exchangeInstance.fillOrder.estimateGas(
+ const gas = await exchangeInstance.fillOrder.estimateGasAsync(
orderAddresses,
orderValues,
fillTakerTokenAmount,
@@ -169,7 +160,7 @@ export class ExchangeWrapper extends ContractWrapper {
from: takerAddress,
},
);
- const response: ContractResponse = await exchangeInstance.fillOrder(
+ const txHash: string = await exchangeInstance.fillOrder.sendTransactionAsync(
orderAddresses,
orderValues,
fillTakerTokenAmount,
@@ -182,10 +173,7 @@ export class ExchangeWrapper extends ContractWrapper {
gas,
},
);
- this._throwErrorLogsAsErrors(response.logs);
- const logFillArgs = response.logs[0].args as LogFillContractEventArgs;
- const filledTakerTokenAmount = new BigNumber(logFillArgs.filledTakerTokenAmount);
- return filledTakerTokenAmount;
+ return txHash;
}
/**
* Sequentially and atomically fills signedOrders up to the specified takerTokenFillAmount.
@@ -201,12 +189,12 @@ export class ExchangeWrapper extends ContractWrapper {
* @param takerAddress The user Ethereum address who would like to fill these
* orders. Must be available via the supplied Web3.Provider
* passed to 0x.js.
- * @return The amount of the orders that was filled (in taker token baseUnits).
+ * @return Transaction hash.
*/
@decorators.contractCallErrorHandler
public async fillOrdersUpToAsync(signedOrders: SignedOrder[], fillTakerTokenAmount: BigNumber.BigNumber,
shouldThrowOnInsufficientBalanceOrAllowance: boolean,
- takerAddress: string): Promise<BigNumber.BigNumber> {
+ takerAddress: string): Promise<string> {
assert.doesConformToSchema('signedOrders', signedOrders, schemas.signedOrdersSchema);
const takerTokenAddresses = _.map(signedOrders, signedOrder => signedOrder.takerTokenAddress);
assert.hasAtMostOneUniqueValue(takerTokenAddresses,
@@ -222,7 +210,7 @@ export class ExchangeWrapper extends ContractWrapper {
signedOrder, fillTakerTokenAmount, takerAddress);
}
if (_.isEmpty(signedOrders)) {
- return new BigNumber(0); // no-op
+ throw new Error(ExchangeContractErrs.BatchOrdersMustHaveAtLeastOneItem);
}
const orderAddressesValuesAndSignatureArray = _.map(signedOrders, signedOrder => {
@@ -239,7 +227,7 @@ export class ExchangeWrapper extends ContractWrapper {
);
const exchangeInstance = await this._getExchangeContractAsync();
- const gas = await exchangeInstance.fillOrdersUpTo.estimateGas(
+ const gas = await exchangeInstance.fillOrdersUpTo.estimateGasAsync(
orderAddressesArray,
orderValuesArray,
fillTakerTokenAmount,
@@ -251,7 +239,7 @@ export class ExchangeWrapper extends ContractWrapper {
from: takerAddress,
},
);
- const response: ContractResponse = await exchangeInstance.fillOrdersUpTo(
+ const txHash = await exchangeInstance.fillOrdersUpTo.sendTransactionAsync(
orderAddressesArray,
orderValuesArray,
fillTakerTokenAmount,
@@ -264,13 +252,7 @@ export class ExchangeWrapper extends ContractWrapper {
gas,
},
);
- this._throwErrorLogsAsErrors(response.logs);
- let filledTakerTokenAmount = new BigNumber(0);
- _.each(response.logs, log => {
- filledTakerTokenAmount = filledTakerTokenAmount.plus(
- (log.args as LogFillContractEventArgs).filledTakerTokenAmount);
- });
- return filledTakerTokenAmount;
+ return txHash;
}
/**
* Batch version of fillOrderAsync.
@@ -288,11 +270,12 @@ export class ExchangeWrapper extends ContractWrapper {
* @param takerAddress The user Ethereum address who would like to fill
* these orders. Must be available via the supplied
* Web3.Provider passed to 0x.js.
+ * @return Transaction hash.
*/
@decorators.contractCallErrorHandler
public async batchFillOrdersAsync(orderFillRequests: OrderFillRequest[],
shouldThrowOnInsufficientBalanceOrAllowance: boolean,
- takerAddress: string): Promise<void> {
+ takerAddress: string): Promise<string> {
assert.doesConformToSchema('orderFillRequests', orderFillRequests, schemas.orderFillRequestsSchema);
const exchangeContractAddresses = _.map(
orderFillRequests,
@@ -307,7 +290,7 @@ export class ExchangeWrapper extends ContractWrapper {
orderFillRequest.signedOrder, orderFillRequest.takerTokenFillAmount, takerAddress);
}
if (_.isEmpty(orderFillRequests)) {
- return; // no-op
+ throw new Error(ExchangeContractErrs.BatchOrdersMustHaveAtLeastOneItem);
}
const orderAddressesValuesAmountsAndSignatureArray = _.map(orderFillRequests, orderFillRequest => {
@@ -325,7 +308,7 @@ export class ExchangeWrapper extends ContractWrapper {
);
const exchangeInstance = await this._getExchangeContractAsync();
- const gas = await exchangeInstance.batchFillOrders.estimateGas(
+ const gas = await exchangeInstance.batchFillOrders.estimateGasAsync(
orderAddressesArray,
orderValuesArray,
fillTakerTokenAmounts,
@@ -337,7 +320,7 @@ export class ExchangeWrapper extends ContractWrapper {
from: takerAddress,
},
);
- const response: ContractResponse = await exchangeInstance.batchFillOrders(
+ const txHash = await exchangeInstance.batchFillOrders.sendTransactionAsync(
orderAddressesArray,
orderValuesArray,
fillTakerTokenAmounts,
@@ -350,7 +333,7 @@ export class ExchangeWrapper extends ContractWrapper {
gas,
},
);
- this._throwErrorLogsAsErrors(response.logs);
+ return txHash;
}
/**
* Attempts to fill a specific amount of an order. If the entire amount specified cannot be filled,
@@ -360,10 +343,11 @@ export class ExchangeWrapper extends ContractWrapper {
* @param fillTakerTokenAmount The total amount of the takerTokens you would like to fill.
* @param takerAddress The user Ethereum address who would like to fill this order.
* Must be available via the supplied Web3.Provider passed to 0x.js.
+ * @return Transaction hash.
*/
@decorators.contractCallErrorHandler
public async fillOrKillOrderAsync(signedOrder: SignedOrder, fillTakerTokenAmount: BigNumber.BigNumber,
- takerAddress: string): Promise<void> {
+ takerAddress: string): Promise<string> {
assert.doesConformToSchema('signedOrder', signedOrder, schemas.signedOrderSchema);
assert.isBigNumber('fillTakerTokenAmount', fillTakerTokenAmount);
await assert.isSenderAddressAsync('takerAddress', takerAddress, this._web3Wrapper);
@@ -374,7 +358,7 @@ export class ExchangeWrapper extends ContractWrapper {
const [orderAddresses, orderValues] = ExchangeWrapper._getOrderAddressesAndValues(signedOrder);
- const gas = await exchangeInstance.fillOrKillOrder.estimateGas(
+ const gas = await exchangeInstance.fillOrKillOrder.estimateGasAsync(
orderAddresses,
orderValues,
fillTakerTokenAmount,
@@ -385,7 +369,7 @@ export class ExchangeWrapper extends ContractWrapper {
from: takerAddress,
},
);
- const response: ContractResponse = await exchangeInstance.fillOrKillOrder(
+ const txHash = await exchangeInstance.fillOrKillOrder.sendTransactionAsync(
orderAddresses,
orderValues,
fillTakerTokenAmount,
@@ -397,7 +381,7 @@ export class ExchangeWrapper extends ContractWrapper {
gas,
},
);
- this._throwErrorLogsAsErrors(response.logs);
+ return txHash;
}
/**
* Batch version of fillOrKill. Allows a taker to specify a batch of orders that will either be atomically
@@ -405,10 +389,11 @@ export class ExchangeWrapper extends ContractWrapper {
* @param orderFillOrKillRequests An array of objects that conform to the OrderFillOrKillRequest interface.
* @param takerAddress The user Ethereum address who would like to fill there orders.
* Must be available via the supplied Web3.Provider passed to 0x.js.
+ * @return Transaction hash.
*/
@decorators.contractCallErrorHandler
public async batchFillOrKillAsync(orderFillOrKillRequests: OrderFillOrKillRequest[],
- takerAddress: string): Promise<void> {
+ takerAddress: string): Promise<string> {
assert.doesConformToSchema('orderFillOrKillRequests', orderFillOrKillRequests,
schemas.orderFillOrKillRequestsSchema);
const exchangeContractAddresses = _.map(
@@ -419,7 +404,7 @@ export class ExchangeWrapper extends ContractWrapper {
ExchangeContractErrs.BatchOrdersMustHaveSameExchangeAddress);
await assert.isSenderAddressAsync('takerAddress', takerAddress, this._web3Wrapper);
if (_.isEmpty(orderFillOrKillRequests)) {
- return; // no-op
+ throw new Error(ExchangeContractErrs.BatchOrdersMustHaveAtLeastOneItem);
}
const exchangeInstance = await this._getExchangeContractAsync();
for (const request of orderFillOrKillRequests) {
@@ -441,7 +426,7 @@ export class ExchangeWrapper extends ContractWrapper {
const [orderAddresses, orderValues, fillTakerTokenAmounts, vParams, rParams, sParams] =
_.unzip<any>(orderAddressesValuesAndTakerTokenFillAmounts);
- const gas = await exchangeInstance.batchFillOrKillOrders.estimateGas(
+ const gas = await exchangeInstance.batchFillOrKillOrders.estimateGasAsync(
orderAddresses,
orderValues,
fillTakerTokenAmounts,
@@ -452,7 +437,7 @@ export class ExchangeWrapper extends ContractWrapper {
from: takerAddress,
},
);
- const response: ContractResponse = await exchangeInstance.batchFillOrKillOrders(
+ const txHash = await exchangeInstance.batchFillOrKillOrders.sendTransactionAsync(
orderAddresses,
orderValues,
fillTakerTokenAmounts,
@@ -464,18 +449,18 @@ export class ExchangeWrapper extends ContractWrapper {
gas,
},
);
- this._throwErrorLogsAsErrors(response.logs);
+ return txHash;
}
/**
* Cancel a given fill amount of an order. Cancellations are cumulative.
* @param order An object that conforms to the Order or SignedOrder interface.
* The order you would like to cancel.
* @param cancelTakerTokenAmount The amount (specified in taker tokens) that you would like to cancel.
- * @return The amount of the order that was cancelled (in taker token baseUnits).
+ * @return Transaction hash.
*/
@decorators.contractCallErrorHandler
public async cancelOrderAsync(
- order: Order|SignedOrder, cancelTakerTokenAmount: BigNumber.BigNumber): Promise<BigNumber.BigNumber> {
+ order: Order|SignedOrder, cancelTakerTokenAmount: BigNumber.BigNumber): Promise<string> {
assert.doesConformToSchema('order', order, schemas.orderSchema);
assert.isBigNumber('takerTokenCancelAmount', cancelTakerTokenAmount);
await assert.isSenderAddressAsync('order.maker', order.maker, this._web3Wrapper);
@@ -484,7 +469,7 @@ export class ExchangeWrapper extends ContractWrapper {
await this.validateCancelOrderThrowIfInvalidAsync(order, cancelTakerTokenAmount);
const [orderAddresses, orderValues] = ExchangeWrapper._getOrderAddressesAndValues(order);
- const gas = await exchangeInstance.cancelOrder.estimateGas(
+ const gas = await exchangeInstance.cancelOrder.estimateGasAsync(
orderAddresses,
orderValues,
cancelTakerTokenAmount,
@@ -492,7 +477,7 @@ export class ExchangeWrapper extends ContractWrapper {
from: order.maker,
},
);
- const response: ContractResponse = await exchangeInstance.cancelOrder(
+ const txHash = await exchangeInstance.cancelOrder.sendTransactionAsync(
orderAddresses,
orderValues,
cancelTakerTokenAmount,
@@ -501,19 +486,17 @@ export class ExchangeWrapper extends ContractWrapper {
gas,
},
);
- this._throwErrorLogsAsErrors(response.logs);
- const logFillArgs = response.logs[0].args as LogCancelContractEventArgs;
- const cancelledTakerTokenAmount = new BigNumber(logFillArgs.cancelledTakerTokenAmount);
- return cancelledTakerTokenAmount;
+ return txHash;
}
/**
* Batch version of cancelOrderAsync. Atomically cancels multiple orders in a single transaction.
* All orders must be from the same maker.
* @param orderCancellationRequests An array of objects that conform to the OrderCancellationRequest
* interface.
+ * @return Transaction hash.
*/
@decorators.contractCallErrorHandler
- public async batchCancelOrdersAsync(orderCancellationRequests: OrderCancellationRequest[]): Promise<void> {
+ public async batchCancelOrdersAsync(orderCancellationRequests: OrderCancellationRequest[]): Promise<string> {
assert.doesConformToSchema('orderCancellationRequests', orderCancellationRequests,
schemas.orderCancellationRequestsSchema);
const exchangeContractAddresses = _.map(
@@ -532,7 +515,7 @@ export class ExchangeWrapper extends ContractWrapper {
);
}
if (_.isEmpty(orderCancellationRequests)) {
- return; // no-op
+ throw new Error(ExchangeContractErrs.BatchOrdersMustHaveAtLeastOneItem);
}
const exchangeInstance = await this._getExchangeContractAsync();
const orderAddressesValuesAndTakerTokenCancelAmounts = _.map(orderCancellationRequests, cancellationRequest => {
@@ -544,7 +527,7 @@ export class ExchangeWrapper extends ContractWrapper {
// We use _.unzip<any> because _.unzip doesn't type check if values have different types :'(
const [orderAddresses, orderValues, cancelTakerTokenAmounts] =
_.unzip<any>(orderAddressesValuesAndTakerTokenCancelAmounts);
- const gas = await exchangeInstance.batchCancelOrders.estimateGas(
+ const gas = await exchangeInstance.batchCancelOrders.estimateGasAsync(
orderAddresses,
orderValues,
cancelTakerTokenAmounts,
@@ -552,7 +535,7 @@ export class ExchangeWrapper extends ContractWrapper {
from: maker,
},
);
- const response: ContractResponse = await exchangeInstance.batchCancelOrders(
+ const txHash = await exchangeInstance.batchCancelOrders.sendTransactionAsync(
orderAddresses,
orderValues,
cancelTakerTokenAmounts,
@@ -561,7 +544,7 @@ export class ExchangeWrapper extends ContractWrapper {
gas,
},
);
- this._throwErrorLogsAsErrors(response.logs);
+ return txHash;
}
/**
* Subscribe to an event type emitted by the Exchange smart contract
@@ -686,7 +669,7 @@ export class ExchangeWrapper extends ContractWrapper {
assert.isBigNumber('takerTokenAmount', takerTokenAmount);
assert.isBigNumber('makerTokenAmount', makerTokenAmount);
const exchangeInstance = await this._getExchangeContractAsync();
- const isRoundingError = await exchangeInstance.isRoundingError.call(
+ const isRoundingError = await exchangeInstance.isRoundingError.callAsync(
fillTakerTokenAmount, takerTokenAmount, makerTokenAmount,
);
return isRoundingError;
@@ -703,7 +686,7 @@ export class ExchangeWrapper extends ContractWrapper {
const exchangeInstance = await this._getExchangeContractAsync();
- const isValidSignature = await exchangeInstance.isValidSignature.call(
+ const isValidSignature = await exchangeInstance.isValidSignature.callAsync(
signerAddressHex,
dataHex,
ecSignature.v,
@@ -715,28 +698,22 @@ export class ExchangeWrapper extends ContractWrapper {
private async _getOrderHashHexUsingContractCallAsync(order: Order|SignedOrder): Promise<string> {
const exchangeInstance = await this._getExchangeContractAsync();
const [orderAddresses, orderValues] = ExchangeWrapper._getOrderAddressesAndValues(order);
- const orderHashHex = await exchangeInstance.getOrderHash.call(orderAddresses, orderValues);
+ const orderHashHex = await exchangeInstance.getOrderHash.callAsync(orderAddresses, orderValues);
return orderHashHex;
}
- private _throwErrorLogsAsErrors(logs: ContractEvent[]): void {
- const errEvent = _.find(logs, {event: 'LogError'});
- if (!_.isUndefined(errEvent)) {
- const errCode = (errEvent.args as LogErrorContractEventArgs).errorId.toNumber();
- const errMessage = this._exchangeContractErrCodesToMsg[errCode];
- throw new Error(errMessage);
- }
- }
private async _getExchangeContractAsync(): Promise<ExchangeContract> {
if (!_.isUndefined(this._exchangeContractIfExists)) {
return this._exchangeContractIfExists;
}
- const contractInstance = await this._instantiateContractIfExistsAsync((ExchangeArtifacts as any));
+ const contractInstance = await this._instantiateContractIfExistsAsync<ExchangeContract>(
+ artifacts.ExchangeArtifact,
+ );
this._exchangeContractIfExists = contractInstance as ExchangeContract;
return this._exchangeContractIfExists;
}
private async _getZRXTokenAddressAsync(): Promise<string> {
const exchangeInstance = await this._getExchangeContractAsync();
- const ZRXtokenAddress = await exchangeInstance.ZRX_TOKEN_CONTRACT.call();
+ const ZRXtokenAddress = await exchangeInstance.ZRX_TOKEN_CONTRACT.callAsync();
return ZRXtokenAddress;
}
}
diff --git a/src/contract_wrappers/token_registry_wrapper.ts b/src/contract_wrappers/token_registry_wrapper.ts
index 822e69460..528a88e06 100644
--- a/src/contract_wrappers/token_registry_wrapper.ts
+++ b/src/contract_wrappers/token_registry_wrapper.ts
@@ -4,15 +4,15 @@ import {assert} from '../utils/assert';
import {Token, TokenRegistryContract, TokenMetadata} from '../types';
import {constants} from '../utils/constants';
import {ContractWrapper} from './contract_wrapper';
-import * as TokenRegistryArtifacts from '../artifacts/TokenRegistry.json';
+import {artifacts} from '../artifacts';
/**
* This class includes all the functionality related to interacting with the 0x Token Registry smart contract.
*/
export class TokenRegistryWrapper extends ContractWrapper {
private _tokenRegistryContractIfExists?: TokenRegistryContract;
- constructor(web3Wrapper: Web3Wrapper, gasPrice?: BigNumber.BigNumber) {
- super(web3Wrapper, gasPrice);
+ constructor(web3Wrapper: Web3Wrapper) {
+ super(web3Wrapper);
}
/**
* Retrieves all the tokens currently listed in the Token Registry smart contract
@@ -35,7 +35,7 @@ export class TokenRegistryWrapper extends ContractWrapper {
*/
public async getTokenAddressesAsync(): Promise<string[]> {
const tokenRegistryContract = await this._getTokenRegistryContractAsync();
- const addresses = await tokenRegistryContract.getTokenAddresses.call();
+ const addresses = await tokenRegistryContract.getTokenAddresses.callAsync();
return addresses;
}
/**
@@ -46,14 +46,14 @@ export class TokenRegistryWrapper extends ContractWrapper {
assert.isETHAddressHex('address', address);
const tokenRegistryContract = await this._getTokenRegistryContractAsync();
- const metadata = await tokenRegistryContract.getTokenMetaData.call(address);
+ const metadata = await tokenRegistryContract.getTokenMetaData.callAsync(address);
const token = this._createTokenFromMetadata(metadata);
return token;
}
public async getTokenAddressBySymbolIfExistsAsync(symbol: string): Promise<string|undefined> {
assert.isString('symbol', symbol);
const tokenRegistryContract = await this._getTokenRegistryContractAsync();
- const addressIfExists = await tokenRegistryContract.getTokenAddressBySymbol.call(symbol);
+ const addressIfExists = await tokenRegistryContract.getTokenAddressBySymbol.callAsync(symbol);
if (addressIfExists === constants.NULL_ADDRESS) {
return undefined;
}
@@ -62,7 +62,7 @@ export class TokenRegistryWrapper extends ContractWrapper {
public async getTokenAddressByNameIfExistsAsync(name: string): Promise<string|undefined> {
assert.isString('name', name);
const tokenRegistryContract = await this._getTokenRegistryContractAsync();
- const addressIfExists = await tokenRegistryContract.getTokenAddressByName.call(name);
+ const addressIfExists = await tokenRegistryContract.getTokenAddressByName.callAsync(name);
if (addressIfExists === constants.NULL_ADDRESS) {
return undefined;
}
@@ -71,14 +71,14 @@ export class TokenRegistryWrapper extends ContractWrapper {
public async getTokenBySymbolIfExistsAsync(symbol: string): Promise<Token|undefined> {
assert.isString('symbol', symbol);
const tokenRegistryContract = await this._getTokenRegistryContractAsync();
- const metadata = await tokenRegistryContract.getTokenBySymbol.call(symbol);
+ const metadata = await tokenRegistryContract.getTokenBySymbol.callAsync(symbol);
const token = this._createTokenFromMetadata(metadata);
return token;
}
public async getTokenByNameIfExistsAsync(name: string): Promise<Token|undefined> {
assert.isString('name', name);
const tokenRegistryContract = await this._getTokenRegistryContractAsync();
- const metadata = await tokenRegistryContract.getTokenByName.call(name);
+ const metadata = await tokenRegistryContract.getTokenByName.callAsync(name);
const token = this._createTokenFromMetadata(metadata);
return token;
}
@@ -101,7 +101,9 @@ export class TokenRegistryWrapper extends ContractWrapper {
if (!_.isUndefined(this._tokenRegistryContractIfExists)) {
return this._tokenRegistryContractIfExists;
}
- const contractInstance = await this._instantiateContractIfExistsAsync((TokenRegistryArtifacts as any));
+ const contractInstance = await this._instantiateContractIfExistsAsync<TokenRegistryContract>(
+ artifacts.TokenRegistryArtifact,
+ );
this._tokenRegistryContractIfExists = contractInstance as TokenRegistryContract;
return this._tokenRegistryContractIfExists;
}
diff --git a/src/contract_wrappers/token_transfer_proxy_wrapper.ts b/src/contract_wrappers/token_transfer_proxy_wrapper.ts
index da17d79ff..528d661d1 100644
--- a/src/contract_wrappers/token_transfer_proxy_wrapper.ts
+++ b/src/contract_wrappers/token_transfer_proxy_wrapper.ts
@@ -1,6 +1,6 @@
import * as _ from 'lodash';
import {ContractWrapper} from './contract_wrapper';
-import * as TokenTransferProxyArtifacts from '../artifacts/TokenTransferProxy.json';
+import {artifacts} from '../artifacts';
import {TokenTransferProxyContract} from '../types';
/**
@@ -15,7 +15,7 @@ export class TokenTransferProxyWrapper extends ContractWrapper {
*/
public async isAuthorizedAsync(exchangeContractAddress: string): Promise<boolean> {
const tokenTransferProxyContractInstance = await this._getTokenTransferProxyContractAsync();
- const isAuthorized = await tokenTransferProxyContractInstance.authorized.call(exchangeContractAddress);
+ const isAuthorized = await tokenTransferProxyContractInstance.authorized.callAsync(exchangeContractAddress);
return isAuthorized;
}
/**
@@ -24,7 +24,7 @@ export class TokenTransferProxyWrapper extends ContractWrapper {
*/
public async getAuthorizedAddressesAsync(): Promise<string[]> {
const tokenTransferProxyContractInstance = await this._getTokenTransferProxyContractAsync();
- const authorizedAddresses = await tokenTransferProxyContractInstance.getAuthorizedAddresses.call();
+ const authorizedAddresses = await tokenTransferProxyContractInstance.getAuthorizedAddresses.callAsync();
return authorizedAddresses;
}
/**
@@ -44,7 +44,9 @@ export class TokenTransferProxyWrapper extends ContractWrapper {
if (!_.isUndefined(this._tokenTransferProxyContractIfExists)) {
return this._tokenTransferProxyContractIfExists;
}
- const contractInstance = await this._instantiateContractIfExistsAsync((TokenTransferProxyArtifacts as any));
+ const contractInstance = await this._instantiateContractIfExistsAsync<TokenTransferProxyContract>(
+ artifacts.TokenTransferProxyArtifact,
+ );
this._tokenTransferProxyContractIfExists = contractInstance as TokenTransferProxyContract;
return this._tokenTransferProxyContractIfExists;
}
diff --git a/src/contract_wrappers/token_wrapper.ts b/src/contract_wrappers/token_wrapper.ts
index f7070f1f4..f1f967286 100644
--- a/src/contract_wrappers/token_wrapper.ts
+++ b/src/contract_wrappers/token_wrapper.ts
@@ -7,8 +7,7 @@ import {utils} from '../utils/utils';
import {eventUtils} from '../utils/event_utils';
import {constants} from '../utils/constants';
import {ContractWrapper} from './contract_wrapper';
-import * as TokenArtifacts from '../artifacts/Token.json';
-import * as TokenTransferProxyArtifacts from '../artifacts/TokenTransferProxy.json';
+import {artifacts} from '../artifacts';
import {
TokenContract,
ZeroExError,
@@ -31,8 +30,8 @@ export class TokenWrapper extends ContractWrapper {
public UNLIMITED_ALLOWANCE_IN_BASE_UNITS = constants.UNLIMITED_ALLOWANCE_IN_BASE_UNITS;
private _tokenContractsByAddress: {[address: string]: TokenContract};
private _tokenLogEventEmitters: ContractEventEmitter[];
- constructor(web3Wrapper: Web3Wrapper, gasPrice?: BigNumber.BigNumber) {
- super(web3Wrapper, gasPrice);
+ constructor(web3Wrapper: Web3Wrapper) {
+ super(web3Wrapper);
this._tokenContractsByAddress = {};
this._tokenLogEventEmitters = [];
}
@@ -47,7 +46,7 @@ export class TokenWrapper extends ContractWrapper {
assert.isETHAddressHex('tokenAddress', tokenAddress);
const tokenContract = await this._getTokenContractAsync(tokenAddress);
- let balance = await tokenContract.balanceOf.call(ownerAddress);
+ let balance = await tokenContract.balanceOf.callAsync(ownerAddress);
// Wrap BigNumbers returned from web3 with our own (later) version of BigNumber
balance = new BigNumber(balance);
return balance;
@@ -60,9 +59,10 @@ export class TokenWrapper extends ContractWrapper {
* for spenderAddress.
* @param spenderAddress The hex encoded user Ethereum address who will be able to spend the set allowance.
* @param amountInBaseUnits The allowance amount you would like to set.
+ * @return Transaction hash.
*/
public async setAllowanceAsync(tokenAddress: string, ownerAddress: string, spenderAddress: string,
- amountInBaseUnits: BigNumber.BigNumber): Promise<void> {
+ amountInBaseUnits: BigNumber.BigNumber): Promise<string> {
await assert.isSenderAddressAsync('ownerAddress', ownerAddress, this._web3Wrapper);
assert.isETHAddressHex('spenderAddress', spenderAddress);
assert.isETHAddressHex('tokenAddress', tokenAddress);
@@ -74,10 +74,11 @@ export class TokenWrapper extends ContractWrapper {
// TODO: Debug issue in testrpc and submit a PR, then remove this hack
const networkIdIfExists = await this._web3Wrapper.getNetworkIdIfExistsAsync();
const gas = networkIdIfExists === constants.TESTRPC_NETWORK_ID ? ALLOWANCE_TO_ZERO_GAS_AMOUNT : undefined;
- await tokenContract.approve(spenderAddress, amountInBaseUnits, {
+ const txHash = await tokenContract.approve.sendTransactionAsync(spenderAddress, amountInBaseUnits, {
from: ownerAddress,
gas,
});
+ return txHash;
}
/**
* Sets the spender's allowance to an unlimited number of baseUnits on behalf of the owner address.
@@ -88,12 +89,14 @@ export class TokenWrapper extends ContractWrapper {
* @param ownerAddress The hex encoded user Ethereum address who would like to set an allowance
* for spenderAddress.
* @param spenderAddress The hex encoded user Ethereum address who will be able to spend the set allowance.
+ * @return Transaction hash.
*/
public async setUnlimitedAllowanceAsync(tokenAddress: string, ownerAddress: string,
- spenderAddress: string): Promise<void> {
- await this.setAllowanceAsync(
+ spenderAddress: string): Promise<string> {
+ const txHash = await this.setAllowanceAsync(
tokenAddress, ownerAddress, spenderAddress, this.UNLIMITED_ALLOWANCE_IN_BASE_UNITS,
);
+ return txHash;
}
/**
* Retrieves the owners allowance in baseUnits set to the spender's address.
@@ -102,12 +105,13 @@ export class TokenWrapper extends ContractWrapper {
* you would like to retrieve.
* @param spenderAddress The hex encoded user Ethereum address who can spend the allowance you are fetching.
*/
- public async getAllowanceAsync(tokenAddress: string, ownerAddress: string, spenderAddress: string) {
+ public async getAllowanceAsync(tokenAddress: string, ownerAddress: string,
+ spenderAddress: string): Promise<BigNumber.BigNumber> {
assert.isETHAddressHex('ownerAddress', ownerAddress);
assert.isETHAddressHex('tokenAddress', tokenAddress);
const tokenContract = await this._getTokenContractAsync(tokenAddress);
- let allowanceInBaseUnits = await tokenContract.allowance.call(ownerAddress, spenderAddress);
+ let allowanceInBaseUnits = await tokenContract.allowance.callAsync(ownerAddress, spenderAddress);
// Wrap BigNumbers returned from web3 with our own (later) version of BigNumber
allowanceInBaseUnits = new BigNumber(allowanceInBaseUnits);
return allowanceInBaseUnits;
@@ -117,7 +121,7 @@ export class TokenWrapper extends ContractWrapper {
* @param tokenAddress The hex encoded contract Ethereum address where the ERC20 token is deployed.
* @param ownerAddress The hex encoded user Ethereum address whose proxy contract allowance we are retrieving.
*/
- public async getProxyAllowanceAsync(tokenAddress: string, ownerAddress: string) {
+ public async getProxyAllowanceAsync(tokenAddress: string, ownerAddress: string): Promise<BigNumber.BigNumber> {
assert.isETHAddressHex('ownerAddress', ownerAddress);
assert.isETHAddressHex('tokenAddress', tokenAddress);
@@ -132,15 +136,17 @@ export class TokenWrapper extends ContractWrapper {
* @param ownerAddress The hex encoded user Ethereum address who is setting an allowance
* for the Proxy contract.
* @param amountInBaseUnits The allowance amount specified in baseUnits.
+ * @return Transaction hash.
*/
public async setProxyAllowanceAsync(tokenAddress: string, ownerAddress: string,
- amountInBaseUnits: BigNumber.BigNumber): Promise<void> {
+ amountInBaseUnits: BigNumber.BigNumber): Promise<string> {
assert.isETHAddressHex('ownerAddress', ownerAddress);
assert.isETHAddressHex('tokenAddress', tokenAddress);
assert.isBigNumber('amountInBaseUnits', amountInBaseUnits);
const proxyAddress = await this._getProxyAddressAsync();
- await this.setAllowanceAsync(tokenAddress, ownerAddress, proxyAddress, amountInBaseUnits);
+ const txHash = await this.setAllowanceAsync(tokenAddress, ownerAddress, proxyAddress, amountInBaseUnits);
+ return txHash;
}
/**
* Sets the 0x proxy contract's allowance to a unlimited number of a tokens' baseUnits on behalf
@@ -150,9 +156,13 @@ export class TokenWrapper extends ContractWrapper {
* @param tokenAddress The hex encoded contract Ethereum address where the ERC20 token is deployed.
* @param ownerAddress The hex encoded user Ethereum address who is setting an allowance
* for the Proxy contract.
+ * @return Transaction hash.
*/
- public async setUnlimitedProxyAllowanceAsync(tokenAddress: string, ownerAddress: string): Promise<void> {
- await this.setProxyAllowanceAsync(tokenAddress, ownerAddress, this.UNLIMITED_ALLOWANCE_IN_BASE_UNITS);
+ public async setUnlimitedProxyAllowanceAsync(tokenAddress: string, ownerAddress: string): Promise<string> {
+ const txHash = await this.setProxyAllowanceAsync(
+ tokenAddress, ownerAddress, this.UNLIMITED_ALLOWANCE_IN_BASE_UNITS,
+ );
+ return txHash;
}
/**
* Transfers `amountInBaseUnits` ERC20 tokens from `fromAddress` to `toAddress`.
@@ -160,9 +170,10 @@ export class TokenWrapper extends ContractWrapper {
* @param fromAddress The hex encoded user Ethereum address that will send the funds.
* @param toAddress The hex encoded user Ethereum address that will receive the funds.
* @param amountInBaseUnits The amount (specified in baseUnits) of the token to transfer.
+ * @return Transaction hash.
*/
public async transferAsync(tokenAddress: string, fromAddress: string, toAddress: string,
- amountInBaseUnits: BigNumber.BigNumber): Promise<void> {
+ amountInBaseUnits: BigNumber.BigNumber): Promise<string> {
assert.isETHAddressHex('tokenAddress', tokenAddress);
await assert.isSenderAddressAsync('fromAddress', fromAddress, this._web3Wrapper);
assert.isETHAddressHex('toAddress', toAddress);
@@ -175,9 +186,10 @@ export class TokenWrapper extends ContractWrapper {
throw new Error(ZeroExError.InsufficientBalanceForTransfer);
}
- await tokenContract.transfer(toAddress, amountInBaseUnits, {
+ const txHash = await tokenContract.transfer.sendTransactionAsync(toAddress, amountInBaseUnits, {
from: fromAddress,
});
+ return txHash;
}
/**
* Transfers `amountInBaseUnits` ERC20 tokens from `fromAddress` to `toAddress`.
@@ -190,10 +202,11 @@ export class TokenWrapper extends ContractWrapper {
* `fromAddress` must have set an allowance to the `senderAddress`
* before this call.
* @param amountInBaseUnits The amount (specified in baseUnits) of the token to transfer.
+ * @return Transaction hash.
*/
public async transferFromAsync(tokenAddress: string, fromAddress: string, toAddress: string,
senderAddress: string, amountInBaseUnits: BigNumber.BigNumber):
- Promise<void> {
+ Promise<string> {
assert.isETHAddressHex('tokenAddress', tokenAddress);
assert.isETHAddressHex('fromAddress', fromAddress);
assert.isETHAddressHex('toAddress', toAddress);
@@ -212,9 +225,13 @@ export class TokenWrapper extends ContractWrapper {
throw new Error(ZeroExError.InsufficientBalanceForTransfer);
}
- await tokenContract.transferFrom(fromAddress, toAddress, amountInBaseUnits, {
- from: senderAddress,
- });
+ const txHash = await tokenContract.transferFrom.sendTransactionAsync(
+ fromAddress, toAddress, amountInBaseUnits,
+ {
+ from: senderAddress,
+ },
+ );
+ return txHash;
}
/**
* Subscribe to an event type emitted by the Token contract.
@@ -267,7 +284,9 @@ export class TokenWrapper extends ContractWrapper {
if (!_.isUndefined(tokenContract)) {
return tokenContract;
}
- const contractInstance = await this._instantiateContractIfExistsAsync((TokenArtifacts as any), tokenAddress);
+ const contractInstance = await this._instantiateContractIfExistsAsync<TokenContract>(
+ artifacts.TokenArtifact, tokenAddress,
+ );
tokenContract = contractInstance as TokenContract;
this._tokenContractsByAddress[tokenAddress] = tokenContract;
return tokenContract;
@@ -276,7 +295,7 @@ export class TokenWrapper extends ContractWrapper {
const networkIdIfExists = await this._web3Wrapper.getNetworkIdIfExistsAsync();
const proxyNetworkConfigsIfExists = _.isUndefined(networkIdIfExists) ?
undefined :
- (TokenTransferProxyArtifacts as any).networks[networkIdIfExists];
+ artifacts.TokenTransferProxyArtifact.networks[networkIdIfExists];
if (_.isUndefined(proxyNetworkConfigsIfExists)) {
throw new Error(ZeroExError.ContractNotDeployedOnNetwork);
}
diff --git a/src/globals.d.ts b/src/globals.d.ts
index 9230ab02d..39d0860eb 100644
--- a/src/globals.d.ts
+++ b/src/globals.d.ts
@@ -33,23 +33,11 @@ declare module '*.json' {
/* tslint:enable */
}
-// truffle-contract declarations
-declare interface ContractInstance {
- address: string;
-}
-declare interface ContractFactory {
- setProvider: (providerObj: any) => void;
- deployed: () => ContractInstance;
- // Both any's are Web3.CallData, but I was unable to import it in this file
- defaults: (config: any) => any;
- at: (address: string) => ContractInstance;
-}
declare interface Artifact {
- networks: {[networkId: number]: any};
-}
-declare function contract(artifacts: Artifact): ContractFactory;
-declare module 'truffle-contract' {
- export = contract;
+ abi: any;
+ networks: {[networkId: number]: {
+ address: string;
+ }};
}
// find-version declarations
@@ -81,3 +69,18 @@ declare class HDWalletProvider {
declare module 'truffle-hdwallet-provider' {
export = HDWalletProvider;
}
+
+// abi-decoder declarations
+interface DecodedLogArg {
+ name: string;
+ value: string|BigNumber.BigNumber;
+}
+interface DecodedLog {
+ name: string;
+ events: DecodedLogArg[];
+}
+declare module 'abi-decoder' {
+ import * as Web3 from 'web3';
+ const addABI: (abi: Web3.AbiDefinition) => void;
+ const decodeLogs: (logs: Web3.LogEntry[]) => DecodedLog[];
+}
diff --git a/src/index.ts b/src/index.ts
index 6d6e4484c..00d4730da 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -30,4 +30,7 @@ export {
ContractEventArgs,
Web3Provider,
ZeroExConfig,
+ TransactionReceiptWithDecodedLogs,
+ LogWithDecodedArgs,
+ DecodedLogArgs,
} from './types';
diff --git a/src/types.ts b/src/types.ts
index 2400a9a60..9d3f77127 100644
--- a/src/types.ts
+++ b/src/types.ts
@@ -14,6 +14,7 @@ export enum ZeroExError {
InsufficientWEthBalanceForWithdrawal = 'INSUFFICIENT_WETH_BALANCE_FOR_WITHDRAWAL',
InvalidJump = 'INVALID_JUMP',
OutOfGas = 'OUT_OF_GAS',
+ NoNetworkId = 'NO_NETWORK_ID',
}
/**
@@ -39,137 +40,154 @@ export interface ContractEventObj {
}
export type CreateContractEvent = (indexFilterValues: IndexedFilterValues,
subscriptionOpts: SubscriptionOpts) => ContractEventObj;
-export interface ExchangeContract extends ContractInstance {
+export interface ExchangeContract extends Web3.ContractInstance {
isValidSignature: {
- call: (signerAddressHex: string, dataHex: string, v: number, r: string, s: string,
- txOpts?: TxOpts) => Promise<boolean>;
+ callAsync: (signerAddressHex: string, dataHex: string, v: number, r: string, s: string,
+ txOpts?: TxOpts) => Promise<boolean>;
};
LogFill: CreateContractEvent;
LogCancel: CreateContractEvent;
LogError: CreateContractEvent;
ZRX_TOKEN_CONTRACT: {
- call: () => Promise<string>;
+ callAsync: () => Promise<string>;
};
getUnavailableTakerTokenAmount: {
- call: (orderHash: string) => Promise<BigNumber.BigNumber>;
+ callAsync: (orderHash: string) => Promise<BigNumber.BigNumber>;
};
isRoundingError: {
- call: (fillTakerAmount: BigNumber.BigNumber, takerTokenAmount: BigNumber.BigNumber,
- makerTokenAmount: BigNumber.BigNumber, txOpts?: TxOpts) => Promise<boolean>;
+ callAsync: (fillTakerAmount: BigNumber.BigNumber, takerTokenAmount: BigNumber.BigNumber,
+ makerTokenAmount: BigNumber.BigNumber, txOpts?: TxOpts) => Promise<boolean>;
};
fillOrder: {
- (orderAddresses: OrderAddresses, orderValues: OrderValues, fillTakerTokenAmount: BigNumber.BigNumber,
- shouldThrowOnInsufficientBalanceOrAllowance: boolean,
- v: number, r: string, s: string, txOpts?: TxOpts): Promise<ContractResponse>;
- estimateGas: (orderAddresses: OrderAddresses, orderValues: OrderValues,
- fillTakerTokenAmount: BigNumber.BigNumber,
- shouldThrowOnInsufficientBalanceOrAllowance: boolean,
- v: number, r: string, s: string, txOpts?: TxOpts) => Promise<number>;
+ sendTransactionAsync: (orderAddresses: OrderAddresses, orderValues: OrderValues,
+ fillTakerTokenAmount: BigNumber.BigNumber,
+ shouldThrowOnInsufficientBalanceOrAllowance: boolean,
+ v: number, r: string, s: string, txOpts?: TxOpts) => Promise<string>;
+ estimateGasAsync: (orderAddresses: OrderAddresses, orderValues: OrderValues,
+ fillTakerTokenAmount: BigNumber.BigNumber,
+ shouldThrowOnInsufficientBalanceOrAllowance: boolean,
+ v: number, r: string, s: string, txOpts?: TxOpts) => Promise<number>;
};
batchFillOrders: {
- (orderAddresses: OrderAddresses[], orderValues: OrderValues[], fillTakerTokenAmounts: BigNumber.BigNumber[],
- shouldThrowOnInsufficientBalanceOrAllowance: boolean,
- v: number[], r: string[], s: string[], txOpts?: TxOpts): Promise<ContractResponse>;
- estimateGas: (orderAddresses: OrderAddresses[], orderValues: OrderValues[],
- fillTakerTokenAmounts: BigNumber.BigNumber[],
- shouldThrowOnInsufficientBalanceOrAllowance: boolean,
- v: number[], r: string[], s: string[], txOpts?: TxOpts) => Promise<number>;
+ sendTransactionAsync: (orderAddresses: OrderAddresses[], orderValues: OrderValues[],
+ fillTakerTokenAmounts: BigNumber.BigNumber[],
+ shouldThrowOnInsufficientBalanceOrAllowance: boolean,
+ v: number[], r: string[], s: string[], txOpts?: TxOpts) => Promise<string>;
+ estimateGasAsync: (orderAddresses: OrderAddresses[], orderValues: OrderValues[],
+ fillTakerTokenAmounts: BigNumber.BigNumber[],
+ shouldThrowOnInsufficientBalanceOrAllowance: boolean,
+ v: number[], r: string[], s: string[], txOpts?: TxOpts) => Promise<number>;
};
fillOrdersUpTo: {
- (orderAddresses: OrderAddresses[], orderValues: OrderValues[], fillTakerTokenAmount: BigNumber.BigNumber,
- shouldThrowOnInsufficientBalanceOrAllowance: boolean,
- v: number[], r: string[], s: string[], txOpts?: TxOpts): Promise<ContractResponse>;
- estimateGas: (orderAddresses: OrderAddresses[], orderValues: OrderValues[],
- fillTakerTokenAmount: BigNumber.BigNumber,
- shouldThrowOnInsufficientBalanceOrAllowance: boolean,
- v: number[], r: string[], s: string[], txOpts?: TxOpts) => Promise<number>;
+ sendTransactionAsync: (orderAddresses: OrderAddresses[], orderValues: OrderValues[],
+ fillTakerTokenAmount: BigNumber.BigNumber,
+ shouldThrowOnInsufficientBalanceOrAllowance: boolean,
+ v: number[], r: string[], s: string[], txOpts?: TxOpts) => Promise<string>;
+ estimateGasAsync: (orderAddresses: OrderAddresses[], orderValues: OrderValues[],
+ fillTakerTokenAmount: BigNumber.BigNumber,
+ shouldThrowOnInsufficientBalanceOrAllowance: boolean,
+ v: number[], r: string[], s: string[], txOpts?: TxOpts) => Promise<number>;
};
cancelOrder: {
- (orderAddresses: OrderAddresses, orderValues: OrderValues, cancelTakerTokenAmount: BigNumber.BigNumber,
- txOpts?: TxOpts): Promise<ContractResponse>;
- estimateGas: (orderAddresses: OrderAddresses, orderValues: OrderValues,
- cancelTakerTokenAmount: BigNumber.BigNumber,
- txOpts?: TxOpts) => Promise<number>;
+ sendTransactionAsync: (orderAddresses: OrderAddresses, orderValues: OrderValues,
+ cancelTakerTokenAmount: BigNumber.BigNumber, txOpts?: TxOpts) => Promise<string>;
+ estimateGasAsync: (orderAddresses: OrderAddresses, orderValues: OrderValues,
+ cancelTakerTokenAmount: BigNumber.BigNumber,
+ txOpts?: TxOpts) => Promise<number>;
};
batchCancelOrders: {
- (orderAddresses: OrderAddresses[], orderValues: OrderValues[], cancelTakerTokenAmounts: BigNumber.BigNumber[],
- txOpts?: TxOpts): Promise<ContractResponse>;
- estimateGas: (orderAddresses: OrderAddresses[], orderValues: OrderValues[],
- cancelTakerTokenAmounts: BigNumber.BigNumber[],
- txOpts?: TxOpts) => Promise<number>;
+ sendTransactionAsync: (orderAddresses: OrderAddresses[], orderValues: OrderValues[],
+ cancelTakerTokenAmounts: BigNumber.BigNumber[], txOpts?: TxOpts) => Promise<string>;
+ estimateGasAsync: (orderAddresses: OrderAddresses[], orderValues: OrderValues[],
+ cancelTakerTokenAmounts: BigNumber.BigNumber[],
+ txOpts?: TxOpts) => Promise<number>;
};
fillOrKillOrder: {
- (orderAddresses: OrderAddresses, orderValues: OrderValues, fillTakerTokenAmount: BigNumber.BigNumber,
- v: number, r: string, s: string, txOpts?: TxOpts): Promise<ContractResponse>;
- estimateGas: (orderAddresses: OrderAddresses, orderValues: OrderValues,
- fillTakerTokenAmount: BigNumber.BigNumber,
- v: number, r: string, s: string, txOpts?: TxOpts) => Promise<number>;
+ sendTransactionAsync: (orderAddresses: OrderAddresses, orderValues: OrderValues,
+ fillTakerTokenAmount: BigNumber.BigNumber,
+ v: number, r: string, s: string, txOpts?: TxOpts) => Promise<string>;
+ estimateGasAsync: (orderAddresses: OrderAddresses, orderValues: OrderValues,
+ fillTakerTokenAmount: BigNumber.BigNumber,
+ v: number, r: string, s: string, txOpts?: TxOpts) => Promise<number>;
};
batchFillOrKillOrders: {
- (orderAddresses: OrderAddresses[], orderValues: OrderValues[], fillTakerTokenAmounts: BigNumber.BigNumber[],
- v: number[], r: string[], s: string[], txOpts: TxOpts): Promise<ContractResponse>;
- estimateGas: (orderAddresses: OrderAddresses[], orderValues: OrderValues[],
- fillTakerTokenAmounts: BigNumber.BigNumber[],
- v: number[], r: string[], s: string[], txOpts?: TxOpts) => Promise<number>;
+ sendTransactionAsync: (orderAddresses: OrderAddresses[], orderValues: OrderValues[],
+ fillTakerTokenAmounts: BigNumber.BigNumber[],
+ v: number[], r: string[], s: string[], txOpts: TxOpts) => Promise<string>;
+ estimateGasAsync: (orderAddresses: OrderAddresses[], orderValues: OrderValues[],
+ fillTakerTokenAmounts: BigNumber.BigNumber[],
+ v: number[], r: string[], s: string[], txOpts?: TxOpts) => Promise<number>;
};
filled: {
- call: (orderHash: string) => Promise<BigNumber.BigNumber>;
+ callAsync: (orderHash: string) => Promise<BigNumber.BigNumber>;
};
cancelled: {
- call: (orderHash: string) => Promise<BigNumber.BigNumber>;
+ callAsync: (orderHash: string) => Promise<BigNumber.BigNumber>;
};
getOrderHash: {
- call: (orderAddresses: OrderAddresses, orderValues: OrderValues) => Promise<string>;
+ callAsync: (orderAddresses: OrderAddresses, orderValues: OrderValues) => Promise<string>;
};
}
-export interface TokenContract extends ContractInstance {
+export interface TokenContract extends Web3.ContractInstance {
Transfer: CreateContractEvent;
Approval: CreateContractEvent;
balanceOf: {
- call: (address: string) => Promise<BigNumber.BigNumber>;
+ callAsync: (address: string) => Promise<BigNumber.BigNumber>;
};
allowance: {
- call: (ownerAddress: string, allowedAddress: string) => Promise<BigNumber.BigNumber>;
+ callAsync: (ownerAddress: string, allowedAddress: string) => Promise<BigNumber.BigNumber>;
+ };
+ transfer: {
+ sendTransactionAsync: (toAddress: string, amountInBaseUnits: BigNumber.BigNumber,
+ txOpts?: TxOpts) => Promise<string>;
+ };
+ transferFrom: {
+ sendTransactionAsync: (fromAddress: string, toAddress: string, amountInBaseUnits: BigNumber.BigNumber,
+ txOpts?: TxOpts) => Promise<string>;
+ };
+ approve: {
+ sendTransactionAsync: (proxyAddress: string, amountInBaseUnits: BigNumber.BigNumber,
+ txOpts?: TxOpts) => Promise<string>;
};
- transfer: (toAddress: string, amountInBaseUnits: BigNumber.BigNumber, txOpts?: TxOpts) => Promise<boolean>;
- transferFrom: (fromAddress: string, toAddress: string, amountInBaseUnits: BigNumber.BigNumber,
- txOpts?: TxOpts) => Promise<boolean>;
- approve: (proxyAddress: string, amountInBaseUnits: BigNumber.BigNumber, txOpts?: TxOpts) => Promise<void>;
}
-export interface TokenRegistryContract extends ContractInstance {
+export interface TokenRegistryContract extends Web3.ContractInstance {
getTokenMetaData: {
- call: (address: string) => Promise<TokenMetadata>;
+ callAsync: (address: string) => Promise<TokenMetadata>;
};
getTokenAddresses: {
- call: () => Promise<string[]>;
+ callAsync: () => Promise<string[]>;
};
getTokenAddressBySymbol: {
- call: (symbol: string) => Promise<string>;
+ callAsync: (symbol: string) => Promise<string>;
};
getTokenAddressByName: {
- call: (name: string) => Promise<string>;
+ callAsync: (name: string) => Promise<string>;
};
getTokenBySymbol: {
- call: (symbol: string) => Promise<TokenMetadata>;
+ callAsync: (symbol: string) => Promise<TokenMetadata>;
};
getTokenByName: {
- call: (name: string) => Promise<TokenMetadata>;
+ callAsync: (name: string) => Promise<TokenMetadata>;
};
}
-export interface EtherTokenContract extends ContractInstance {
- deposit: (txOpts: TxOpts) => Promise<void>;
- withdraw: (amount: BigNumber.BigNumber, txOpts: TxOpts) => Promise<void>;
+export interface EtherTokenContract extends Web3.ContractInstance {
+ deposit: {
+ sendTransactionAsync: (txOpts: TxOpts) => Promise<string>;
+ };
+ withdraw: {
+ sendTransactionAsync: (amount: BigNumber.BigNumber, txOpts: TxOpts) => Promise<string>;
+ };
}
-export interface TokenTransferProxyContract extends ContractInstance {
+export interface TokenTransferProxyContract extends Web3.ContractInstance {
getAuthorizedAddresses: {
- call: () => Promise<string[]>;
+ callAsync: () => Promise<string[]>;
};
authorized: {
- call: (address: string) => Promise<boolean>;
+ callAsync: (address: string) => Promise<boolean>;
};
}
@@ -209,10 +227,7 @@ export enum ExchangeContractErrs {
InsufficientRemainingFillAmount = 'INSUFFICIENT_REMAINING_FILL_AMOUNT',
MultipleTakerTokensInFillUpToDisallowed = 'MULTIPLE_TAKER_TOKENS_IN_FILL_UP_TO_DISALLOWED',
BatchOrdersMustHaveSameExchangeAddress = 'BATCH_ORDERS_MUST_HAVE_SAME_EXCHANGE_ADDRESS',
-}
-
-export interface ContractResponse {
- logs: ContractEvent[];
+ BatchOrdersMustHaveAtLeastOneItem = 'BATCH_ORDERS_MUST_HAVE_AT_LEAST_ONE_ITEM',
}
export interface ContractEvent {
@@ -349,14 +364,6 @@ export interface OrderFillRequest {
export type AsyncMethod = (...args: any[]) => Promise<any>;
-export interface ContractInstance {
- address: string;
-}
-
-export interface Artifact {
- networks: {[networkId: number]: any};
-}
-
export interface ContractEventEmitter {
watch: (eventCallback: EventCallback) => void;
stopWatchingAsync: () => Promise<void>;
@@ -373,14 +380,6 @@ export interface ExchangeContractByAddress {
[address: string]: ExchangeContract;
}
-export interface ContractArtifact {
- networks: {
- [networkId: number]: {
- address: string;
- };
- };
-}
-
export interface JSONRPCPayload {
params: any[];
method: string;
@@ -389,3 +388,25 @@ export interface JSONRPCPayload {
export interface ZeroExConfig {
gasPrice?: BigNumber.BigNumber; // Gas price to use with every transaction
}
+
+export type TransactionReceipt = Web3.TransactionReceipt;
+
+export enum AbiType {
+ Function = 'function',
+ Constructor = 'constructor',
+ Event = 'event',
+ Fallback = 'fallback',
+}
+
+export interface DecodedLogArgs {
+ [argName: string]: ContractEventArg;
+}
+
+export interface LogWithDecodedArgs extends Web3.LogEntry {
+ args: DecodedLogArgs;
+ event: string;
+}
+
+export interface TransactionReceiptWithDecodedLogs extends Web3.TransactionReceipt {
+ logs: LogWithDecodedArgs[];
+}
diff --git a/src/web3_wrapper.ts b/src/web3_wrapper.ts
index 61bac45c9..7b9a28a7d 100644
--- a/src/web3_wrapper.ts
+++ b/src/web3_wrapper.ts
@@ -2,13 +2,17 @@ import * as _ from 'lodash';
import * as Web3 from 'web3';
import * as BigNumber from 'bignumber.js';
import promisify = require('es6-promisify');
+import {ZeroExError} from './types';
+import {Contract} from './contract';
export class Web3Wrapper {
private web3: Web3;
+ private defaults: Partial<Web3.TxData>;
private networkIdIfExists?: number;
- constructor(provider: Web3.Provider) {
+ constructor(provider: Web3.Provider, defaults: Partial<Web3.TxData>) {
this.web3 = new Web3();
this.web3.setProvider(provider);
+ this.defaults = defaults;
}
public setProvider(provider: Web3.Provider) {
delete this.networkIdIfExists;
@@ -25,6 +29,10 @@ export class Web3Wrapper {
const nodeVersion = await promisify(this.web3.version.getNode)();
return nodeVersion;
}
+ public async getTransactionReceiptAsync(txHash: string): Promise<Web3.TransactionReceipt> {
+ const transactionReceipt = await promisify(this.web3.eth.getTransactionReceipt)(txHash);
+ return transactionReceipt;
+ }
public getCurrentProvider(): Web3.Provider {
return this.web3.currentProvider;
}
@@ -41,6 +49,30 @@ export class Web3Wrapper {
return undefined;
}
}
+ public async getContractInstanceFromArtifactAsync<A extends Web3.ContractInstance>(artifact: Artifact,
+ address?: string): Promise<A> {
+ let contractAddress: string;
+ if (_.isUndefined(address)) {
+ const networkIdIfExists = await this.getNetworkIdIfExistsAsync();
+ if (_.isUndefined(networkIdIfExists)) {
+ throw new Error(ZeroExError.NoNetworkId);
+ }
+ if (_.isUndefined(artifact.networks[networkIdIfExists])) {
+ throw new Error(ZeroExError.ContractNotDeployedOnNetwork);
+ }
+ contractAddress = artifact.networks[networkIdIfExists].address.toLowerCase();
+ } else {
+ contractAddress = address;
+ }
+ const doesContractExist = await this.doesContractExistAtAddressAsync(contractAddress);
+ if (!doesContractExist) {
+ throw new Error(ZeroExError.ContractDoesNotExist);
+ }
+ const contractInstance = this.getContractInstance<A>(
+ artifact.abi, contractAddress,
+ );
+ return contractInstance;
+ }
public toWei(ethAmount: BigNumber.BigNumber): BigNumber.BigNumber {
const balanceWei = this.web3.toWei(ethAmount, 'ether');
return balanceWei;
@@ -68,6 +100,11 @@ export class Web3Wrapper {
const addresses: string[] = await promisify(this.web3.eth.getAccounts)();
return addresses;
}
+ private getContractInstance<A extends Web3.ContractInstance>(abi: Web3.ContractAbi, address: string): A {
+ const web3ContractInstance = this.web3.eth.contract(abi).at(address);
+ const contractInstance = new Contract(web3ContractInstance, this.defaults) as any as A;
+ return contractInstance;
+ }
private async getNetworkAsync(): Promise<number> {
const networkId = await promisify(this.web3.version.getNetwork)();
return networkId;
diff --git a/test/0x.js_test.ts b/test/0x.js_test.ts
index 2b4e80ea3..c453b8dab 100644
--- a/test/0x.js_test.ts
+++ b/test/0x.js_test.ts
@@ -6,8 +6,11 @@ import * as BigNumber from 'bignumber.js';
import * as Sinon from 'sinon';
import {ZeroEx, Order} from '../src';
import {constants} from './utils/constants';
+import {TokenUtils} from './utils/token_utils';
import {web3Factory} from './utils/web3_factory';
+import {BlockchainLifecycle} from './utils/blockchain_lifecycle';
+const blockchainLifecycle = new BlockchainLifecycle();
chaiSetup.configure();
const expect = chai.expect;
@@ -204,4 +207,29 @@ describe('ZeroEx library', () => {
expect(ecSignature).to.deep.equal(expectedECSignature);
});
});
+ describe('#awaitTransactionMinedAsync', () => {
+ beforeEach(async () => {
+ await blockchainLifecycle.startAsync();
+ });
+ afterEach(async () => {
+ await blockchainLifecycle.revertAsync();
+ });
+ it('returns transaction receipt with decoded logs', async () => {
+ const availableAddresses = await zeroEx.getAvailableAddressesAsync();
+ const coinbase = availableAddresses[0];
+ const tokens = await zeroEx.tokenRegistry.getTokensAsync();
+ const tokenUtils = new TokenUtils(tokens);
+ const zrxTokenAddress = tokenUtils.getProtocolTokenOrThrow().address;
+ const proxyAddress = await zeroEx.proxy.getContractAddressAsync();
+ const txHash = await zeroEx.token.setUnlimitedProxyAllowanceAsync(zrxTokenAddress, coinbase);
+ const txReceiptWithDecodedLogs = await zeroEx.awaitTransactionMinedAsync(txHash);
+ const log = txReceiptWithDecodedLogs.logs[0];
+ expect(log.event).to.be.equal('Approval');
+ expect(log.args).to.be.deep.equal({
+ _owner: coinbase,
+ _spender: proxyAddress,
+ _value: zeroEx.token.UNLIMITED_ALLOWANCE_IN_BASE_UNITS.toString(),
+ });
+ });
+ });
});
diff --git a/test/ether_token_wrapper_test.ts b/test/ether_token_wrapper_test.ts
index 601800cd1..f50aac48b 100644
--- a/test/ether_token_wrapper_test.ts
+++ b/test/ether_token_wrapper_test.ts
@@ -52,7 +52,8 @@ describe('EtherTokenWrapper', () => {
expect(preETHBalance).to.be.bignumber.gt(0);
expect(preWETHBalance).to.be.bignumber.equal(0);
- await zeroEx.etherToken.depositAsync(depositWeiAmount, addressWithETH);
+ const txHash = await zeroEx.etherToken.depositAsync(depositWeiAmount, addressWithETH);
+ await zeroEx.awaitTransactionMinedAsync(txHash);
const postETHBalanceInWei = await (zeroEx as any)._web3Wrapper.getBalanceInWeiAsync(addressWithETH);
const postWETHBalanceInBaseUnits = await zeroEx.token.getBalanceAsync(wethContractAddress, addressWithETH);
@@ -86,7 +87,8 @@ describe('EtherTokenWrapper', () => {
expect(gasCost).to.be.bignumber.lte(MAX_REASONABLE_GAS_COST_IN_WEI);
expect(preWETHBalance).to.be.bignumber.equal(depositWeiAmount);
- await zeroEx.etherToken.withdrawAsync(depositWeiAmount, addressWithETH);
+ const txHash = await zeroEx.etherToken.withdrawAsync(depositWeiAmount, addressWithETH);
+ await zeroEx.awaitTransactionMinedAsync(txHash);
const postETHBalance = await (zeroEx as any)._web3Wrapper.getBalanceInWeiAsync(addressWithETH);
const postWETHBalanceInBaseUnits = await zeroEx.token.getBalanceAsync(wethContractAddress, addressWithETH);
diff --git a/test/exchange_wrapper_test.ts b/test/exchange_wrapper_test.ts
index 90ac37387..f72e7f64f 100644
--- a/test/exchange_wrapper_test.ts
+++ b/test/exchange_wrapper_test.ts
@@ -169,8 +169,9 @@ describe('ExchangeWrapper', () => {
.to.be.bignumber.equal(0);
expect(await zeroEx.token.getBalanceAsync(takerTokenAddress, takerAddress))
.to.be.bignumber.equal(fillableAmount);
- await zeroEx.exchange.fillOrderAsync(
+ const txHash = await zeroEx.exchange.fillOrderAsync(
signedOrder, fillTakerAmount, shouldThrowOnInsufficientBalanceOrAllowance, takerAddress);
+ await zeroEx.awaitTransactionMinedAsync(txHash);
expect(await zeroEx.token.getBalanceAsync(makerTokenAddress, makerAddress))
.to.be.bignumber.equal(fillableAmount.minus(fillTakerAmount));
expect(await zeroEx.token.getBalanceAsync(takerTokenAddress, makerAddress))
@@ -185,8 +186,9 @@ describe('ExchangeWrapper', () => {
makerTokenAddress, takerTokenAddress, makerAddress, takerAddress, fillableAmount,
);
const partialFillAmount = new BigNumber(3);
- await zeroEx.exchange.fillOrderAsync(
+ const txHash = await zeroEx.exchange.fillOrderAsync(
signedOrder, partialFillAmount, shouldThrowOnInsufficientBalanceOrAllowance, takerAddress);
+ await zeroEx.awaitTransactionMinedAsync(txHash);
expect(await zeroEx.token.getBalanceAsync(makerTokenAddress, makerAddress))
.to.be.bignumber.equal(fillableAmount.minus(partialFillAmount));
expect(await zeroEx.token.getBalanceAsync(takerTokenAddress, makerAddress))
@@ -196,34 +198,6 @@ describe('ExchangeWrapper', () => {
expect(await zeroEx.token.getBalanceAsync(takerTokenAddress, takerAddress))
.to.be.bignumber.equal(fillableAmount.minus(partialFillAmount));
});
- it('should return filled amount', async () => {
- const signedOrder = await fillScenarios.createFillableSignedOrderAsync(
- makerTokenAddress, takerTokenAddress, makerAddress, takerAddress, fillableAmount,
- );
- const partialFillAmount = new BigNumber(3);
- const filledAmount = await zeroEx.exchange.fillOrderAsync(
- signedOrder, partialFillAmount, shouldThrowOnInsufficientBalanceOrAllowance, takerAddress);
- expect(filledAmount).to.be.bignumber.equal(partialFillAmount);
- });
- it('should return the partially filled amount \
- if the fill amount specified is greater then the amount available', async () => {
- const signedOrder = await fillScenarios.createFillableSignedOrderAsync(
- makerTokenAddress, takerTokenAddress, makerAddress, takerAddress, fillableAmount,
- );
- const partialFillAmount = new BigNumber(3);
- await zeroEx.exchange.fillOrderAsync(
- signedOrder, partialFillAmount, shouldThrowOnInsufficientBalanceOrAllowance, takerAddress);
- const missingBalance = new BigNumber(1);
- const totalBalance = partialFillAmount.plus(missingBalance);
- await zeroEx.token.transferAsync(takerTokenAddress, coinbase, takerAddress, missingBalance);
- await zeroEx.token.setProxyAllowanceAsync(takerTokenAddress, takerAddress, totalBalance);
- await zeroEx.token.transferAsync(makerTokenAddress, coinbase, makerAddress, missingBalance);
- await zeroEx.token.setProxyAllowanceAsync(makerTokenAddress, makerAddress, totalBalance);
- const remainingFillAmount = fillableAmount.minus(partialFillAmount);
- const filledAmount = await zeroEx.exchange.fillOrderAsync(
- signedOrder, partialFillAmount, shouldThrowOnInsufficientBalanceOrAllowance, takerAddress);
- expect(filledAmount).to.be.bignumber.equal(remainingFillAmount);
- });
it('should fill the valid orders with fees', async () => {
const makerFee = new BigNumber(1);
const takerFee = new BigNumber(2);
@@ -231,8 +205,9 @@ describe('ExchangeWrapper', () => {
makerTokenAddress, takerTokenAddress, makerFee, takerFee,
makerAddress, takerAddress, fillableAmount, feeRecipient,
);
- await zeroEx.exchange.fillOrderAsync(
+ const txHash = await zeroEx.exchange.fillOrderAsync(
signedOrder, fillTakerAmount, shouldThrowOnInsufficientBalanceOrAllowance, takerAddress);
+ await zeroEx.awaitTransactionMinedAsync(txHash);
expect(await zeroEx.token.getBalanceAsync(zrxTokenAddress, feeRecipient))
.to.be.bignumber.equal(makerFee.plus(takerFee));
});
@@ -265,13 +240,15 @@ describe('ExchangeWrapper', () => {
];
});
describe('successful batch fills', () => {
- it('should no-op for an empty batch', async () => {
- await zeroEx.exchange.batchFillOrdersAsync(
- [], shouldThrowOnInsufficientBalanceOrAllowance, takerAddress);
+ it('should throw if a batch is empty', async () => {
+ return expect(zeroEx.exchange.batchFillOrdersAsync(
+ [], shouldThrowOnInsufficientBalanceOrAllowance, takerAddress),
+ ).to.be.rejectedWith(ExchangeContractErrs.BatchOrdersMustHaveAtLeastOneItem);
});
it('should successfully fill multiple orders', async () => {
- await zeroEx.exchange.batchFillOrdersAsync(
+ const txHash = await zeroEx.exchange.batchFillOrdersAsync(
orderFillBatch, shouldThrowOnInsufficientBalanceOrAllowance, takerAddress);
+ await zeroEx.awaitTransactionMinedAsync(txHash);
const filledAmount = await zeroEx.exchange.getFilledTakerAmountAsync(signedOrderHashHex);
const anotherFilledAmount = await zeroEx.exchange.getFilledTakerAmountAsync(anotherOrderHashHex);
expect(filledAmount).to.be.bignumber.equal(fillTakerAmount);
@@ -298,26 +275,22 @@ describe('ExchangeWrapper', () => {
signedOrders = [signedOrder, anotherSignedOrder];
});
describe('successful batch fills', () => {
- it('should no-op for an empty batch', async () => {
- await zeroEx.exchange.fillOrdersUpToAsync(
- [], fillUpToAmount, shouldThrowOnInsufficientBalanceOrAllowance, takerAddress);
+ it('should throw if a batch is empty', async () => {
+ return expect(zeroEx.exchange.fillOrdersUpToAsync(
+ [], fillUpToAmount, shouldThrowOnInsufficientBalanceOrAllowance, takerAddress),
+ ).to.be.rejectedWith(ExchangeContractErrs.BatchOrdersMustHaveAtLeastOneItem);
});
it('should successfully fill up to specified amount', async () => {
- await zeroEx.exchange.fillOrdersUpToAsync(
+ const txHash = await zeroEx.exchange.fillOrdersUpToAsync(
signedOrders, fillUpToAmount, shouldThrowOnInsufficientBalanceOrAllowance, takerAddress,
);
+ await zeroEx.awaitTransactionMinedAsync(txHash);
const filledAmount = await zeroEx.exchange.getFilledTakerAmountAsync(signedOrderHashHex);
const anotherFilledAmount = await zeroEx.exchange.getFilledTakerAmountAsync(anotherOrderHashHex);
expect(filledAmount).to.be.bignumber.equal(fillableAmount);
const remainingFillAmount = fillableAmount.minus(1);
expect(anotherFilledAmount).to.be.bignumber.equal(remainingFillAmount);
});
- it('should return filled amount', async () => {
- const filledTakerTokenAmount = await zeroEx.exchange.fillOrdersUpToAsync(
- signedOrders, fillUpToAmount, shouldThrowOnInsufficientBalanceOrAllowance, takerAddress,
- );
- expect(filledTakerTokenAmount).to.be.bignumber.equal(fillUpToAmount);
- });
});
});
});
@@ -344,14 +317,11 @@ describe('ExchangeWrapper', () => {
describe('#cancelOrderAsync', () => {
describe('successful cancels', () => {
it('should cancel an order', async () => {
- await zeroEx.exchange.cancelOrderAsync(signedOrder, cancelAmount);
+ const txHash = await zeroEx.exchange.cancelOrderAsync(signedOrder, cancelAmount);
+ await zeroEx.awaitTransactionMinedAsync(txHash);
const cancelledAmount = await zeroEx.exchange.getCanceledTakerAmountAsync(orderHashHex);
expect(cancelledAmount).to.be.bignumber.equal(cancelAmount);
});
- it('should return cancelled amount', async () => {
- const cancelledAmount = await zeroEx.exchange.cancelOrderAsync(signedOrder, cancelAmount);
- expect(cancelledAmount).to.be.bignumber.equal(cancelAmount);
- });
});
});
describe('#batchCancelOrdersAsync', () => {
diff --git a/test/token_wrapper_test.ts b/test/token_wrapper_test.ts
index 88833e612..68dca0769 100644
--- a/test/token_wrapper_test.ts
+++ b/test/token_wrapper_test.ts
@@ -58,7 +58,8 @@ describe('TokenWrapper', () => {
const toAddress = addressWithoutFunds;
const preBalance = await zeroEx.token.getBalanceAsync(token.address, toAddress);
expect(preBalance).to.be.bignumber.equal(0);
- await zeroEx.token.transferAsync(token.address, fromAddress, toAddress, transferAmount);
+ const txHash = await zeroEx.token.transferAsync(token.address, fromAddress, toAddress, transferAmount);
+ await zeroEx.awaitTransactionMinedAsync(txHash);
const postBalance = await zeroEx.token.getBalanceAsync(token.address, toAddress);
return expect(postBalance).to.be.bignumber.equal(transferAmount);
});
@@ -356,7 +357,7 @@ describe('TokenWrapper', () => {
// we do need both. A hack is to make the top-level a sync fn w/ a done callback and then
// wrap the rest of the test in an async block
// Source: https://github.com/mochajs/mocha/issues/2407
- it('Should receive the Transfer event when an order is filled', (done: DoneCallback) => {
+ it('Should receive the Transfer event when tokens are transfered', (done: DoneCallback) => {
(async () => {
const zeroExEvent = await zeroEx.token.subscribeAsync(
tokenAddress, TokenEvents.Transfer, subscriptionOpts, indexFilterValues);
@@ -372,7 +373,7 @@ describe('TokenWrapper', () => {
await zeroEx.token.transferAsync(tokenAddress, coinbase, addressWithoutFunds, transferAmount);
})().catch(done);
});
- it('Should receive the Approval event when an order is cancelled', (done: DoneCallback) => {
+ it('Should receive the Approval event when allowance is being set', (done: DoneCallback) => {
(async () => {
const zeroExEvent = await zeroEx.token.subscribeAsync(
tokenAddress, TokenEvents.Approval, subscriptionOpts, indexFilterValues);
diff --git a/test/utils/web3_factory.ts b/test/utils/web3_factory.ts
index 4785fa858..b20070c74 100644
--- a/test/utils/web3_factory.ts
+++ b/test/utils/web3_factory.ts
@@ -6,7 +6,6 @@
import ProviderEngine = require('web3-provider-engine');
import RpcSubprovider = require('web3-provider-engine/subproviders/rpc');
import * as Web3 from 'web3';
-import * as Web3_beta from 'web3_beta';
import {constants} from './constants';
import {EmptyWalletSubProvider} from '../../src/subproviders/empty_wallet_subprovider';
@@ -29,9 +28,4 @@ export const web3Factory = {
provider.start();
return provider;
},
- getProviderBeta(): Web3.Provider {
- const rpcUrl = `http://${constants.RPC_HOST}:${constants.RPC_PORT}`;
- const providerBeta = new Web3_beta.providers.HttpProvider(rpcUrl);
- return providerBeta;
- },
};
diff --git a/test/web3_beta_test.ts b/test/web3_beta_test.ts
deleted file mode 100644
index e34812243..000000000
--- a/test/web3_beta_test.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-import * as chai from 'chai';
-import {chaiSetup} from './utils/chai_setup';
-import 'mocha';
-import {ZeroEx, Order, SubscriptionOpts, TokenEvents, ContractEvent} from '../src';
-import {web3Factory} from './utils/web3_factory';
-
-chaiSetup.configure();
-const expect = chai.expect;
-
-describe('ZeroEx with beta web3', () => {
- const web3_beta_provider = web3Factory.getProviderBeta();
- const zeroEx = new ZeroEx(web3_beta_provider);
- it('is able to make a call using a beta provider', async () => {
- await zeroEx.tokenRegistry.getTokenAddressesAsync();
- });
-});
diff --git a/yarn.lock b/yarn.lock
index 84699dd1a..d558a8243 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -2,9 +2,9 @@
# yarn lockfile v1
-"0x-json-schemas@^0.3.0":
- version "0.3.0"
- resolved "https://registry.yarnpkg.com/0x-json-schemas/-/0x-json-schemas-0.3.0.tgz#88d67cfc7fe34697a43a3a72f47f958f1f681d0b"
+"0x-json-schemas@^0.5.1":
+ version "0.5.1"
+ resolved "https://registry.yarnpkg.com/0x-json-schemas/-/0x-json-schemas-0.5.1.tgz#fce6c2962e44930884a838e01f5b605ddd217686"
dependencies:
jsonschema "^1.2.0"
@@ -62,17 +62,24 @@
version "2.3.2"
resolved "https://registry.yarnpkg.com/@types/sinon/-/sinon-2.3.2.tgz#1e1e99e67162d78e2db17816892bf93bf5209885"
-JSONStream@^1.0.4:
- version "1.3.1"
- resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.1.tgz#707f761e01dae9e16f1bcf93703b78c70966579a"
- dependencies:
- jsonparse "^1.2.0"
- through ">=2.2.7 <3"
-
abbrev@1:
version "1.1.0"
resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.0.tgz#d0554c2256636e2f56e7c2e5ad183f859428d81f"
+abi-decoder@^1.0.8:
+ version "1.0.8"
+ resolved "https://registry.yarnpkg.com/abi-decoder/-/abi-decoder-1.0.8.tgz#7794d864c4b3fd8bab600bdd445ceb01d333ea43"
+ dependencies:
+ babel-core "^6.23.1"
+ babel-loader "^6.3.2"
+ babel-plugin-add-module-exports "^0.2.1"
+ babel-plugin-transform-es2015-modules-amd "^6.22.0"
+ babel-preset-es2015 "^6.22.0"
+ chai "^3.5.0"
+ mocha "^3.2.0"
+ web3 "^0.18.4"
+ webpack "^2.2.1"
+
abstract-leveldown@2.4.1, abstract-leveldown@~2.4.0:
version "2.4.1"
resolved "https://registry.yarnpkg.com/abstract-leveldown/-/abstract-leveldown-2.4.1.tgz#b3bfedb884eb693a12775f0c55e9f0a420ccee64"
@@ -93,19 +100,19 @@ acorn@^5.0.0:
version "5.1.1"
resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.1.1.tgz#53fe161111f912ab999ee887a90a0bc52822fd75"
-add-stream@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/add-stream/-/add-stream-1.0.0.tgz#6a7990437ca736d5e1288db92bd3266d5f5cb2aa"
-
aes-js@^0.2.3:
version "0.2.4"
resolved "https://registry.yarnpkg.com/aes-js/-/aes-js-0.2.4.tgz#94b881ab717286d015fa219e08fb66709dda5a3d"
+ajv-keywords@^1.1.1:
+ version "1.5.1"
+ resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-1.5.1.tgz#314dd0a4b3368fad3dfcdc54ede6171b886daf3c"
+
ajv-keywords@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-2.1.0.tgz#a296e17f7bfae7c1ce4f7e0de53d29cb32162df0"
-ajv@^4.9.1:
+ajv@^4.7.0, ajv@^4.9.1:
version "4.11.8"
resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.8.tgz#82ffb02b29e662ae53bdc20af15947706739c536"
dependencies:
@@ -133,10 +140,6 @@ amdefine@>=0.0.4:
version "1.0.1"
resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5"
-ansi-escapes@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-2.0.0.tgz#5bae52be424878dd9783e8910e3fc2922e83c81b"
-
ansi-regex@^1.0.0, ansi-regex@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-1.1.1.tgz#41c847194646375e6a1a5d10c3ca054ef9fc980d"
@@ -153,12 +156,6 @@ ansi-styles@^2.2.1:
version "2.2.1"
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe"
-ansi-styles@^3.1.0:
- version "3.2.0"
- resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.0.tgz#c159b8d5be0f9e5a6f346dab94f16ce022161b88"
- dependencies:
- color-convert "^1.9.0"
-
anymatch@^1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-1.3.0.tgz#a3e52fa39168c825ff57b0248126ce5a8ff95507"
@@ -219,10 +216,6 @@ array-find-index@^1.0.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/array-find-index/-/array-find-index-1.0.2.tgz#df010aa1287e164bbda6f9723b0a96a1ec4187a1"
-array-ify@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/array-ify/-/array-ify-1.0.0.tgz#9e528762b4a9066ad163a6962a364418e9626ece"
-
array-map@~0.0.0:
version "0.0.0"
resolved "https://registry.yarnpkg.com/array-map/-/array-map-0.0.0.tgz#88a2bab73d1cf7bcd5c1b118a003f66f665fa662"
@@ -231,13 +224,7 @@ array-reduce@~0.0.0:
version "0.0.0"
resolved "https://registry.yarnpkg.com/array-reduce/-/array-reduce-0.0.0.tgz#173899d3ffd1c7d9383e4479525dbe278cab5f2b"
-array-union@^1.0.1:
- version "1.0.2"
- resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39"
- dependencies:
- array-uniq "^1.0.1"
-
-array-uniq@^1.0.0, array-uniq@^1.0.1:
+array-uniq@^1.0.0:
version "1.0.3"
resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6"
@@ -297,7 +284,7 @@ async@^0.9.0:
version "0.9.2"
resolved "https://registry.yarnpkg.com/async/-/async-0.9.2.tgz#aea74d5e61c1f899613bf64bda66d4c78f2fd17d"
-async@^1.4.0, async@^1.4.2, async@^1.5.0:
+async@^1.4.0, async@^1.4.2:
version "1.5.2"
resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a"
@@ -344,7 +331,7 @@ babel-code-frame@^6.22.0:
esutils "^2.0.2"
js-tokens "^3.0.0"
-babel-core@^6.0.14, babel-core@^6.24.1:
+babel-core@^6.0.14, babel-core@^6.23.1, babel-core@^6.24.1:
version "6.25.0"
resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.25.0.tgz#7dd42b0463c742e9d5296deb3ec67a9322dad729"
dependencies:
@@ -456,12 +443,25 @@ babel-helpers@^6.24.1:
babel-runtime "^6.22.0"
babel-template "^6.24.1"
+babel-loader@^6.3.2:
+ version "6.4.1"
+ resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-6.4.1.tgz#0b34112d5b0748a8dcdbf51acf6f9bd42d50b8ca"
+ dependencies:
+ find-cache-dir "^0.1.1"
+ loader-utils "^0.2.16"
+ mkdirp "^0.5.1"
+ object-assign "^4.0.1"
+
babel-messages@^6.23.0:
version "6.23.0"
resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e"
dependencies:
babel-runtime "^6.22.0"
+babel-plugin-add-module-exports@^0.2.1:
+ version "0.2.1"
+ resolved "https://registry.yarnpkg.com/babel-plugin-add-module-exports/-/babel-plugin-add-module-exports-0.2.1.tgz#9ae9a1f4a8dc67f0cdec4f4aeda1e43a5ff65e25"
+
babel-plugin-check-es2015-constants@^6.22.0:
version "6.22.0"
resolved "https://registry.yarnpkg.com/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz#35157b101426fd2ffd3da3f75c7d1e91835bbf8a"
@@ -544,7 +544,7 @@ babel-plugin-transform-es2015-literals@^6.22.0:
dependencies:
babel-runtime "^6.22.0"
-babel-plugin-transform-es2015-modules-amd@^6.24.1:
+babel-plugin-transform-es2015-modules-amd@^6.22.0, babel-plugin-transform-es2015-modules-amd@^6.24.1:
version "6.24.1"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.24.1.tgz#3b3e54017239842d6d19c3011c4bd2f00a00d154"
dependencies:
@@ -649,7 +649,7 @@ babel-plugin-transform-strict-mode@^6.24.1:
babel-runtime "^6.22.0"
babel-types "^6.24.1"
-babel-preset-es2015@^6.24.0:
+babel-preset-es2015@^6.22.0, babel-preset-es2015@^6.24.0:
version "6.24.1"
resolved "https://registry.yarnpkg.com/babel-preset-es2015/-/babel-preset-es2015-6.24.1.tgz#d44050d6bc2c9feea702aaf38d727a0210538939"
dependencies:
@@ -835,10 +835,6 @@ block-stream@*:
dependencies:
inherits "~2.0.0"
-bn.js@4.11.6:
- version "4.11.6"
- resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.6.tgz#53344adb14617a13f6e8dd2ce28905d1c0ba3215"
-
bn.js@4.11.7, bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.10.0, bn.js@^4.11.3, bn.js@^4.11.7, bn.js@^4.4.0, bn.js@^4.8.0:
version "4.11.7"
resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.7.tgz#ddb048e50d9482790094c13eb3fcfc833ce7ab46"
@@ -989,10 +985,6 @@ builtin-status-codes@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8"
-byline@^5.0.0:
- version "5.0.0"
- resolved "https://registry.yarnpkg.com/byline/-/byline-5.0.0.tgz#741c5216468eadc457b03410118ad77de8c1ddb1"
-
cache-base@^0.8.4:
version "0.8.5"
resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-0.8.5.tgz#60ceb3504021eceec7011fd3384b7f4e95729bfa"
@@ -1074,6 +1066,14 @@ chai-typescript-typings@^0.0.0:
version "0.0.0"
resolved "https://registry.yarnpkg.com/chai-typescript-typings/-/chai-typescript-typings-0.0.0.tgz#52e076d72cf29129c94ab1dba6e33ce3828a0724"
+chai@^3.5.0:
+ version "3.5.0"
+ resolved "https://registry.yarnpkg.com/chai/-/chai-3.5.0.tgz#4d02637b067fe958bdbfdd3a40ec56fef7373247"
+ dependencies:
+ assertion-error "^1.0.1"
+ deep-eql "^0.1.3"
+ type-detect "^1.0.0"
+
chai@^4.0.1:
version "4.0.2"
resolved "https://registry.yarnpkg.com/chai/-/chai-4.0.2.tgz#2f7327c4de6f385dd7787999e2ab02697a32b83b"
@@ -1095,14 +1095,6 @@ chalk@^1.0.0, chalk@^1.1.0, chalk@^1.1.1, chalk@^1.1.3:
strip-ansi "^3.0.0"
supports-color "^2.0.0"
-chalk@^2.0.0, chalk@^2.1.0:
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.1.0.tgz#ac5becf14fa21b99c6c92ca7a7d7cfd5b17e743e"
- dependencies:
- ansi-styles "^3.1.0"
- escape-string-regexp "^1.0.5"
- supports-color "^4.0.0"
-
check-error@^1.0.1, check-error@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82"
@@ -1132,10 +1124,6 @@ chownr@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.0.1.tgz#e2a75042a9551908bebd25b8523d5f9769d79181"
-ci-info@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-1.0.0.tgz#dc5285f2b4e251821683681c381c3388f46ec534"
-
cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3:
version "1.0.4"
resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de"
@@ -1153,20 +1141,10 @@ class-utils@^0.3.4:
lazy-cache "^2.0.2"
static-extend "^0.1.1"
-cli-cursor@^2.1.0:
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5"
- dependencies:
- restore-cursor "^2.0.0"
-
cli-width@^1.0.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-1.1.1.tgz#a4d293ef67ebb7b88d4a4d42c0ccf00c4d1e366d"
-cli-width@^2.0.0:
- version "2.2.0"
- resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.0.tgz#ff19ede8a9a5e579324147b0c11f0fbcbabed639"
-
cliui@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1"
@@ -1183,21 +1161,10 @@ cliui@^3.2.0:
strip-ansi "^3.0.1"
wrap-ansi "^2.0.0"
-clone@^1.0.2:
- version "1.0.2"
- resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.2.tgz#260b7a99ebb1edfe247538175f783243cb19d149"
-
clone@^2.0.0:
version "2.1.1"
resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.1.tgz#d217d1e961118e3ac9a4b8bba3285553bf647cdb"
-cmd-shim@^2.0.2:
- version "2.0.2"
- resolved "https://registry.yarnpkg.com/cmd-shim/-/cmd-shim-2.0.2.tgz#6fcbda99483a8fd15d7d30a196ca69d688a2efdb"
- dependencies:
- graceful-fs "^4.1.2"
- mkdirp "~0.5.0"
-
co@^4.6.0:
version "4.6.0"
resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184"
@@ -1221,37 +1188,16 @@ collection-visit@^0.2.1:
map-visit "^0.1.5"
object-visit "^0.3.4"
-color-convert@^1.9.0:
- version "1.9.0"
- resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.0.tgz#1accf97dd739b983bf994d56fec8f95853641b7a"
- dependencies:
- color-name "^1.1.1"
-
-color-name@^1.1.1:
- version "1.1.3"
- resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25"
-
colors@^1.1.2:
version "1.1.2"
resolved "https://registry.yarnpkg.com/colors/-/colors-1.1.2.tgz#168a4701756b6a7f51a12ce0c97bfa28c084ed63"
-columnify@^1.5.4:
- version "1.5.4"
- resolved "https://registry.yarnpkg.com/columnify/-/columnify-1.5.4.tgz#4737ddf1c7b69a8a7c340570782e947eec8e78bb"
- dependencies:
- strip-ansi "^3.0.0"
- wcwidth "^1.0.0"
-
combined-stream@^1.0.5, combined-stream@~1.0.5:
version "1.0.5"
resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.5.tgz#938370a57b4a51dea2c77c15d5c5fdf895164009"
dependencies:
delayed-stream "~1.0.0"
-command-join@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/command-join/-/command-join-2.0.0.tgz#52e8b984f4872d952ff1bdc8b98397d27c7144cf"
-
commander@2.9.0, commander@^2.9.0:
version "2.9.0"
resolved "https://registry.yarnpkg.com/commander/-/commander-2.9.0.tgz#9c99094176e12240cb22d6c5146098400fe0f7d4"
@@ -1262,13 +1208,6 @@ commondir@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b"
-compare-func@^1.3.1:
- version "1.3.2"
- resolved "https://registry.yarnpkg.com/compare-func/-/compare-func-1.3.2.tgz#99dd0ba457e1f9bc722b12c08ec33eeab31fa648"
- dependencies:
- array-ify "^1.0.0"
- dot-prop "^3.0.0"
-
compare-versions@^3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/compare-versions/-/compare-versions-3.0.1.tgz#e60915b7fb294e29bbb60869188762beeb871443"
@@ -1281,14 +1220,6 @@ concat-map@0.0.1:
version "0.0.1"
resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
-concat-stream@^1.4.10:
- version "1.6.0"
- resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.0.tgz#0aac662fd52be78964d5532f694784e70110acf7"
- dependencies:
- inherits "^2.0.3"
- readable-stream "^2.2.2"
- typedarray "^0.0.6"
-
console-browserify@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.1.0.tgz#f0241c45730a9fc6323b206dbf38edc741d0bb10"
@@ -1303,165 +1234,6 @@ constants-browserify@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75"
-conventional-changelog-angular@^1.3.4:
- version "1.4.0"
- resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-1.4.0.tgz#118b9f7d41a3d99500bfb6bea1f3525e055e8b9b"
- dependencies:
- compare-func "^1.3.1"
- github-url-from-git "^1.4.0"
- q "^1.4.1"
- read-pkg-up "^2.0.0"
-
-conventional-changelog-atom@^0.1.0:
- version "0.1.1"
- resolved "https://registry.yarnpkg.com/conventional-changelog-atom/-/conventional-changelog-atom-0.1.1.tgz#d40a9b297961b53c745e5d1718fd1a3379f6a92f"
- dependencies:
- q "^1.4.1"
-
-conventional-changelog-cli@^1.3.2:
- version "1.3.2"
- resolved "https://registry.yarnpkg.com/conventional-changelog-cli/-/conventional-changelog-cli-1.3.2.tgz#33abf2b5720a9b094df38e81741ccb502e1a4125"
- dependencies:
- add-stream "^1.0.0"
- conventional-changelog "^1.1.4"
- lodash "^4.1.0"
- meow "^3.7.0"
- tempfile "^1.1.1"
-
-conventional-changelog-codemirror@^0.1.0:
- version "0.1.0"
- resolved "https://registry.yarnpkg.com/conventional-changelog-codemirror/-/conventional-changelog-codemirror-0.1.0.tgz#7577a591dbf9b538e7a150a7ee62f65a2872b334"
- dependencies:
- q "^1.4.1"
-
-conventional-changelog-core@^1.9.0:
- version "1.9.0"
- resolved "https://registry.yarnpkg.com/conventional-changelog-core/-/conventional-changelog-core-1.9.0.tgz#de5dfbc091847656508d4a389e35c9a1bc49e7f4"
- dependencies:
- conventional-changelog-writer "^1.1.0"
- conventional-commits-parser "^1.0.0"
- dateformat "^1.0.12"
- get-pkg-repo "^1.0.0"
- git-raw-commits "^1.2.0"
- git-remote-origin-url "^2.0.0"
- git-semver-tags "^1.2.0"
- lodash "^4.0.0"
- normalize-package-data "^2.3.5"
- q "^1.4.1"
- read-pkg "^1.1.0"
- read-pkg-up "^1.0.1"
- through2 "^2.0.0"
-
-conventional-changelog-ember@^0.2.6:
- version "0.2.6"
- resolved "https://registry.yarnpkg.com/conventional-changelog-ember/-/conventional-changelog-ember-0.2.6.tgz#8b7355419f5127493c4c562473ab2fc792f1c2b6"
- dependencies:
- q "^1.4.1"
-
-conventional-changelog-eslint@^0.1.0:
- version "0.1.0"
- resolved "https://registry.yarnpkg.com/conventional-changelog-eslint/-/conventional-changelog-eslint-0.1.0.tgz#a52411e999e0501ce500b856b0a643d0330907e2"
- dependencies:
- q "^1.4.1"
-
-conventional-changelog-express@^0.1.0:
- version "0.1.0"
- resolved "https://registry.yarnpkg.com/conventional-changelog-express/-/conventional-changelog-express-0.1.0.tgz#55c6c841c811962036c037bdbd964a54ae310fce"
- dependencies:
- q "^1.4.1"
-
-conventional-changelog-jquery@^0.1.0:
- version "0.1.0"
- resolved "https://registry.yarnpkg.com/conventional-changelog-jquery/-/conventional-changelog-jquery-0.1.0.tgz#0208397162e3846986e71273b6c79c5b5f80f510"
- dependencies:
- q "^1.4.1"
-
-conventional-changelog-jscs@^0.1.0:
- version "0.1.0"
- resolved "https://registry.yarnpkg.com/conventional-changelog-jscs/-/conventional-changelog-jscs-0.1.0.tgz#0479eb443cc7d72c58bf0bcf0ef1d444a92f0e5c"
- dependencies:
- q "^1.4.1"
-
-conventional-changelog-jshint@^0.1.0:
- version "0.1.0"
- resolved "https://registry.yarnpkg.com/conventional-changelog-jshint/-/conventional-changelog-jshint-0.1.0.tgz#00cab8e9a3317487abd94c4d84671342918d2a07"
- dependencies:
- compare-func "^1.3.1"
- q "^1.4.1"
-
-conventional-changelog-writer@^1.1.0:
- version "1.4.1"
- resolved "https://registry.yarnpkg.com/conventional-changelog-writer/-/conventional-changelog-writer-1.4.1.tgz#3f4cb4d003ebb56989d30d345893b52a43639c8e"
- dependencies:
- compare-func "^1.3.1"
- conventional-commits-filter "^1.0.0"
- dateformat "^1.0.11"
- handlebars "^4.0.2"
- json-stringify-safe "^5.0.1"
- lodash "^4.0.0"
- meow "^3.3.0"
- semver "^5.0.1"
- split "^1.0.0"
- through2 "^2.0.0"
-
-conventional-changelog@^1.1.4:
- version "1.1.4"
- resolved "https://registry.yarnpkg.com/conventional-changelog/-/conventional-changelog-1.1.4.tgz#108bc750c2a317e200e2f9b413caaa1f8c7efa3b"
- dependencies:
- conventional-changelog-angular "^1.3.4"
- conventional-changelog-atom "^0.1.0"
- conventional-changelog-codemirror "^0.1.0"
- conventional-changelog-core "^1.9.0"
- conventional-changelog-ember "^0.2.6"
- conventional-changelog-eslint "^0.1.0"
- conventional-changelog-express "^0.1.0"
- conventional-changelog-jquery "^0.1.0"
- conventional-changelog-jscs "^0.1.0"
- conventional-changelog-jshint "^0.1.0"
-
-conventional-commits-filter@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/conventional-commits-filter/-/conventional-commits-filter-1.0.0.tgz#6fc2a659372bc3f2339cf9ffff7e1b0344b93039"
- dependencies:
- is-subset "^0.1.1"
- modify-values "^1.0.0"
-
-conventional-commits-parser@^1.0.0:
- version "1.3.0"
- resolved "https://registry.yarnpkg.com/conventional-commits-parser/-/conventional-commits-parser-1.3.0.tgz#e327b53194e1a7ad5dc63479ee9099a52b024865"
- dependencies:
- JSONStream "^1.0.4"
- is-text-path "^1.0.0"
- lodash "^4.2.1"
- meow "^3.3.0"
- split2 "^2.0.0"
- through2 "^2.0.0"
- trim-off-newlines "^1.0.0"
-
-conventional-commits-parser@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/conventional-commits-parser/-/conventional-commits-parser-2.0.0.tgz#71d01910cb0a99aeb20c144e50f81f4df3178447"
- dependencies:
- JSONStream "^1.0.4"
- is-text-path "^1.0.0"
- lodash "^4.2.1"
- meow "^3.3.0"
- split2 "^2.0.0"
- through2 "^2.0.0"
- trim-off-newlines "^1.0.0"
-
-conventional-recommended-bump@^1.0.1:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/conventional-recommended-bump/-/conventional-recommended-bump-1.0.1.tgz#56b8ae553a8a1152fa069e767599e1f6948bd36c"
- dependencies:
- concat-stream "^1.4.10"
- conventional-commits-filter "^1.0.0"
- conventional-commits-parser "^2.0.0"
- git-raw-commits "^1.2.0"
- git-semver-tags "^1.2.1"
- meow "^3.3.0"
- object-assign "^4.0.1"
-
convert-source-map@^1.1.0, convert-source-map@^1.3.0:
version "1.5.0"
resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.5.0.tgz#9acd70851c6d5dfdd93d9282e5edf94a03ff46b5"
@@ -1566,10 +1338,6 @@ crypto-js@^3.1.4:
version "3.1.8"
resolved "https://registry.yarnpkg.com/crypto-js/-/crypto-js-3.1.8.tgz#715f070bf6014f2ae992a98b3929258b713f08d5"
-crypto-js@^3.1.9-1:
- version "3.1.9-1"
- resolved "https://registry.yarnpkg.com/crypto-js/-/crypto-js-3.1.9-1.tgz#fda19e761fc077e01ffbfdc6e9fdfc59e8806cd8"
-
currently-unhandled@^0.4.1:
version "0.4.1"
resolved "https://registry.yarnpkg.com/currently-unhandled/-/currently-unhandled-0.4.1.tgz#988df33feab191ef799a61369dd76c17adf957ea"
@@ -1582,12 +1350,6 @@ d@1:
dependencies:
es5-ext "^0.10.9"
-dargs@^4.0.1:
- version "4.1.0"
- resolved "https://registry.yarnpkg.com/dargs/-/dargs-4.1.0.tgz#03a9dbb4b5c2f139bf14ae53f0b8a2a6a86f4e17"
- dependencies:
- number-is-nan "^1.0.0"
-
dashdash@^1.12.0:
version "1.14.1"
resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0"
@@ -1598,13 +1360,6 @@ date-now@^0.1.4:
version "0.1.4"
resolved "https://registry.yarnpkg.com/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b"
-dateformat@^1.0.11, dateformat@^1.0.12:
- version "1.0.12"
- resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-1.0.12.tgz#9f124b67594c937ff706932e4a642cca8dbbfee9"
- dependencies:
- get-stdin "^4.0.1"
- meow "^3.3.0"
-
debug-log@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/debug-log/-/debug-log-1.0.1.tgz#2307632d4c04382b8df8a32f70b895046d52745f"
@@ -1625,9 +1380,11 @@ decamelize@^1.0.0, decamelize@^1.1.1, decamelize@^1.1.2:
version "1.2.0"
resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290"
-dedent@^0.7.0:
- version "0.7.0"
- resolved "https://registry.yarnpkg.com/dedent/-/dedent-0.7.0.tgz#2495ddbaf6eb874abb0e1be9df22d2e5a544326c"
+deep-eql@^0.1.3:
+ version "0.1.3"
+ resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-0.1.3.tgz#ef558acab8de25206cd713906d74e56930eb69f2"
+ dependencies:
+ type-detect "0.1.1"
deep-eql@^2.0.1:
version "2.0.2"
@@ -1649,12 +1406,6 @@ default-require-extensions@^1.0.0:
dependencies:
strip-bom "^2.0.0"
-defaults@^1.0.3:
- version "1.0.3"
- resolved "https://registry.yarnpkg.com/defaults/-/defaults-1.0.3.tgz#c656051e9817d9ff08ed881477f3fe4019f3ef7d"
- dependencies:
- clone "^1.0.2"
-
deferred-leveldown@~1.2.1:
version "1.2.1"
resolved "https://registry.yarnpkg.com/deferred-leveldown/-/deferred-leveldown-1.2.1.tgz#5d25c3310f5fe909946f6240dc9f90dd109a71ef"
@@ -1705,10 +1456,6 @@ detect-indent@^4.0.0:
dependencies:
repeating "^2.0.0"
-detect-indent@^5.0.0:
- version "5.0.0"
- resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-5.0.0.tgz#3871cc0a6a002e8c3e5b3cf7f336264675f06b9d"
-
diff@3.2.0, diff@^3.1.0, diff@^3.2.0:
version "3.2.0"
resolved "https://registry.yarnpkg.com/diff/-/diff-3.2.0.tgz#c9ce393a4b7cbd0b058a725c93df299027868ff9"
@@ -1733,12 +1480,6 @@ domain-browser@^1.1.1:
version "1.1.7"
resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.1.7.tgz#867aa4b093faa05f1de08c06f4d7b21fdf8698bc"
-dot-prop@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-3.0.0.tgz#1b708af094a49c9a0e7dbcad790aba539dac1177"
- dependencies:
- is-obj "^1.0.0"
-
drbg.js@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/drbg.js/-/drbg.js-1.0.1.tgz#3e36b6c42b37043823cdbc332d58f31e2445480b"
@@ -1753,7 +1494,7 @@ duplexer2@~0.0.2:
dependencies:
readable-stream "~1.1.9"
-duplexer@^0.1.1, duplexer@~0.1.1:
+duplexer@~0.1.1:
version "0.1.1"
resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.1.tgz#ace6ff808c1ce66b57d1ebf97977acb02334cfc1"
@@ -1810,7 +1551,7 @@ errno@^0.1.3, errno@~0.1.1:
dependencies:
prr "~0.0.0"
-error-ex@^1.2.0, error-ex@^1.3.1:
+error-ex@^1.2.0:
version "1.3.1"
resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.1.tgz#f855a86ce61adc4e8621c3cda21e7a7612c3a8dc"
dependencies:
@@ -2045,14 +1786,6 @@ ethereumjs-wallet@^0.6.0:
utf8 "^2.1.1"
uuid "^2.0.1"
-ethjs-abi@0.1.8:
- version "0.1.8"
- resolved "https://registry.yarnpkg.com/ethjs-abi/-/ethjs-abi-0.1.8.tgz#cd288583ed628cdfadaf8adefa3ba1dbcbca6c18"
- dependencies:
- bn.js "4.11.6"
- js-sha3 "0.5.5"
- number-to-bn "1.7.0"
-
ethjs-util@^0.1.3:
version "0.1.4"
resolved "https://registry.yarnpkg.com/ethjs-util/-/ethjs-util-0.1.4.tgz#1c8b6879257444ef4d3f3fbbac2ded12cd997d93"
@@ -2101,18 +1834,6 @@ execa@^0.5.0:
signal-exit "^3.0.0"
strip-eof "^1.0.0"
-execa@^0.8.0:
- version "0.8.0"
- resolved "https://registry.yarnpkg.com/execa/-/execa-0.8.0.tgz#d8d76bbc1b55217ed190fd6dd49d3c774ecfc8da"
- dependencies:
- cross-spawn "^5.0.1"
- get-stream "^3.0.0"
- is-stream "^1.1.0"
- npm-run-path "^2.0.0"
- p-finally "^1.0.0"
- signal-exit "^3.0.0"
- strip-eof "^1.0.0"
-
expand-brackets@^0.1.4:
version "0.1.5"
resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b"
@@ -2151,14 +1872,6 @@ extend@~3.0.0:
version "3.0.1"
resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.1.tgz#a755ea7bc1adfcc5a31ce7e762dbaadc5e636444"
-external-editor@^2.0.4:
- version "2.0.4"
- resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-2.0.4.tgz#1ed9199da9cbfe2ef2f7a31b2fde8b0d12368972"
- dependencies:
- iconv-lite "^0.4.17"
- jschardet "^1.4.2"
- tmp "^0.0.31"
-
extglob@^0.3.1:
version "0.3.2"
resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1"
@@ -2205,12 +1918,6 @@ figures@^1.3.5:
escape-string-regexp "^1.0.5"
object-assign "^4.1.0"
-figures@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/figures/-/figures-2.0.0.tgz#3ab1a2d2a62c8bfb431a0c94cb797a2fce27c962"
- dependencies:
- escape-string-regexp "^1.0.5"
-
file-type@^3.6.0:
version "3.9.0"
resolved "https://registry.yarnpkg.com/file-type/-/file-type-3.9.0.tgz#257a078384d1db8087bc449d107d52a52672b9e9"
@@ -2331,7 +2038,7 @@ fs-extra@^0.30.0:
path-is-absolute "^1.0.0"
rimraf "^2.2.8"
-fs-extra@^4.0.0, fs-extra@^4.0.1:
+fs-extra@^4.0.0:
version "4.0.1"
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-4.0.1.tgz#7fc0c6c8957f983f57f306a24e5b9ddd8d0dd880"
dependencies:
@@ -2406,20 +2113,6 @@ get-func-name@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.0.tgz#ead774abee72e20409433a066366023dd6887a41"
-get-pkg-repo@^1.0.0:
- version "1.4.0"
- resolved "https://registry.yarnpkg.com/get-pkg-repo/-/get-pkg-repo-1.4.0.tgz#c73b489c06d80cc5536c2c853f9e05232056972d"
- dependencies:
- hosted-git-info "^2.1.4"
- meow "^3.3.0"
- normalize-package-data "^2.3.0"
- parse-github-repo-url "^1.3.0"
- through2 "^2.0.0"
-
-get-port@^3.2.0:
- version "3.2.0"
- resolved "https://registry.yarnpkg.com/get-port/-/get-port-3.2.0.tgz#dd7ce7de187c06c8bf353796ac71e099f0980ebc"
-
get-stdin@^4.0.1:
version "4.0.1"
resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe"
@@ -2435,10 +2128,6 @@ get-stream@^2.2.0:
object-assign "^4.0.1"
pinkie-promise "^2.0.0"
-get-stream@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14"
-
get-value@^2.0.3, get-value@^2.0.5, get-value@^2.0.6:
version "2.0.6"
resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28"
@@ -2459,44 +2148,10 @@ ghauth@^2.0.0:
read "~1.0.5"
xtend "~4.0.0"
-git-raw-commits@^1.2.0:
- version "1.2.0"
- resolved "https://registry.yarnpkg.com/git-raw-commits/-/git-raw-commits-1.2.0.tgz#0f3a8bfd99ae0f2d8b9224d58892975e9a52d03c"
- dependencies:
- dargs "^4.0.1"
- lodash.template "^4.0.2"
- meow "^3.3.0"
- split2 "^2.0.0"
- through2 "^2.0.0"
-
-git-remote-origin-url@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/git-remote-origin-url/-/git-remote-origin-url-2.0.0.tgz#5282659dae2107145a11126112ad3216ec5fa65f"
- dependencies:
- gitconfiglocal "^1.0.0"
- pify "^2.3.0"
-
-git-semver-tags@^1.2.0, git-semver-tags@^1.2.1:
- version "1.2.1"
- resolved "https://registry.yarnpkg.com/git-semver-tags/-/git-semver-tags-1.2.1.tgz#6ccd2a52e735b736748dc762444fcd9588e27490"
- dependencies:
- meow "^3.3.0"
- semver "^5.0.1"
-
-gitconfiglocal@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/gitconfiglocal/-/gitconfiglocal-1.0.0.tgz#41d045f3851a5ea88f03f24ca1c6178114464b9b"
- dependencies:
- ini "^1.3.2"
-
github-from-package@0.0.0:
version "0.0.0"
resolved "https://registry.yarnpkg.com/github-from-package/-/github-from-package-0.0.0.tgz#97fb5d96bfde8973313f20e8288ef9a167fa64ce"
-github-url-from-git@^1.4.0:
- version "1.5.0"
- resolved "https://registry.yarnpkg.com/github-url-from-git/-/github-url-from-git-1.5.0.tgz#f985fedcc0a9aa579dc88d7aff068d55cc6251a0"
-
github-url-to-object@^1.4.2:
version "1.6.0"
resolved "https://registry.yarnpkg.com/github-url-to-object/-/github-url-to-object-1.6.0.tgz#891ef7fbbfaba8fed71510acdb1b4e9346a970dc"
@@ -2527,7 +2182,7 @@ glob@7.1.1:
once "^1.3.0"
path-is-absolute "^1.0.0"
-glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.0.6, glob@^7.1.1, glob@^7.1.2, glob@~7.1.2:
+glob@^7.0.0, glob@^7.0.5, glob@^7.0.6, glob@^7.1.1, glob@~7.1.2:
version "7.1.2"
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15"
dependencies:
@@ -2549,16 +2204,6 @@ globals@^9.0.0:
version "9.18.0"
resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a"
-globby@^6.1.0:
- version "6.1.0"
- resolved "https://registry.yarnpkg.com/globby/-/globby-6.1.0.tgz#f5a6d70e8395e21c858fb0489d64df02424d506c"
- dependencies:
- array-union "^1.0.1"
- glob "^7.0.3"
- object-assign "^4.0.1"
- pify "^2.0.0"
- pinkie-promise "^2.0.0"
-
graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9:
version "4.1.11"
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658"
@@ -2571,7 +2216,7 @@ growl@1.9.2:
version "1.9.2"
resolved "https://registry.yarnpkg.com/growl/-/growl-1.9.2.tgz#0ea7743715db8d8de2c5ede1775e1b45ac85c02f"
-handlebars@^4.0.2, handlebars@^4.0.3, handlebars@^4.0.6:
+handlebars@^4.0.3, handlebars@^4.0.6:
version "4.0.10"
resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.10.tgz#3d30c718b09a3d96f23ea4cc1f403c4d3ba9ff4f"
dependencies:
@@ -2611,10 +2256,6 @@ has-flag@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa"
-has-flag@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-2.0.0.tgz#e8207af1cc7b30d446cc70b734b5e8be18f88d51"
-
has-unicode@^2.0.0:
version "2.0.1"
resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9"
@@ -2712,7 +2353,7 @@ hyperquest@~1.2.0:
duplexer2 "~0.0.2"
through2 "~0.6.3"
-iconv-lite@^0.4.17, iconv-lite@~0.4.13:
+iconv-lite@~0.4.13:
version "0.4.18"
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.18.tgz#23d8656b16aae6742ac29732ea8f0336a4789cf2"
@@ -2753,7 +2394,7 @@ inherits@2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.1.tgz#b17d08d326b4423e568eff719f91b0b1cbdf69f1"
-ini@^1.3.2, ini@~1.3.0:
+ini@~1.3.0:
version "1.3.4"
resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.4.tgz#0537cb79daf59b59a1a517dff706c86ec039162e"
@@ -2770,25 +2411,6 @@ inquirer@^0.8.2:
rx "^2.4.3"
through "^2.3.6"
-inquirer@^3.2.2:
- version "3.2.2"
- resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-3.2.2.tgz#c2aaede1507cc54d826818737742d621bef2e823"
- dependencies:
- ansi-escapes "^2.0.0"
- chalk "^2.0.0"
- cli-cursor "^2.1.0"
- cli-width "^2.0.0"
- external-editor "^2.0.4"
- figures "^2.0.0"
- lodash "^4.3.0"
- mute-stream "0.0.7"
- run-async "^2.2.0"
- rx-lite "^4.0.8"
- rx-lite-aggregates "^4.0.8"
- string-width "^2.1.0"
- strip-ansi "^4.0.0"
- through "^2.3.6"
-
interpret@^1.0.0:
version "1.0.3"
resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.0.3.tgz#cbc35c62eeee73f19ab7b10a801511401afc0f90"
@@ -2833,12 +2455,6 @@ is-callable@^1.1.1, is-callable@^1.1.3:
version "1.1.3"
resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.3.tgz#86eb75392805ddc33af71c92a0eedf74ee7604b2"
-is-ci@^1.0.10:
- version "1.0.10"
- resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-1.0.10.tgz#f739336b2632365061a9d48270cd56ae3369318e"
- dependencies:
- ci-info "^1.0.0"
-
is-data-descriptor@^0.1.4:
version "0.1.4"
resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56"
@@ -2944,20 +2560,12 @@ is-number@^3.0.0:
dependencies:
kind-of "^3.0.2"
-is-obj@^1.0.0:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-1.0.1.tgz#3e4729ac1f5fde025cd7d83a896dab9f4f67db0f"
-
is-odd@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/is-odd/-/is-odd-1.0.0.tgz#3b8a932eb028b3775c39bb09e91767accdb69088"
dependencies:
is-number "^3.0.0"
-is-plain-obj@^1.0.0:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e"
-
is-plain-object@^2.0.1:
version "2.0.3"
resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.3.tgz#c15bf3e4b66b62d72efaf2925848663ecbc619b6"
@@ -2972,10 +2580,6 @@ is-primitive@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575"
-is-promise@^2.1.0:
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa"
-
is-property@^1.0.0:
version "1.0.2"
resolved "https://registry.yarnpkg.com/is-property/-/is-property-1.0.2.tgz#57fe1c4e48474edd65b09911f26b1cd4095dda84"
@@ -2990,20 +2594,10 @@ is-stream@^1.0.1, is-stream@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44"
-is-subset@^0.1.1:
- version "0.1.1"
- resolved "https://registry.yarnpkg.com/is-subset/-/is-subset-0.1.1.tgz#8a59117d932de1de00f245fcdd39ce43f1e939a6"
-
is-symbol@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.1.tgz#3cc59f00025194b6ab2e38dbae6689256b660572"
-is-text-path@^1.0.0:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/is-text-path/-/is-text-path-1.0.1.tgz#4e1aa0fb51bfbcb3e92688001397202c1775b66e"
- dependencies:
- text-extensions "^1.0.0"
-
is-typedarray@~1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a"
@@ -3096,10 +2690,6 @@ istanbul-reports@^1.1.1:
dependencies:
handlebars "^4.0.3"
-js-sha3@0.5.5:
- version "0.5.5"
- resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.5.5.tgz#baf0c0e8c54ad5903447df96ade7a4a1bca79a4a"
-
js-sha3@^0.3.1:
version "0.3.1"
resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.3.1.tgz#86122802142f0828502a0d1dee1d95e253bb0243"
@@ -3119,10 +2709,6 @@ jsbn@~0.1.0:
version "0.1.1"
resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513"
-jschardet@^1.4.2:
- version "1.5.1"
- resolved "https://registry.yarnpkg.com/jschardet/-/jschardet-1.5.1.tgz#c519f629f86b3a5bedba58a88d311309eec097f9"
-
jsesc@^1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b"
@@ -3159,7 +2745,7 @@ json-stable-stringify@^1.0.1:
dependencies:
jsonify "~0.0.0"
-json-stringify-safe@^5.0.1, json-stringify-safe@~5.0.1:
+json-stringify-safe@~5.0.1:
version "5.0.1"
resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb"
@@ -3187,10 +2773,6 @@ jsonify@~0.0.0:
version "0.0.0"
resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73"
-jsonparse@^1.2.0:
- version "1.3.1"
- resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280"
-
jsonpointer@^4.0.0:
version "4.0.1"
resolved "https://registry.yarnpkg.com/jsonpointer/-/jsonpointer-4.0.1.tgz#4fd92cb34e0e9db3c89c8622ecf51f9b978c6cb9"
@@ -3267,46 +2849,6 @@ lcov-parse@0.0.10:
version "0.0.10"
resolved "https://registry.yarnpkg.com/lcov-parse/-/lcov-parse-0.0.10.tgz#1b0b8ff9ac9c7889250582b70b71315d9da6d9a3"
-lerna@^2.0.0:
- version "2.1.1"
- resolved "https://registry.yarnpkg.com/lerna/-/lerna-2.1.1.tgz#1d563926204dca11e56d637cac16587d66aa264a"
- dependencies:
- async "^1.5.0"
- chalk "^2.1.0"
- cmd-shim "^2.0.2"
- columnify "^1.5.4"
- command-join "^2.0.0"
- conventional-changelog-cli "^1.3.2"
- conventional-recommended-bump "^1.0.1"
- dedent "^0.7.0"
- execa "^0.8.0"
- find-up "^2.1.0"
- fs-extra "^4.0.1"
- get-port "^3.2.0"
- glob "^7.1.2"
- globby "^6.1.0"
- graceful-fs "^4.1.11"
- inquirer "^3.2.2"
- is-ci "^1.0.10"
- load-json-file "^3.0.0"
- lodash "^4.17.4"
- minimatch "^3.0.4"
- npmlog "^4.1.2"
- p-finally "^1.0.0"
- path-exists "^3.0.0"
- read-cmd-shim "^1.0.1"
- read-pkg "^2.0.0"
- rimraf "^2.6.1"
- safe-buffer "^5.1.1"
- semver "^5.4.1"
- signal-exit "^3.0.2"
- strong-log-transformer "^1.0.6"
- temp-write "^3.3.0"
- write-file-atomic "^2.3.0"
- write-json-file "^2.2.0"
- write-pkg "^3.1.0"
- yargs "^8.0.2"
-
level-codec@~6.1.0:
version "6.1.0"
resolved "https://registry.yarnpkg.com/level-codec/-/level-codec-6.1.0.tgz#f5df0a99582f76dac43855151ab6f4e4d0d60045"
@@ -3364,19 +2906,19 @@ load-json-file@^2.0.0:
pify "^2.0.0"
strip-bom "^3.0.0"
-load-json-file@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-3.0.0.tgz#7eb3735d983a7ed2262ade4ff769af5369c5c440"
- dependencies:
- graceful-fs "^4.1.2"
- parse-json "^3.0.0"
- pify "^2.0.0"
- strip-bom "^3.0.0"
-
loader-runner@^2.3.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-2.3.0.tgz#f482aea82d543e07921700d5a46ef26fdac6b8a2"
+loader-utils@^0.2.16:
+ version "0.2.17"
+ resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-0.2.17.tgz#f86e6374d43205a6e6c60e9196f17c0299bfb348"
+ dependencies:
+ big.js "^3.1.3"
+ emojis-list "^2.0.0"
+ json5 "^0.5.0"
+ object-assign "^4.0.1"
+
loader-utils@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.1.0.tgz#c98aef488bcceda2ffb5e2de646d6a754429f5cd"
@@ -3415,10 +2957,6 @@ lodash._isiterateecall@^3.0.0:
version "3.0.9"
resolved "https://registry.yarnpkg.com/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz#5203ad7ba425fae842460e696db9cf3e6aac057c"
-lodash._reinterpolate@~3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d"
-
lodash.assign@^4.0.3, lodash.assign@^4.0.6:
version "4.2.0"
resolved "https://registry.yarnpkg.com/lodash.assign/-/lodash.assign-4.2.0.tgz#0d99f3ccd7a6d261d19bdaeb9245005d285808e7"
@@ -3447,24 +2985,11 @@ lodash.keys@^3.0.0:
lodash.isarguments "^3.0.0"
lodash.isarray "^3.0.0"
-lodash.template@^4.0.2:
- version "4.4.0"
- resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-4.4.0.tgz#e73a0385c8355591746e020b99679c690e68fba0"
- dependencies:
- lodash._reinterpolate "~3.0.0"
- lodash.templatesettings "^4.0.0"
-
-lodash.templatesettings@^4.0.0:
- version "4.1.0"
- resolved "https://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-4.1.0.tgz#2b4d4e95ba440d915ff08bc899e4553666713316"
- dependencies:
- lodash._reinterpolate "~3.0.0"
-
lodash@^3.3.1, lodash@^3.6.0:
version "3.10.1"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-3.10.1.tgz#5bf45e8e49ba4189e17d482789dfd15bd140b7b6"
-lodash@^4.0.0, lodash@^4.1.0, lodash@^4.13.1, lodash@^4.14.0, lodash@^4.17.4, lodash@^4.2.0, lodash@^4.2.1, lodash@^4.3.0:
+lodash@^4.13.1, lodash@^4.14.0, lodash@^4.17.4, lodash@^4.2.0:
version "4.17.4"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae"
@@ -3512,12 +3037,6 @@ ltgt@~2.1.3:
version "2.1.3"
resolved "https://registry.yarnpkg.com/ltgt/-/ltgt-2.1.3.tgz#10851a06d9964b971178441c23c9e52698eece34"
-make-dir@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.0.0.tgz#97a011751e91dd87cfadef58832ebb04936de978"
- dependencies:
- pify "^2.3.0"
-
map-cache@^0.2.2:
version "0.2.2"
resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf"
@@ -3578,7 +3097,7 @@ memorystream@^0.3.1:
version "0.3.1"
resolved "https://registry.yarnpkg.com/memorystream/-/memorystream-0.3.1.tgz#86d7090b30ce455d63fbae12dda51a47ddcaf9b2"
-meow@^3.1.0, meow@^3.3.0, meow@^3.7.0:
+meow@^3.1.0, meow@^3.7.0:
version "3.7.0"
resolved "https://registry.yarnpkg.com/meow/-/meow-3.7.0.tgz#72cb668b425228290abbfa856892587308a801fb"
dependencies:
@@ -3701,10 +3220,6 @@ minimist@1.2.0, minimist@^1.1.1, minimist@^1.1.3, minimist@^1.2.0, minimist@~1.2
version "1.2.0"
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284"
-minimist@^0.1.0:
- version "0.1.0"
- resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.1.0.tgz#99df657a52574c21c9057497df742790b2b4c0de"
-
mixin-deep@^1.1.3:
version "1.2.0"
resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.2.0.tgz#d02b8c6f8b6d4b8f5982d3fd009c4919851c3fe2"
@@ -3718,7 +3233,7 @@ mkdirp@0.5.1, "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0:
dependencies:
minimist "0.0.8"
-mocha@^3.4.1:
+mocha@^3.2.0, mocha@^3.4.1:
version "3.4.2"
resolved "https://registry.yarnpkg.com/mocha/-/mocha-3.4.2.tgz#d0ef4d332126dbf18d0d640c9b382dd48be97594"
dependencies:
@@ -3734,14 +3249,6 @@ mocha@^3.4.1:
mkdirp "0.5.1"
supports-color "3.1.2"
-modify-values@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/modify-values/-/modify-values-1.0.0.tgz#e2b6cdeb9ce19f99317a53722f3dbf5df5eaaab2"
-
-moment@^2.6.0:
- version "2.18.1"
- resolved "https://registry.yarnpkg.com/moment/-/moment-2.18.1.tgz#c36193dd3ce1c2eed2adb7c802dbbc77a81b1c0f"
-
ms@0.7.2:
version "0.7.2"
resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.2.tgz#ae25cf2512b3885a1d95d7f037868d8431124765"
@@ -3754,7 +3261,7 @@ mute-stream@0.0.4:
version "0.0.4"
resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.4.tgz#a9219960a6d5d5d046597aee51252c6655f7177e"
-mute-stream@0.0.7, mute-stream@~0.0.4:
+mute-stream@~0.0.4:
version "0.0.7"
resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab"
@@ -3863,7 +3370,7 @@ nopt@^4.0.1:
abbrev "1"
osenv "^0.1.4"
-normalize-package-data@^2.3.0, normalize-package-data@^2.3.2, normalize-package-data@^2.3.4, normalize-package-data@^2.3.5:
+normalize-package-data@^2.3.2, normalize-package-data@^2.3.4:
version "2.4.0"
resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.4.0.tgz#12f95a307d58352075a04907b84ac8be98ac012f"
dependencies:
@@ -3896,7 +3403,7 @@ npm-run-path@^2.0.0:
dependencies:
path-key "^2.0.0"
-npmlog@^4.0.1, npmlog@^4.0.2, npmlog@^4.1.2:
+npmlog@^4.0.1, npmlog@^4.0.2:
version "4.1.2"
resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b"
dependencies:
@@ -3909,13 +3416,6 @@ number-is-nan@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d"
-number-to-bn@1.7.0:
- version "1.7.0"
- resolved "https://registry.yarnpkg.com/number-to-bn/-/number-to-bn-1.7.0.tgz#bb3623592f7e5f9e0030b1977bd41a0c53fe1ea0"
- dependencies:
- bn.js "4.11.6"
- strip-hex-prefix "1.0.0"
-
nyc@^11.0.1:
version "11.0.3"
resolved "https://registry.yarnpkg.com/nyc/-/nyc-11.0.3.tgz#0c28bc669a851621709bf7a08503034bee3812b6"
@@ -4001,12 +3501,6 @@ once@^1.3.0, once@^1.3.1, once@^1.3.3, once@^1.4.0:
dependencies:
wrappy "1"
-onetime@^2.0.0:
- version "2.0.1"
- resolved "https://registry.yarnpkg.com/onetime/-/onetime-2.0.1.tgz#067428230fd67443b2794b22bba528b6867962d4"
- dependencies:
- mimic-fn "^1.0.0"
-
opn-cli@^3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/opn-cli/-/opn-cli-3.1.0.tgz#f819ae6cae0b411bd0149b8560fe6c88adad20f8"
@@ -4053,7 +3547,7 @@ os-locale@^2.0.0:
lcid "^1.0.0"
mem "^1.1.0"
-os-tmpdir@^1.0.0, os-tmpdir@^1.0.1, os-tmpdir@~1.0.1:
+os-tmpdir@^1.0.0, os-tmpdir@^1.0.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274"
@@ -4092,10 +3586,6 @@ parse-asn1@^5.0.0:
evp_bytestokey "^1.0.0"
pbkdf2 "^3.0.3"
-parse-github-repo-url@^1.3.0:
- version "1.4.0"
- resolved "https://registry.yarnpkg.com/parse-github-repo-url/-/parse-github-repo-url-1.4.0.tgz#286c53e2c9962e0641649ee3ac9508fca4dd959c"
-
parse-glob@^3.0.4:
version "3.0.4"
resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c"
@@ -4118,12 +3608,6 @@ parse-json@^2.2.0:
dependencies:
error-ex "^1.2.0"
-parse-json@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-3.0.0.tgz#fa6f47b18e23826ead32f263e744d0e1e847fb13"
- dependencies:
- error-ex "^1.3.1"
-
pascalcase@^0.1.1:
version "0.1.1"
resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14"
@@ -4351,10 +3835,6 @@ punycode@^1.2.4, punycode@^1.4.1:
version "1.4.1"
resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e"
-q@^1.4.1:
- version "1.5.0"
- resolved "https://registry.yarnpkg.com/q/-/q-1.5.0.tgz#dd01bac9d06d30e6f219aecb8253ee9ebdc308f1"
-
qs@~6.3.0:
version "6.3.2"
resolved "https://registry.yarnpkg.com/qs/-/qs-6.3.2.tgz#e75bd5f6e268122a2a0e0bda630b2550c166502c"
@@ -4393,12 +3873,6 @@ rc@^1.1.6, rc@^1.1.7:
minimist "^1.2.0"
strip-json-comments "~2.0.1"
-read-cmd-shim@^1.0.1:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/read-cmd-shim/-/read-cmd-shim-1.0.1.tgz#2d5d157786a37c055d22077c32c53f8329e91c7b"
- dependencies:
- graceful-fs "^4.1.2"
-
read-pkg-up@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02"
@@ -4413,7 +3887,7 @@ read-pkg-up@^2.0.0:
find-up "^2.0.0"
read-pkg "^2.0.0"
-read-pkg@^1.0.0, read-pkg@^1.1.0:
+read-pkg@^1.0.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28"
dependencies:
@@ -4453,7 +3927,7 @@ readable-stream@^1.0.33, readable-stream@~1.1.9:
isarray "0.0.1"
string_decoder "~0.10.x"
-readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.5, readable-stream@^2.0.6, readable-stream@^2.1.4, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.2.6, readable-stream@^2.2.9:
+readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.5, readable-stream@^2.0.6, readable-stream@^2.1.4, readable-stream@^2.1.5, readable-stream@^2.2.6, readable-stream@^2.2.9:
version "2.3.3"
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.3.tgz#368f2512d79f9d46fdfc71349ae7878bbc1eb95c"
dependencies:
@@ -4655,13 +4129,6 @@ resolve@^1.1.6, resolve@^1.3.2, resolve@~1.3.3:
dependencies:
path-parse "^1.0.5"
-restore-cursor@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf"
- dependencies:
- onetime "^2.0.0"
- signal-exit "^3.0.2"
-
resumer@~0.0.0:
version "0.0.0"
resolved "https://registry.yarnpkg.com/resumer/-/resumer-0.0.0.tgz#f1e8f461e4064ba39e82af3cdc2a8c893d076759"
@@ -4691,27 +4158,11 @@ rlp@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/rlp/-/rlp-2.0.0.tgz#9db384ff4b89a8f61563d92395d8625b18f3afb0"
-run-async@^2.2.0:
- version "2.3.0"
- resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.3.0.tgz#0371ab4ae0bdd720d4166d7dfda64ff7a445a6c0"
- dependencies:
- is-promise "^2.1.0"
-
-rx-lite-aggregates@^4.0.8:
- version "4.0.8"
- resolved "https://registry.yarnpkg.com/rx-lite-aggregates/-/rx-lite-aggregates-4.0.8.tgz#753b87a89a11c95467c4ac1626c4efc4e05c67be"
- dependencies:
- rx-lite "*"
-
-rx-lite@*, rx-lite@^4.0.8:
- version "4.0.8"
- resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-4.0.8.tgz#0b1e11af8bc44836f04a6407e92da42467b79444"
-
rx@^2.4.3:
version "2.5.3"
resolved "https://registry.yarnpkg.com/rx/-/rx-2.5.3.tgz#21adc7d80f02002af50dae97fd9dbf248755f566"
-safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@~5.1.0, safe-buffer@~5.1.1:
+safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@~5.1.0, safe-buffer@~5.1.1:
version "5.1.1"
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853"
@@ -4764,10 +4215,6 @@ semver-regex@^1.0.0:
version "5.3.0"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f"
-semver@^5.0.1, semver@^5.4.1:
- version "5.4.1"
- resolved "https://registry.yarnpkg.com/semver/-/semver-5.4.1.tgz#e059c09d8571f0540823733433505d3a2f00b18e"
-
semver@~5.1.0:
version "5.1.1"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.1.1.tgz#a3292a373e6f3e0798da0b20641b9a9c5bc47e19"
@@ -4927,18 +4374,6 @@ solc@^0.4.2:
semver "^5.3.0"
yargs "^4.7.1"
-sort-keys@^1.1.1:
- version "1.1.2"
- resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-1.1.2.tgz#441b6d4d346798f1b4e49e8920adfba0e543f9ad"
- dependencies:
- is-plain-obj "^1.0.0"
-
-sort-keys@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-2.0.0.tgz#658535584861ec97d730d6cf41822e1f56684128"
- dependencies:
- is-plain-obj "^1.0.0"
-
source-list-map@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.0.tgz#aaa47403f7b245a92fbc97ea08f250d6087ed085"
@@ -5007,24 +4442,12 @@ split-string@^2.1.0:
dependencies:
extend-shallow "^2.0.1"
-split2@^2.0.0:
- version "2.1.1"
- resolved "https://registry.yarnpkg.com/split2/-/split2-2.1.1.tgz#7a1f551e176a90ecd3345f7246a0cfe175ef4fd0"
- dependencies:
- through2 "^2.0.2"
-
split@0.3:
version "0.3.3"
resolved "https://registry.yarnpkg.com/split/-/split-0.3.3.tgz#cd0eea5e63a211dfff7eb0f091c4133e2d0dd28f"
dependencies:
through "2"
-split@^1.0.0:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/split/-/split-1.0.1.tgz#605bd9be303aa59fb35f9229fbea0ddec9ea07d9"
- dependencies:
- through "2"
-
sprintf-js@~1.0.2:
version "1.0.3"
resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c"
@@ -5091,7 +4514,7 @@ string-width@^1.0.1, string-width@^1.0.2:
is-fullwidth-code-point "^1.0.0"
strip-ansi "^3.0.0"
-string-width@^2.0.0, string-width@^2.1.0:
+string-width@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.0.tgz#030664561fc146c9423ec7d978fe2457437fe6d0"
dependencies:
@@ -5176,16 +4599,6 @@ strip-json-comments@~2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a"
-strong-log-transformer@^1.0.6:
- version "1.0.6"
- resolved "https://registry.yarnpkg.com/strong-log-transformer/-/strong-log-transformer-1.0.6.tgz#f7fb93758a69a571140181277eea0c2eb1301fa3"
- dependencies:
- byline "^5.0.0"
- duplexer "^0.1.1"
- minimist "^0.1.0"
- moment "^2.6.0"
- through "^2.3.4"
-
supports-color@3.1.2, supports-color@^3.1.0, supports-color@^3.1.2:
version "3.1.2"
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.1.2.tgz#72a262894d9d408b956ca05ff37b2ed8a6e2a2d5"
@@ -5196,12 +4609,6 @@ supports-color@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7"
-supports-color@^4.0.0:
- version "4.2.1"
- resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-4.2.1.tgz#65a4bb2631e90e02420dba5554c375a4754bb836"
- dependencies:
- has-flag "^2.0.0"
-
tapable@^0.2.5, tapable@~0.2.5:
version "0.2.6"
resolved "https://registry.yarnpkg.com/tapable/-/tapable-0.2.6.tgz#206be8e188860b514425375e6f1ae89bfb01fd8d"
@@ -5263,10 +4670,6 @@ tar@^2.2.1:
fstream "^1.0.2"
inherits "2"
-temp-dir@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/temp-dir/-/temp-dir-1.0.0.tgz#0a7c0ea26d3a39afa7e0ebea9c1fc0bc4daa011d"
-
temp-write@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/temp-write/-/temp-write-2.1.0.tgz#59890918e0ef09d548aaa342f4bd3409d8404e96"
@@ -5278,24 +4681,6 @@ temp-write@^2.1.0:
pinkie-promise "^2.0.0"
uuid "^2.0.1"
-temp-write@^3.3.0:
- version "3.3.0"
- resolved "https://registry.yarnpkg.com/temp-write/-/temp-write-3.3.0.tgz#c1a96de2b36061342eae81f44ff001aec8f615a9"
- dependencies:
- graceful-fs "^4.1.2"
- is-stream "^1.1.0"
- make-dir "^1.0.0"
- pify "^2.2.0"
- temp-dir "^1.0.0"
- uuid "^3.0.1"
-
-tempfile@^1.1.1:
- version "1.1.1"
- resolved "https://registry.yarnpkg.com/tempfile/-/tempfile-1.1.1.tgz#5bcc4eaecc4ab2c707d8bc11d99ccc9a2cb287f2"
- dependencies:
- os-tmpdir "^1.0.0"
- uuid "^2.0.1"
-
test-exclude@^4.1.1:
version "4.1.1"
resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-4.1.1.tgz#4d84964b0966b0087ecc334a2ce002d3d9341e26"
@@ -5310,11 +4695,7 @@ text-encoding@0.6.4:
version "0.6.4"
resolved "https://registry.yarnpkg.com/text-encoding/-/text-encoding-0.6.4.tgz#e399a982257a276dae428bb92845cb71bdc26d19"
-text-extensions@^1.0.0:
- version "1.5.0"
- resolved "https://registry.yarnpkg.com/text-extensions/-/text-extensions-1.5.0.tgz#d1cb2d14b5d0bc45bfdca8a08a473f68c7eb0cbc"
-
-through2@^2.0.0, through2@^2.0.1, through2@^2.0.2:
+through2@^2.0.1:
version "2.0.3"
resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.3.tgz#0004569b37c7c74ba39c43f3ced78d1ad94140be"
dependencies:
@@ -5335,7 +4716,7 @@ through2@~0.6.3:
readable-stream ">=1.0.33-1 <1.1.0-0"
xtend ">=4.0.0 <4.1.0-0"
-through@2, "through@>=2.2.7 <3", through@^2.3.4, through@^2.3.6, through@~2.3, through@~2.3.1, through@~2.3.4, through@~2.3.8:
+through@2, through@^2.3.6, through@~2.3, through@~2.3.1, through@~2.3.4, through@~2.3.8:
version "2.3.8"
resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5"
@@ -5345,12 +4726,6 @@ timers-browserify@^2.0.2:
dependencies:
setimmediate "^1.0.4"
-tmp@^0.0.31:
- version "0.0.31"
- resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.31.tgz#8f38ab9438e17315e5dbd8b3657e8bfb277ae4a7"
- dependencies:
- os-tmpdir "~1.0.1"
-
to-arraybuffer@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz#7d229b1fcc637e466ca081180836a7aabff83f43"
@@ -5398,10 +4773,6 @@ trim-newlines@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-1.0.0.tgz#5887966bb582a4503a41eb524f7d35011815a613"
-trim-off-newlines@^1.0.0:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/trim-off-newlines/-/trim-off-newlines-1.0.1.tgz#9f9ba9d9efa8764c387698bcbfeb2c848f11adb3"
-
trim-right@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003"
@@ -5410,27 +4781,6 @@ trim@0.0.1:
version "0.0.1"
resolved "https://registry.yarnpkg.com/trim/-/trim-0.0.1.tgz#5858547f6b290757ee95cccc666fb50084c460dd"
-truffle-blockchain-utils@0.0.1:
- version "0.0.1"
- resolved "https://registry.yarnpkg.com/truffle-blockchain-utils/-/truffle-blockchain-utils-0.0.1.tgz#07a58e55bb0555a64208c9119c0b04ffe1464aa4"
- dependencies:
- web3 "^0.18.0"
-
-truffle-contract-schema@0.0.5:
- version "0.0.5"
- resolved "https://registry.yarnpkg.com/truffle-contract-schema/-/truffle-contract-schema-0.0.5.tgz#5e9d20bd0bf2a27fe94310748249d484eee49961"
- dependencies:
- crypto-js "^3.1.9-1"
-
-truffle-contract@^2.0.1:
- version "2.0.1"
- resolved "https://registry.yarnpkg.com/truffle-contract/-/truffle-contract-2.0.1.tgz#f83e3f18d8044027f2a9ee7c33767ba10fd39dd8"
- dependencies:
- ethjs-abi "0.1.8"
- truffle-blockchain-utils "0.0.1"
- truffle-contract-schema "0.0.5"
- web3 "^0.18.0"
-
truffle-hdwallet-provider@^0.0.3:
version "0.0.3"
resolved "https://registry.yarnpkg.com/truffle-hdwallet-provider/-/truffle-hdwallet-provider-0.0.3.tgz#0e1de02104b73d3875e1cf7093305b4ea8a2d843"
@@ -5493,6 +4843,14 @@ tweetnacl@^0.14.3, tweetnacl@~0.14.0:
version "0.14.5"
resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64"
+type-detect@0.1.1:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-0.1.1.tgz#0ba5ec2a885640e470ea4e8505971900dac58822"
+
+type-detect@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-1.0.0.tgz#762217cc06db258ec48908a1298e8b95121e8ea2"
+
type-detect@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-3.0.0.tgz#46d0cc8553abb7b13a352b0d6dea2fd58f2d9b55"
@@ -5501,10 +4859,6 @@ type-detect@^4.0.0:
version "4.0.3"
resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.3.tgz#0e3f2670b44099b0b46c284d136a7ef49c74c2ea"
-typedarray@^0.0.6:
- version "0.0.6"
- resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
-
typedoc-default-themes@^0.5.0:
version "0.5.0"
resolved "https://registry.yarnpkg.com/typedoc-default-themes/-/typedoc-default-themes-0.5.0.tgz#6dc2433e78ed8bea8e887a3acde2f31785bd6227"
@@ -5549,7 +4903,7 @@ typescript@2.4.1, typescript@^2.4.1:
version "2.4.1"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.4.1.tgz#c3ccb16ddaa0b2314de031e7e6fee89e5ba346bc"
-uglify-js@^2.6, uglify-js@^2.8.29:
+uglify-js@^2.6, uglify-js@^2.8.27, uglify-js@^2.8.29:
version "2.8.29"
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd"
dependencies:
@@ -5639,7 +4993,7 @@ uuid@^2.0.1:
version "2.0.3"
resolved "https://registry.yarnpkg.com/uuid/-/uuid-2.0.3.tgz#67e2e863797215530dff318e5bf9dcebfd47b21a"
-uuid@^3.0.0, uuid@^3.0.1:
+uuid@^3.0.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.1.0.tgz#3dd3d3e790abc24d7b0d3a034ffababe28ebbc04"
@@ -5670,12 +5024,6 @@ watchpack@^1.3.1:
chokidar "^1.4.3"
graceful-fs "^4.1.2"
-wcwidth@^1.0.0:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/wcwidth/-/wcwidth-1.0.1.tgz#f0b0dcf915bc5ff1528afadb2c0e17b532da2fe8"
- dependencies:
- defaults "^1.0.3"
-
web3-provider-engine@^13.0.1:
version "13.1.1"
resolved "https://registry.yarnpkg.com/web3-provider-engine/-/web3-provider-engine-13.1.1.tgz#ce6ce592cecd60209ae652193c508f65d15f08f0"
@@ -5719,9 +5067,9 @@ web3-provider-engine@^8.4.0:
xhr "^2.2.0"
xtend "^4.0.1"
-web3-typescript-typings@^0.3.2:
- version "0.3.2"
- resolved "https://registry.yarnpkg.com/web3-typescript-typings/-/web3-typescript-typings-0.3.2.tgz#75f65fe452e35e2b96192908199dbb7a9ab5bcc3"
+web3-typescript-typings@^0.5.0:
+ version "0.5.0"
+ resolved "https://registry.yarnpkg.com/web3-typescript-typings/-/web3-typescript-typings-0.5.0.tgz#a598ad5d4600c53d8e865c52e52b62f2ad04ec84"
dependencies:
bignumber.js "^4.0.2"
@@ -5734,7 +5082,7 @@ web3@^0.16.0:
utf8 "^2.1.1"
xmlhttprequest "*"
-web3@^0.18.0, web3@^0.18.2:
+web3@^0.18.2, web3@^0.18.4:
version "0.18.4"
resolved "https://registry.yarnpkg.com/web3/-/web3-0.18.4.tgz#81ec1784145491f2eaa8955b31c06049e07c5e7d"
dependencies:
@@ -5754,12 +5102,6 @@ web3@^0.20.0:
xhr2 "*"
xmlhttprequest "*"
-web3_beta@ethereum/web3.js#1.0:
- version "1.0.0-beta.18"
- resolved "https://codeload.github.com/ethereum/web3.js/tar.gz/eff0a026b8259ccbf2eec9fe9a8785e494addb80"
- dependencies:
- lerna "^2.0.0"
-
webpack-sources@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-1.0.1.tgz#c7356436a4d13123be2e2426a05d1dad9cbe65cf"
@@ -5767,6 +5109,32 @@ webpack-sources@^1.0.1:
source-list-map "^2.0.0"
source-map "~0.5.3"
+webpack@^2.2.1:
+ version "2.7.0"
+ resolved "https://registry.yarnpkg.com/webpack/-/webpack-2.7.0.tgz#b2a1226804373ffd3d03ea9c6bd525067034f6b1"
+ dependencies:
+ acorn "^5.0.0"
+ acorn-dynamic-import "^2.0.0"
+ ajv "^4.7.0"
+ ajv-keywords "^1.1.1"
+ async "^2.1.2"
+ enhanced-resolve "^3.3.0"
+ interpret "^1.0.0"
+ json-loader "^0.5.4"
+ json5 "^0.5.1"
+ loader-runner "^2.3.0"
+ loader-utils "^0.2.16"
+ memory-fs "~0.4.1"
+ mkdirp "~0.5.0"
+ node-libs-browser "^2.0.0"
+ source-map "^0.5.3"
+ supports-color "^3.1.0"
+ tapable "~0.2.5"
+ uglify-js "^2.8.27"
+ watchpack "^1.3.1"
+ webpack-sources "^1.0.1"
+ yargs "^6.0.0"
+
webpack@^3.0.0, webpack@^3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/webpack/-/webpack-3.1.0.tgz#ac0675e500db835f9ab2369d29ba096f51ad0731"
@@ -5853,32 +5221,6 @@ write-file-atomic@^1.1.4:
imurmurhash "^0.1.4"
slide "^1.1.5"
-write-file-atomic@^2.0.0, write-file-atomic@^2.3.0:
- version "2.3.0"
- resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-2.3.0.tgz#1ff61575c2e2a4e8e510d6fa4e243cce183999ab"
- dependencies:
- graceful-fs "^4.1.11"
- imurmurhash "^0.1.4"
- signal-exit "^3.0.2"
-
-write-json-file@^2.2.0:
- version "2.2.0"
- resolved "https://registry.yarnpkg.com/write-json-file/-/write-json-file-2.2.0.tgz#51862506bbb3b619eefab7859f1fd6c6d0530876"
- dependencies:
- detect-indent "^5.0.0"
- graceful-fs "^4.1.2"
- make-dir "^1.0.0"
- pify "^2.0.0"
- sort-keys "^1.1.1"
- write-file-atomic "^2.0.0"
-
-write-pkg@^3.1.0:
- version "3.1.0"
- resolved "https://registry.yarnpkg.com/write-pkg/-/write-pkg-3.1.0.tgz#030a9994cc9993d25b4e75a9f1a1923607291ce9"
- dependencies:
- sort-keys "^2.0.0"
- write-json-file "^2.2.0"
-
xhr2@*:
version "0.1.4"
resolved "https://registry.yarnpkg.com/xhr2/-/xhr2-0.1.4.tgz#7f87658847716db5026323812f818cadab387a5f"
@@ -5976,7 +5318,7 @@ yargs@^6.0.0:
y18n "^3.2.1"
yargs-parser "^4.2.0"
-yargs@^8.0.1, yargs@^8.0.2:
+yargs@^8.0.1:
version "8.0.2"
resolved "https://registry.yarnpkg.com/yargs/-/yargs-8.0.2.tgz#6299a9055b1cefc969ff7e79c1d918dceb22c360"
dependencies: