diff options
author | Leonid <logvinov.leon@gmail.com> | 2018-02-05 19:33:40 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-05 19:33:40 +0800 |
commit | 7b4f2b47de393b7ed6d5c264c8e80864d196180c (patch) | |
tree | 8e86af8000e0aedd7241a00c2189d8f7ca0fc2ad /packages/web3-wrapper | |
parent | 400a97e7a8f76d894d47368425bbe1e33fa5b255 (diff) | |
parent | c7ad6ebad6ab65a4b1e4a2084e744c6ca2bc09b8 (diff) | |
download | dexon-sol-tools-7b4f2b47de393b7ed6d5c264c8e80864d196180c.tar dexon-sol-tools-7b4f2b47de393b7ed6d5c264c8e80864d196180c.tar.gz dexon-sol-tools-7b4f2b47de393b7ed6d5c264c8e80864d196180c.tar.bz2 dexon-sol-tools-7b4f2b47de393b7ed6d5c264c8e80864d196180c.tar.lz dexon-sol-tools-7b4f2b47de393b7ed6d5c264c8e80864d196180c.tar.xz dexon-sol-tools-7b4f2b47de393b7ed6d5c264c8e80864d196180c.tar.zst dexon-sol-tools-7b4f2b47de393b7ed6d5c264c8e80864d196180c.zip |
Merge branch 'development' into fix/ether_token_address
Diffstat (limited to 'packages/web3-wrapper')
-rw-r--r-- | packages/web3-wrapper/README.md | 6 | ||||
-rw-r--r-- | packages/web3-wrapper/package.json | 13 | ||||
-rw-r--r-- | packages/web3-wrapper/src/index.ts | 4 |
3 files changed, 17 insertions, 6 deletions
diff --git a/packages/web3-wrapper/README.md b/packages/web3-wrapper/README.md index 5b22aefd4..7ed66ca41 100644 --- a/packages/web3-wrapper/README.md +++ b/packages/web3-wrapper/README.md @@ -44,6 +44,12 @@ yarn install yarn build ``` +or + +```bash +yarn build:watch +``` + ### Lint ```bash diff --git a/packages/web3-wrapper/package.json b/packages/web3-wrapper/package.json index ec9ff3bb4..baae437a7 100644 --- a/packages/web3-wrapper/package.json +++ b/packages/web3-wrapper/package.json @@ -1,10 +1,11 @@ { "name": "@0xproject/web3-wrapper", - "version": "0.1.8", + "version": "0.1.9", "description": "Wraps around web3 and gives a nicer interface", "main": "lib/index.js", "types": "lib/index.d.ts", "scripts": { + "build:watch": "tsc -w", "build": "tsc", "clean": "shx rm -rf lib", "lint": "tslint --project . 'src/**/*.ts'" @@ -19,17 +20,17 @@ }, "homepage": "https://github.com/0xProject/0x.js/packages/web3-wrapper/README.md", "devDependencies": { - "@0xproject/tslint-config": "^0.4.5", - "@0xproject/types": "^0.1.7", + "@0xproject/tslint-config": "^0.4.6", + "@0xproject/types": "^0.1.8", "@types/lodash": "^4.14.86", "npm-run-all": "^4.1.2", "shx": "^0.2.2", "tslint": "5.8.0", - "typescript": "~2.6.1", - "web3-typescript-typings": "^0.9.7" + "typescript": "2.7.1", + "web3-typescript-typings": "^0.9.8" }, "dependencies": { - "@0xproject/utils": "^0.2.3", + "@0xproject/utils": "^0.2.4", "lodash": "^4.17.4", "web3": "^0.20.0" } 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); |