@@ -132,6 +132,11 @@ def send_transaction_munger(self, transaction: TxParams) -> Tuple[TxParams]:
132
132
mungers = [default_root_munger ]
133
133
)
134
134
135
+ _get_raw_transaction : Method [Callable [[_Hash32 ], HexBytes ]] = Method (
136
+ RPC .eth_getRawTransactionByHash ,
137
+ mungers = [default_root_munger ]
138
+ )
139
+
135
140
def _generate_gas_price (self , transaction_params : Optional [TxParams ] = None ) -> Optional [Wei ]:
136
141
if self .gasPriceStrategy :
137
142
return self .gasPriceStrategy (self .web3 , transaction_params )
@@ -205,6 +210,10 @@ async def get_transaction(self, transaction_hash: _Hash32) -> TxData:
205
210
# types ignored b/c mypy conflict with BlockingEth properties
206
211
return await self ._get_transaction (transaction_hash ) # type: ignore
207
212
213
+ async def get_raw_transaction (self , transaction_hash : _Hash32 ) -> TxData :
214
+ # types ignored b/c mypy conflict with BlockingEth properties
215
+ return await self ._get_raw_transaction (transaction_hash ) # type: ignore
216
+
208
217
async def generate_gas_price (
209
218
self , transaction_params : Optional [TxParams ] = None
210
219
) -> Optional [Wei ]:
@@ -501,6 +510,9 @@ def get_block(
501
510
def get_transaction (self , transaction_hash : _Hash32 ) -> TxData :
502
511
return self ._get_transaction (transaction_hash )
503
512
513
+ def get_raw_transaction (self , transaction_hash : _Hash32 ) -> _Hash32 :
514
+ return self ._get_raw_transaction (transaction_hash )
515
+
504
516
def getTransactionFromBlock (
505
517
self , block_identifier : BlockIdentifier , transaction_index : int
506
518
) -> NoReturn :
0 commit comments