diff options
author | fragosti <francesco.agosti93@gmail.com> | 2018-07-26 01:33:13 +0800 |
---|---|---|
committer | fragosti <francesco.agosti93@gmail.com> | 2018-07-26 01:33:13 +0800 |
commit | da4b70fcae1da2c35905a30b79707b3f27b9fa3a (patch) | |
tree | 65dbdb8f75c8e93cd788149610522f5bf5ada643 /packages/web3-wrapper | |
parent | ad4c2b95e4722e6d227c26f436bedf7b06f5356a (diff) | |
parent | 05b35c0fdcbca7980d4195e96ec791c1c2d13398 (diff) | |
download | dexon-sol-tools-da4b70fcae1da2c35905a30b79707b3f27b9fa3a.tar dexon-sol-tools-da4b70fcae1da2c35905a30b79707b3f27b9fa3a.tar.gz dexon-sol-tools-da4b70fcae1da2c35905a30b79707b3f27b9fa3a.tar.bz2 dexon-sol-tools-da4b70fcae1da2c35905a30b79707b3f27b9fa3a.tar.lz dexon-sol-tools-da4b70fcae1da2c35905a30b79707b3f27b9fa3a.tar.xz dexon-sol-tools-da4b70fcae1da2c35905a30b79707b3f27b9fa3a.tar.zst dexon-sol-tools-da4b70fcae1da2c35905a30b79707b3f27b9fa3a.zip |
Merge branch 'v2-prototype' of https://github.com/0xProject/0x-monorepo into feature/web3-wrapper/unexport-marshaller
Diffstat (limited to 'packages/web3-wrapper')
-rw-r--r-- | packages/web3-wrapper/CHANGELOG.json | 19 | ||||
-rw-r--r-- | packages/web3-wrapper/CHANGELOG.md | 21 | ||||
-rw-r--r-- | packages/web3-wrapper/package.json | 16 | ||||
-rw-r--r-- | packages/web3-wrapper/src/web3_wrapper.ts | 15 |
4 files changed, 60 insertions, 11 deletions
diff --git a/packages/web3-wrapper/CHANGELOG.json b/packages/web3-wrapper/CHANGELOG.json index f0d850cf0..74d34cd4a 100644 --- a/packages/web3-wrapper/CHANGELOG.json +++ b/packages/web3-wrapper/CHANGELOG.json @@ -1,5 +1,24 @@ [ { + "version": "1.1.0", + "changes": [ + { + "note": "Add `getTransactionByHashAsync` method", + "pr": 847 + } + ] + }, + { + "timestamp": 1532357734, + "version": "1.0.1", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, + { + "timestamp": 1532043000, "version": "1.0.0", "changes": [ { diff --git a/packages/web3-wrapper/CHANGELOG.md b/packages/web3-wrapper/CHANGELOG.md index 324e60643..b17baaeeb 100644 --- a/packages/web3-wrapper/CHANGELOG.md +++ b/packages/web3-wrapper/CHANGELOG.md @@ -1,10 +1,20 @@ <!-- -This file is auto-generated using the monorepo-scripts package. Don't edit directly. +changelogUtils.file is auto-generated using the monorepo-scripts package. Don't edit directly. Edit the package's CHANGELOG.json file only. --> CHANGELOG +## v1.0.1 - _July 23, 2018_ + + * Dependencies updated + +## v1.0.0 - _July 20, 2018_ + + * Export `marshaller` utility file. (#829) + * Add `getNodeTypeAsync` method (#812) + * Stop exporting uniqueVersionIds object (#897) + ## v0.7.3 - _July 18, 2018_ * Dependencies updated @@ -19,7 +29,14 @@ CHANGELOG ## v0.7.0 - _June 4, 2018_ - * Add default parameters when sending a raw payload + * Add `web3Wrapper.getContractCodeAsync` (#675) + * Add `web3Wrapper.getTransactionTraceAsync` (#675) + * Add `web3Wrapper.getBlockWithTransactionDataAsync` (#675) + * Add exported uniqueVersionIds object (#622) + * Update increaseTimeAsync to work with Geth (#622) + * Make callAsync throw if raw call result is 0x (null) (#622) + * Add new setHeadAsync method (#622) + * Improve performance of awaitTransactionMinedAsync by immediately checking if the transaction was already mined instead of waiting for the first interval. (#688) ## v0.6.4 - _May 22, 2018_ diff --git a/packages/web3-wrapper/package.json b/packages/web3-wrapper/package.json index d9c577ea9..caf7ea6bc 100644 --- a/packages/web3-wrapper/package.json +++ b/packages/web3-wrapper/package.json @@ -1,6 +1,6 @@ { "name": "@0xproject/web3-wrapper", - "version": "1.0.0", + "version": "1.0.1", "engines": { "node": ">=6.12" }, @@ -45,8 +45,8 @@ }, "homepage": "https://github.com/0xProject/0x-monorepo/packages/web3-wrapper/README.md", "devDependencies": { - "@0xproject/monorepo-scripts": "^1.0.0", - "@0xproject/tslint-config": "^1.0.0", + "@0xproject/monorepo-scripts": "^1.0.1", + "@0xproject/tslint-config": "^1.0.1", "@types/lodash": "4.14.104", "chai": "^4.0.1", "chai-as-promised": "^7.1.0", @@ -64,11 +64,11 @@ "typescript": "2.7.1" }, "dependencies": { - "@0xproject/assert": "^1.0.0", - "@0xproject/json-schemas": "^1.0.0-rc.1", - "@0xproject/typescript-typings": "^1.0.0", - "@0xproject/utils": "^1.0.0", - "ethereum-types": "^1.0.0", + "@0xproject/assert": "^1.0.1", + "@0xproject/json-schemas": "^1.0.0", + "@0xproject/typescript-typings": "^1.0.1", + "@0xproject/utils": "^1.0.1", + "ethereum-types": "^1.0.1", "ethereumjs-util": "^5.1.1", "ethers": "3.0.22", "lodash": "^4.17.4" diff --git a/packages/web3-wrapper/src/web3_wrapper.ts b/packages/web3-wrapper/src/web3_wrapper.ts index 4439eb284..dd35e2094 100644 --- a/packages/web3-wrapper/src/web3_wrapper.ts +++ b/packages/web3-wrapper/src/web3_wrapper.ts @@ -14,6 +14,7 @@ import { Provider, RawLogEntry, TraceParams, + Transaction, TransactionReceipt, TransactionReceiptWithDecodedLogs, TransactionTrace, @@ -221,6 +222,19 @@ export class Web3Wrapper { return transactionReceipt; } /** + * Retrieves the transaction data for a given transaction + * @param txHash Transaction hash + * @returns The raw transaction data + */ + public async getTransactionByHashAsync(txHash: string): Promise<Transaction> { + assert.isHexString('txHash', txHash); + const transaction = await this._sendRawPayloadAsync<Transaction>({ + method: 'eth_getTransactionByHash', + params: [txHash], + }); + return transaction; + } + /** * Retrieves an accounts Ether balance in wei * @param owner Account whose balance you wish to check * @returns Balance in wei @@ -292,7 +306,6 @@ export class Web3Wrapper { */ public async signMessageAsync(address: string, message: string): Promise<string> { assert.isETHAddressHex('address', address); - assert.isETHAddressHex('address', address); assert.isString('message', message); // TODO: Should this be stricter? Hex string? const signData = await this._sendRawPayloadAsync<string>({ method: 'eth_sign', |