diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-09-26 20:55:52 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-09-26 20:55:52 +0800 |
commit | 5d73eebf6abe52763ea6984f85102157abea5b6c (patch) | |
tree | 8cec1c58fe22ba62d979dbc1c6ff366e81985b8d /packages/contracts | |
parent | f3deabccf4e6caec57351a09f82b3f786122b5ea (diff) | |
parent | 13aa98f0f3431e4ea4db07794a06304c237e8d45 (diff) | |
download | dexon-0x-contracts-5d73eebf6abe52763ea6984f85102157abea5b6c.tar.gz dexon-0x-contracts-5d73eebf6abe52763ea6984f85102157abea5b6c.tar.zst dexon-0x-contracts-5d73eebf6abe52763ea6984f85102157abea5b6c.zip |
Merge branch 'development' into feature/ts-ethers
Diffstat (limited to 'packages/contracts')
-rw-r--r-- | packages/contracts/package.json | 28 | ||||
-rw-r--r-- | packages/contracts/test/multisig/multi_sig_with_time_lock.ts | 5 | ||||
-rw-r--r-- | packages/contracts/test/utils/block_timestamp.ts | 7 |
3 files changed, 23 insertions, 17 deletions
diff --git a/packages/contracts/package.json b/packages/contracts/package.json index 628e74a78..a6e7af0ac 100644 --- a/packages/contracts/package.json +++ b/packages/contracts/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "contracts", - "version": "2.1.44", + "version": "2.1.47", "engines": { "node": ">=6.12" }, @@ -45,16 +45,16 @@ }, "homepage": "https://github.com/0xProject/0x-monorepo/packages/contracts/README.md", "devDependencies": { - "@0xproject/abi-gen": "^1.0.8", - "@0xproject/dev-utils": "^1.0.7", - "@0xproject/sol-compiler": "^1.1.2", - "@0xproject/sol-cov": "^2.1.2", - "@0xproject/subproviders": "^2.0.2", + "@0xproject/abi-gen": "^1.0.11", + "@0xproject/dev-utils": "^1.0.10", + "@0xproject/sol-compiler": "^1.1.5", + "@0xproject/sol-cov": "^2.1.5", + "@0xproject/subproviders": "^2.0.5", "@0xproject/tslint-config": "^1.0.7", "@types/bn.js": "^4.11.0", "@types/ethereumjs-abi": "^0.6.0", "@types/lodash": "4.14.104", - "@types/node": "^8.0.53", + "@types/node": "*", "@types/yargs": "^10.0.0", "chai": "^4.0.1", "chai-as-promised": "^7.1.0", @@ -72,15 +72,15 @@ "yargs": "^10.0.3" }, "dependencies": { - "@0xproject/base-contract": "^2.0.2", - "@0xproject/order-utils": "^1.0.2", - "@0xproject/types": "^1.0.1", - "@0xproject/typescript-typings": "^2.0.0", - "@0xproject/utils": "^1.0.8", - "@0xproject/web3-wrapper": "^2.0.2", + "@0xproject/base-contract": "^2.0.5", + "@0xproject/order-utils": "^1.0.5", + "@0xproject/types": "^1.1.1", + "@0xproject/typescript-typings": "^2.0.2", + "@0xproject/utils": "^1.0.11", + "@0xproject/web3-wrapper": "^3.0.1", "@types/js-combinatorics": "^0.5.29", "bn.js": "^4.11.8", - "ethereum-types": "^1.0.6", + "ethereum-types": "^1.0.8", "ethereumjs-abi": "0.6.5", "ethereumjs-util": "^5.1.1", "ethers": "^4.0.0-beta.14", diff --git a/packages/contracts/test/multisig/multi_sig_with_time_lock.ts b/packages/contracts/test/multisig/multi_sig_with_time_lock.ts index 05d8bbb36..0b17c298b 100644 --- a/packages/contracts/test/multisig/multi_sig_with_time_lock.ts +++ b/packages/contracts/test/multisig/multi_sig_with_time_lock.ts @@ -269,7 +269,10 @@ describe('MultiSigWalletWithTimeLock', () => { expect(confirmRes.logs).to.have.length(2); const blockNum = await web3Wrapper.getBlockNumberAsync(); - const blockInfo = await web3Wrapper.getBlockAsync(blockNum); + const blockInfo = await web3Wrapper.getBlockIfExistsAsync(blockNum); + if (_.isUndefined(blockInfo)) { + throw new Error(`Unexpectedly failed to fetch block at #${blockNum}`); + } const timestamp = new BigNumber(blockInfo.timestamp); const confirmationTimeBigNum = new BigNumber(await multiSig.confirmationTimes.callAsync(txId)); diff --git a/packages/contracts/test/utils/block_timestamp.ts b/packages/contracts/test/utils/block_timestamp.ts index 1159792c4..66c13eed1 100644 --- a/packages/contracts/test/utils/block_timestamp.ts +++ b/packages/contracts/test/utils/block_timestamp.ts @@ -35,6 +35,9 @@ export async function increaseTimeAndMineBlockAsync(seconds: number): Promise<nu * @returns a new Promise which will resolve with the timestamp in seconds. */ export async function getLatestBlockTimestampAsync(): Promise<number> { - const currentBlock = await web3Wrapper.getBlockAsync('latest'); - return currentBlock.timestamp; + const currentBlockIfExists = await web3Wrapper.getBlockIfExistsAsync('latest'); + if (_.isUndefined(currentBlockIfExists)) { + throw new Error(`Unable to fetch latest block.`); + } + return currentBlockIfExists.timestamp; } |