diff options
author | Fabio Berger <me@fabioberger.com> | 2017-11-10 04:02:28 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2017-11-10 04:02:28 +0800 |
commit | 9ff42053c3f145ab6d5486d62325ed222363a8c5 (patch) | |
tree | f76517056ccbb94317389ee042662eb64bc229b8 /src/web3_wrapper.ts | |
parent | 5623400557232b974e11e786cf6bfa49128a04e2 (diff) | |
download | dexon-sol-tools-9ff42053c3f145ab6d5486d62325ed222363a8c5.tar dexon-sol-tools-9ff42053c3f145ab6d5486d62325ed222363a8c5.tar.gz dexon-sol-tools-9ff42053c3f145ab6d5486d62325ed222363a8c5.tar.bz2 dexon-sol-tools-9ff42053c3f145ab6d5486d62325ed222363a8c5.tar.lz dexon-sol-tools-9ff42053c3f145ab6d5486d62325ed222363a8c5.tar.xz dexon-sol-tools-9ff42053c3f145ab6d5486d62325ed222363a8c5.tar.zst dexon-sol-tools-9ff42053c3f145ab6d5486d62325ed222363a8c5.zip |
Add numConfirmations arg so that caller can decide on numConfirmations at which they want to watch orders
Diffstat (limited to 'src/web3_wrapper.ts')
-rw-r--r-- | src/web3_wrapper.ts | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/web3_wrapper.ts b/src/web3_wrapper.ts index 01d572654..d03c102b2 100644 --- a/src/web3_wrapper.ts +++ b/src/web3_wrapper.ts @@ -100,6 +100,10 @@ export class Web3Wrapper { const signData = await promisify(this.web3.eth.sign)(address, message); return signData; } + public async getBlockNumberAsync(): Promise<number> { + const blockNumber = await promisify(this.web3.eth.getBlockNumber)(); + return blockNumber; + } public async getBlockAsync(blockParam: string|Web3.BlockParam): Promise<Web3.BlockWithoutTransactionData> { const block = await promisify(this.web3.eth.getBlock)(blockParam); return block; |