2021-07-12 14:08:17 -04:00

20 lines
439 B
Python

from typing import Dict, List, Optional
from pydantic import BaseModel
class Block(BaseModel):
block_number: int
calls: List[dict]
data: dict
logs: List[dict]
receipts: dict
transaction_hashes: List[str]
txs_gas_data: Dict[str, dict]
def get_filtered_calls(self, hash: str) -> List[dict]:
return [
call for call in self.calls
if call["transactionHash"] == hash
]