@@ -132,6 +132,11 @@ def send_transaction_munger(self, transaction: TxParams) -> Tuple[TxParams]:
132132 mungers = [default_root_munger ]
133133 )
134134
135+ _get_raw_transaction : Method [Callable [[_Hash32 ], HexBytes ]] = Method (
136+ RPC .eth_getRawTransactionByHash ,
137+ mungers = [default_root_munger ]
138+ )
139+
135140 def _generate_gas_price (self , transaction_params : Optional [TxParams ] = None ) -> Optional [Wei ]:
136141 if self .gasPriceStrategy :
137142 return self .gasPriceStrategy (self .web3 , transaction_params )
@@ -205,6 +210,10 @@ async def get_transaction(self, transaction_hash: _Hash32) -> TxData:
205210 # types ignored b/c mypy conflict with BlockingEth properties
206211 return await self ._get_transaction (transaction_hash ) # type: ignore
207212
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+
208217 async def generate_gas_price (
209218 self , transaction_params : Optional [TxParams ] = None
210219 ) -> Optional [Wei ]:
@@ -501,6 +510,9 @@ def get_block(
501510 def get_transaction (self , transaction_hash : _Hash32 ) -> TxData :
502511 return self ._get_transaction (transaction_hash )
503512
513+ def get_raw_transaction (self , transaction_hash : _Hash32 ) -> _Hash32 :
514+ return self ._get_raw_transaction (transaction_hash )
515+
504516 def getTransactionFromBlock (
505517 self , block_identifier : BlockIdentifier , transaction_index : int
506518 ) -> NoReturn :
0 commit comments