diff options
author | Fred Carlsen <fred@sjelfull.no> | 2018-12-15 06:24:08 +0800 |
---|---|---|
committer | Fred Carlsen <fred@sjelfull.no> | 2018-12-15 06:24:08 +0800 |
commit | e53f28c5705ad6dc5afeb672ef7491c15a682018 (patch) | |
tree | c8f946751f4fa88cfadbe621349f7f30b447e000 /contracts/test-utils | |
parent | 5c083ba16bb5db4e3b74035b73c0307b7f8db65e (diff) | |
parent | 6d45beccad44e86ddd692d0cf54c09c29c5d9daf (diff) | |
download | dexon-sol-tools-e53f28c5705ad6dc5afeb672ef7491c15a682018.tar dexon-sol-tools-e53f28c5705ad6dc5afeb672ef7491c15a682018.tar.gz dexon-sol-tools-e53f28c5705ad6dc5afeb672ef7491c15a682018.tar.bz2 dexon-sol-tools-e53f28c5705ad6dc5afeb672ef7491c15a682018.tar.lz dexon-sol-tools-e53f28c5705ad6dc5afeb672ef7491c15a682018.tar.xz dexon-sol-tools-e53f28c5705ad6dc5afeb672ef7491c15a682018.tar.zst dexon-sol-tools-e53f28c5705ad6dc5afeb672ef7491c15a682018.zip |
Merge remote-tracking branch 'upstream/development' into website
# Conflicts:
# .gitignore
# README.md
# contracts/core/CHANGELOG.json
# contracts/examples/package.json
# contracts/extensions/package.json
# contracts/interfaces/package.json
# contracts/libs/package.json
# contracts/multisig/package.json
# contracts/protocol/CHANGELOG.json
# contracts/protocol/DEPLOYS.json
# contracts/protocol/package.json
# contracts/test-utils/CHANGELOG.json
# contracts/test-utils/CHANGELOG.md
# contracts/test-utils/package.json
# contracts/tokens/CHANGELOG.json
# contracts/tokens/package.json
# contracts/utils/package.json
# packages/0x.js/CHANGELOG.json
# packages/0x.js/CHANGELOG.md
# packages/0x.js/package.json
# packages/abi-gen-wrappers/CHANGELOG.json
# packages/abi-gen-wrappers/CHANGELOG.md
# packages/abi-gen-wrappers/package.json
# packages/abi-gen/CHANGELOG.json
# packages/abi-gen/CHANGELOG.md
# packages/abi-gen/package.json
# packages/assert/CHANGELOG.json
# packages/assert/CHANGELOG.md
# packages/assert/package.json
# packages/asset-buyer/CHANGELOG.md
# packages/asset-buyer/package.json
# packages/base-contract/CHANGELOG.json
# packages/base-contract/CHANGELOG.md
# packages/base-contract/package.json
# packages/connect/CHANGELOG.json
# packages/connect/CHANGELOG.md
# packages/connect/package.json
# packages/contract-wrappers/CHANGELOG.json
# packages/contract-wrappers/CHANGELOG.md
# packages/contract-wrappers/package.json
# packages/dev-tools-pages/package.json
# packages/dev-utils/CHANGELOG.json
# packages/dev-utils/CHANGELOG.md
# packages/dev-utils/package.json
# packages/ethereum-types/CHANGELOG.json
# packages/ethereum-types/CHANGELOG.md
# packages/ethereum-types/package.json
# packages/fill-scenarios/CHANGELOG.json
# packages/fill-scenarios/CHANGELOG.md
# packages/fill-scenarios/package.json
# packages/instant/package.json
# packages/instant/src/types.ts
# packages/json-schemas/CHANGELOG.json
# packages/json-schemas/CHANGELOG.md
# packages/json-schemas/package.json
# packages/metacoin/package.json
# packages/migrations/CHANGELOG.json
# packages/migrations/CHANGELOG.md
# packages/migrations/package.json
# packages/order-utils/CHANGELOG.json
# packages/order-utils/CHANGELOG.md
# packages/order-utils/package.json
# packages/order-watcher/CHANGELOG.json
# packages/order-watcher/CHANGELOG.md
# packages/order-watcher/package.json
# packages/pipeline/package.json
# packages/pipeline/src/ormconfig.ts
# packages/pipeline/src/parsers/ddex_orders/index.ts
# packages/pipeline/src/parsers/oasis_orders/index.ts
# packages/pipeline/src/parsers/paradex_orders/index.ts
# packages/pipeline/src/parsers/token_metadata/index.ts
# packages/pipeline/src/scripts/pull_competing_dex_trades.ts
# packages/pipeline/src/scripts/pull_ddex_orderbook_snapshots.ts
# packages/pipeline/src/scripts/pull_idex_orderbook_snapshots.ts
# packages/pipeline/src/scripts/pull_missing_blocks.ts
# packages/pipeline/src/scripts/pull_oasis_orderbook_snapshots.ts
# packages/pipeline/src/scripts/pull_paradex_orderbook_snapshots.ts
# packages/pipeline/src/scripts/pull_trusted_tokens.ts
# packages/pipeline/src/scripts/update_relayer_info.ts
# packages/pipeline/src/utils/get_ohlcv_trading_pairs.ts
# packages/pipeline/src/utils/index.ts
# packages/pipeline/test/parsers/ddex_orders/index_test.ts
# packages/pipeline/test/parsers/oasis_orders/index_test.ts
# packages/pipeline/test/parsers/paradex_orders/index_test.ts
# packages/react-docs/CHANGELOG.json
# packages/react-docs/CHANGELOG.md
# packages/react-docs/package.json
# packages/react-shared/CHANGELOG.json
# packages/react-shared/CHANGELOG.md
# packages/react-shared/package.json
# packages/sol-compiler/CHANGELOG.md
# packages/sol-compiler/package.json
# packages/sol-cov/CHANGELOG.json
# packages/sol-cov/CHANGELOG.md
# packages/sol-cov/package.json
# packages/sol-doc/CHANGELOG.json
# packages/sol-doc/CHANGELOG.md
# packages/sol-doc/package.json
# packages/sol-resolver/CHANGELOG.md
# packages/sol-resolver/package.json
# packages/sra-spec/CHANGELOG.json
# packages/sra-spec/CHANGELOG.md
# packages/sra-spec/package.json
# packages/subproviders/CHANGELOG.json
# packages/subproviders/CHANGELOG.md
# packages/subproviders/package.json
# packages/testnet-faucets/package.json
# packages/types/CHANGELOG.md
# packages/types/package.json
# packages/typescript-typings/CHANGELOG.json
# packages/typescript-typings/CHANGELOG.md
# packages/typescript-typings/package.json
# packages/utils/CHANGELOG.json
# packages/utils/CHANGELOG.md
# packages/utils/package.json
# packages/web3-wrapper/CHANGELOG.json
# packages/web3-wrapper/CHANGELOG.md
# packages/web3-wrapper/package.json
# packages/website/package.json
# packages/website/public/index.html
# packages/website/ts/pages/instant/fee_percentage_slider.tsx
# yarn.lock
Diffstat (limited to 'contracts/test-utils')
-rw-r--r-- | contracts/test-utils/CHANGELOG.json | 4 | ||||
-rw-r--r-- | contracts/test-utils/CHANGELOG.md | 2 | ||||
-rw-r--r-- | contracts/test-utils/package.json | 26 | ||||
-rw-r--r-- | contracts/test-utils/src/assertions.ts | 12 | ||||
-rw-r--r-- | contracts/test-utils/src/test_with_reference.ts | 6 |
5 files changed, 25 insertions, 25 deletions
diff --git a/contracts/test-utils/CHANGELOG.json b/contracts/test-utils/CHANGELOG.json index 267fdcc61..6e4682b7e 100644 --- a/contracts/test-utils/CHANGELOG.json +++ b/contracts/test-utils/CHANGELOG.json @@ -1,11 +1,11 @@ [ { - "version": "1.0.1", + "version": "1.0.2", "changes": [ { "note": "Dependencies updated" } ], - "timestamp": 1544570656 + "timestamp": 1544739608 } ] diff --git a/contracts/test-utils/CHANGELOG.md b/contracts/test-utils/CHANGELOG.md index 22b7fb109..716353d05 100644 --- a/contracts/test-utils/CHANGELOG.md +++ b/contracts/test-utils/CHANGELOG.md @@ -5,6 +5,6 @@ Edit the package's CHANGELOG.json file only. CHANGELOG -## v1.0.1 - _December 11, 2018_ +## v1.0.2 - _December 13, 2018_ * Dependencies updated diff --git a/contracts/test-utils/package.json b/contracts/test-utils/package.json index c15ee92ad..18ec8f6a8 100644 --- a/contracts/test-utils/package.json +++ b/contracts/test-utils/package.json @@ -1,6 +1,6 @@ { "name": "@0x/contracts-test-utils", - "version": "1.0.1", + "version": "1.0.2", "engines": { "node": ">=6.12" }, @@ -40,17 +40,17 @@ "typescript": "3.0.1" }, "dependencies": { - "@0x/abi-gen": "^1.0.18", - "@0x/dev-utils": "^1.0.20", - "@0x/order-utils": "^3.0.6", - "@0x/sol-compiler": "^1.1.15", - "@0x/sol-cov": "^2.1.15", - "@0x/subproviders": "^2.1.7", - "@0x/tslint-config": "^1.0.10", - "@0x/types": "^1.4.0", - "@0x/typescript-typings": "^3.0.5", - "@0x/utils": "^2.0.7", - "@0x/web3-wrapper": "^3.2.0", + "@0x/abi-gen": "^1.0.19", + "@0x/dev-utils": "^1.0.21", + "@0x/order-utils": "^3.0.7", + "@0x/sol-compiler": "^1.1.16", + "@0x/sol-cov": "^2.1.16", + "@0x/subproviders": "^2.1.8", + "@0x/tslint-config": "^2.0.0", + "@0x/types": "^1.4.1", + "@0x/typescript-typings": "^3.0.6", + "@0x/utils": "^2.0.8", + "@0x/web3-wrapper": "^3.2.1", "@types/bn.js": "^4.11.0", "@types/ethereumjs-abi": "^0.6.0", "@types/js-combinatorics": "^0.5.29", @@ -61,7 +61,7 @@ "chai-as-promised": "^7.1.0", "chai-bignumber": "^2.0.1", "dirty-chai": "^2.0.1", - "ethereum-types": "^1.1.3", + "ethereum-types": "^1.1.4", "ethereumjs-abi": "0.6.5", "ethereumjs-util": "^5.1.1", "ethers": "~4.0.4", diff --git a/contracts/test-utils/src/assertions.ts b/contracts/test-utils/src/assertions.ts index b1dec1281..f31651f4d 100644 --- a/contracts/test-utils/src/assertions.ts +++ b/contracts/test-utils/src/assertions.ts @@ -23,7 +23,7 @@ export type sendTransactionResult = Promise<TransactionReceipt | TransactionRece * @returns either the given ganacheError or gethError depending on the backing * node. */ -async function _getGanacheOrGethError(ganacheError: string, gethError: string): Promise<string> { +async function _getGanacheOrGethErrorAsync(ganacheError: string, gethError: string): Promise<string> { if (_.isUndefined(nodeType)) { nodeType = await web3Wrapper.getNodeTypeAsync(); } @@ -38,15 +38,15 @@ async function _getGanacheOrGethError(ganacheError: string, gethError: string): } async function _getInsufficientFundsErrorMessageAsync(): Promise<string> { - return _getGanacheOrGethError("sender doesn't have enough funds", 'insufficient funds'); + return _getGanacheOrGethErrorAsync("sender doesn't have enough funds", 'insufficient funds'); } async function _getTransactionFailedErrorMessageAsync(): Promise<string> { - return _getGanacheOrGethError('revert', 'always failing transaction'); + return _getGanacheOrGethErrorAsync('revert', 'always failing transaction'); } async function _getContractCallFailedErrorMessageAsync(): Promise<string> { - return _getGanacheOrGethError('revert', 'Contract call failed'); + return _getGanacheOrGethErrorAsync('revert', 'Contract call failed'); } /** @@ -54,7 +54,7 @@ async function _getContractCallFailedErrorMessageAsync(): Promise<string> { * contract call. The exact error message depends on the backing Ethereum node. */ export async function getInvalidOpcodeErrorMessageForCallAsync(): Promise<string> { - return _getGanacheOrGethError('invalid opcode', 'Contract call failed'); + return _getGanacheOrGethErrorAsync('invalid opcode', 'Contract call failed'); } /** @@ -65,7 +65,7 @@ export async function getInvalidOpcodeErrorMessageForCallAsync(): Promise<string * @returns the expected error message. */ export async function getRevertReasonOrErrorMessageForSendTransactionAsync(reason: RevertReason): Promise<string> { - return _getGanacheOrGethError(reason, 'always failing transaction'); + return _getGanacheOrGethErrorAsync(reason, 'always failing transaction'); } /** diff --git a/contracts/test-utils/src/test_with_reference.ts b/contracts/test-utils/src/test_with_reference.ts index b80be4a6c..75d15b0aa 100644 --- a/contracts/test-utils/src/test_with_reference.ts +++ b/contracts/test-utils/src/test_with_reference.ts @@ -26,7 +26,7 @@ type PromiseResult<T> = Value<T> | ErrorMessage; // TODO(albrow): This seems like a generic utility function that could exist in // lodash. We should replace it by a library implementation, or move it to our // own. -async function evaluatePromise<T>(promise: Promise<T>): Promise<PromiseResult<T>> { +async function evaluatePromiseAsync<T>(promise: Promise<T>): Promise<PromiseResult<T>> { try { return new Value<T>(await promise); } catch (e) { @@ -93,10 +93,10 @@ export async function testWithReferenceFuncAsync( values: any[], ): Promise<void> { // Measure correct behaviour - const expected = await evaluatePromise(referenceFuncAsync(...values)); + const expected = await evaluatePromiseAsync(referenceFuncAsync(...values)); // Measure actual behaviour - const actual = await evaluatePromise(testFuncAsync(...values)); + const actual = await evaluatePromiseAsync(testFuncAsync(...values)); // Compare behaviour if (expected instanceof ErrorMessage) { |