Get actual gasPrice from transaction instead of setting default
This commit is contained in:
@@ -14,6 +14,7 @@ import {
|
||||
Provider,
|
||||
RawLogEntry,
|
||||
TraceParams,
|
||||
Transaction,
|
||||
TransactionReceipt,
|
||||
TransactionReceiptWithDecodedLogs,
|
||||
TransactionTrace,
|
||||
@@ -220,6 +221,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
|
||||
|
Reference in New Issue
Block a user