This repository was archived by the owner on Sep 8, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -272,6 +272,10 @@ def create_unsigned_transaction(cls,
272272 def get_canonical_transaction (self , transaction_hash : Hash32 ) -> BaseTransaction :
273273 raise NotImplementedError ("Chain classes must implement this method" )
274274
275+ @abstractmethod
276+ def get_transaction_receipt (self , transaction_hash : Hash32 ) -> Receipt :
277+ raise NotImplementedError ("Chain classes must implement this method" )
278+
275279 #
276280 # Execution API
277281 #
@@ -653,6 +657,17 @@ def create_unsigned_transaction(self,
653657 data = data ,
654658 )
655659
660+ def get_transaction_receipt (self , transaction_hash : Hash32 ) -> Receipt :
661+ transaction_block_number , transaction_index = self .chaindb .get_transaction_index (
662+ transaction_hash ,
663+ )
664+ receipt = self .chaindb .get_receipt_by_index (
665+ block_number = transaction_block_number ,
666+ receipt_index = transaction_index ,
667+ )
668+
669+ return receipt
670+
656671 #
657672 # Execution API
658673 #
Original file line number Diff line number Diff line change @@ -125,6 +125,12 @@ def get_block_transactions(
125125 def get_block_transaction_hashes (self , block_header : BlockHeader ) -> Iterable [Hash32 ]:
126126 raise NotImplementedError ("ChainDB classes must implement this method" )
127127
128+ @abstractmethod
129+ def get_receipt_by_index (self ,
130+ block_number : BlockNumber ,
131+ receipt_index : int ) -> Receipt :
132+ raise NotImplementedError ("ChainDB classes must implement this method" )
133+
128134 @abstractmethod
129135 def get_receipts (self ,
130136 header : BlockHeader ,
You can’t perform that action at this time.
0 commit comments