aboutsummaryrefslogtreecommitdiffstats
path: root/packages/web3-wrapper
diff options
context:
space:
mode:
authorAmir Bandeali <abandeali1@gmail.com>2018-07-23 23:50:39 +0800
committerGitHub <noreply@github.com>2018-07-23 23:50:39 +0800
commita05b14e4d9659be1cc495ee33fd8962ce773f87f (patch)
tree0197338c16c6e990613c7cb390ca038286ca10ee /packages/web3-wrapper
parenta66ccaa1da2af753038bf22a5e7e63bdc307bf2f (diff)
parent06396b8874f2cff1333d3f19c536015502f69d28 (diff)
downloaddexon-0x-contracts-a05b14e4d9659be1cc495ee33fd8962ce773f87f.tar.gz
dexon-0x-contracts-a05b14e4d9659be1cc495ee33fd8962ce773f87f.tar.zst
dexon-0x-contracts-a05b14e4d9659be1cc495ee33fd8962ce773f87f.zip
Merge pull request #847 from 0xProject/refactor/contracts/simplify-forwarder
Refactor forwarding contract architecture, remove batch functions
Diffstat (limited to 'packages/web3-wrapper')
-rw-r--r--packages/web3-wrapper/CHANGELOG.json9
-rw-r--r--packages/web3-wrapper/src/web3_wrapper.ts14
2 files changed, 23 insertions, 0 deletions
diff --git a/packages/web3-wrapper/CHANGELOG.json b/packages/web3-wrapper/CHANGELOG.json
index d707ef486..975f83037 100644
--- a/packages/web3-wrapper/CHANGELOG.json
+++ b/packages/web3-wrapper/CHANGELOG.json
@@ -1,5 +1,14 @@
[
{
+ "version": "1.1.0",
+ "changes": [
+ {
+ "note": "Add `getTransactionByHashAsync` method",
+ "pr": 847
+ }
+ ]
+ },
+ {
"timestamp": 1532357734,
"version": "1.0.1",
"changes": [
diff --git a/packages/web3-wrapper/src/web3_wrapper.ts b/packages/web3-wrapper/src/web3_wrapper.ts
index 883a99bb4..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