aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts/src/utils/increase_time.ts
diff options
context:
space:
mode:
authorAlex Browne <stephenalexbrowne@gmail.com>2018-06-06 07:45:37 +0800
committerAlex Browne <stephenalexbrowne@gmail.com>2018-06-07 03:41:14 +0800
commitba6806df5d2d4b31c125a0c58cc6cd65bf555933 (patch)
tree2519d43d70f8f7d6c610bb2de51a17f37f15c9aa /packages/contracts/src/utils/increase_time.ts
parentfe121012784e0f1ed844c3ce6190e2d5b258b55e (diff)
downloaddexon-sol-tools-ba6806df5d2d4b31c125a0c58cc6cd65bf555933.tar
dexon-sol-tools-ba6806df5d2d4b31c125a0c58cc6cd65bf555933.tar.gz
dexon-sol-tools-ba6806df5d2d4b31c125a0c58cc6cd65bf555933.tar.bz2
dexon-sol-tools-ba6806df5d2d4b31c125a0c58cc6cd65bf555933.tar.lz
dexon-sol-tools-ba6806df5d2d4b31c125a0c58cc6cd65bf555933.tar.xz
dexon-sol-tools-ba6806df5d2d4b31c125a0c58cc6cd65bf555933.tar.zst
dexon-sol-tools-ba6806df5d2d4b31c125a0c58cc6cd65bf555933.zip
Fix linter errors
Diffstat (limited to 'packages/contracts/src/utils/increase_time.ts')
-rw-r--r--packages/contracts/src/utils/increase_time.ts9
1 files changed, 7 insertions, 2 deletions
diff --git a/packages/contracts/src/utils/increase_time.ts b/packages/contracts/src/utils/increase_time.ts
index 726a759f3..5336a180d 100644
--- a/packages/contracts/src/utils/increase_time.ts
+++ b/packages/contracts/src/utils/increase_time.ts
@@ -5,8 +5,13 @@ import { web3Wrapper } from './web3_wrapper';
let firstAccount: string | undefined;
-// increases time by the given number of seconds and then mines a block so that
-// the current block timestamp has the offset applied.
+/**
+ * Increases time by the given number of seconds and then mines a block so that
+ * the current block timestamp has the offset applied.
+ * @param seconds the Promise which is expected to reject
+ * @returns a new Promise which will resolve with the new total time offset or
+ * reject if the time could not be increased.
+ */
export async function increaseTimeAndMineBlockAsync(seconds: number): Promise<number> {
if (_.isUndefined(firstAccount)) {
const accounts = await web3Wrapper.getAvailableAddressesAsync();