diff options
author | Leonid <logvinov.leon@gmail.com> | 2018-01-31 03:27:14 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-31 03:27:14 +0800 |
commit | 2bcb7d56394c43acd68d1823092de2ad047abc6d (patch) | |
tree | 55684889214373fcd66ca52efa079f381cfb388b /packages/web3-wrapper/src/index.ts | |
parent | d004df56e38726ed7f1b775da33d8f37aae270db (diff) | |
parent | 7ad314472d27e8a6c6ee8242f4f335d414709f4d (diff) | |
download | dexon-sol-tools-2bcb7d56394c43acd68d1823092de2ad047abc6d.tar dexon-sol-tools-2bcb7d56394c43acd68d1823092de2ad047abc6d.tar.gz dexon-sol-tools-2bcb7d56394c43acd68d1823092de2ad047abc6d.tar.bz2 dexon-sol-tools-2bcb7d56394c43acd68d1823092de2ad047abc6d.tar.lz dexon-sol-tools-2bcb7d56394c43acd68d1823092de2ad047abc6d.tar.xz dexon-sol-tools-2bcb7d56394c43acd68d1823092de2ad047abc6d.tar.zst dexon-sol-tools-2bcb7d56394c43acd68d1823092de2ad047abc6d.zip |
Merge pull request #332 from 0xProject/feature/contracts-abi-gen
Contracts refactor. Bye, truffle!!! :clap:
Diffstat (limited to 'packages/web3-wrapper/src/index.ts')
-rw-r--r-- | packages/web3-wrapper/src/index.ts | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/packages/web3-wrapper/src/index.ts b/packages/web3-wrapper/src/index.ts index c4826f2be..a2878fc2a 100644 --- a/packages/web3-wrapper/src/index.ts +++ b/packages/web3-wrapper/src/index.ts @@ -134,6 +134,10 @@ export class Web3Wrapper { const gas = await promisify<number>(this._web3.eth.estimateGas)({ data }); return gas; } + public async sendTransactionAsync(txData: Web3.TxData): Promise<string> { + const txHash = await promisify<string>(this._web3.eth.sendTransaction)(txData); + return txHash; + } private async _sendRawPayloadAsync<A>(payload: Web3.JSONRPCRequestPayload): Promise<A> { const sendAsync = this._web3.currentProvider.sendAsync.bind(this._web3.currentProvider); const response = await promisify<Web3.JSONRPCResponsePayload>(sendAsync)(payload); |