diff options
author | Brandon Millman <brandon.millman@gmail.com> | 2018-07-24 13:43:26 +0800 |
---|---|---|
committer | Brandon Millman <brandon.millman@gmail.com> | 2018-07-24 13:43:26 +0800 |
commit | e49d136b99cea375052c7278c0bca0df6524d2d8 (patch) | |
tree | d9ef67f50cfa860fd5da76b686aca2a7578f1d27 /packages/web3-wrapper/src/web3_wrapper.ts | |
parent | 6ffa907f0ef3c94d3ea7d79d99a24939f62e0eb8 (diff) | |
parent | a05b14e4d9659be1cc495ee33fd8962ce773f87f (diff) | |
download | dexon-sol-tools-e49d136b99cea375052c7278c0bca0df6524d2d8.tar dexon-sol-tools-e49d136b99cea375052c7278c0bca0df6524d2d8.tar.gz dexon-sol-tools-e49d136b99cea375052c7278c0bca0df6524d2d8.tar.bz2 dexon-sol-tools-e49d136b99cea375052c7278c0bca0df6524d2d8.tar.lz dexon-sol-tools-e49d136b99cea375052c7278c0bca0df6524d2d8.tar.xz dexon-sol-tools-e49d136b99cea375052c7278c0bca0df6524d2d8.tar.zst dexon-sol-tools-e49d136b99cea375052c7278c0bca0df6524d2d8.zip |
Merge branch 'v2-prototype' into feature/website/jobs-page-part2
* v2-prototype: (38 commits)
Revert "Publish"
Publish
Remove ERC721 callback functions
Use != instead of > in loops, add sanity checks to market fill functions
Add more tests and fixes
Remove MConstants and MixinConstants for LibConstants
Remove redundant external call by reimplementing fillOrderNoThrow
Remove orders length check
Add assertValidFillResults
Update web3Wrapper CHANGELOG
Get actual gasPrice from transaction instead of setting default
Store orders length in varible before looping over orders
Use transferFrom instead of safeTransferFrom
Fix minimal tests
Fix rounding error issues, use different logic when makerAsset is ZRX
Rename marketSellEth => marketSellWeth
Update percentage constants
Update transferEthFeeAndRefund, add check to ERC721 transfer
Refactor forwarding contract architecture, remove batch functions
Updated CHANGELOGS
...
Diffstat (limited to 'packages/web3-wrapper/src/web3_wrapper.ts')
-rw-r--r-- | packages/web3-wrapper/src/web3_wrapper.ts | 15 |
1 files changed, 14 insertions, 1 deletions
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', |