From fbc75225a3c209c26e12a5d3f4de97675e7ed850 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tino=20Mart=C3=ADnez=20Molina?= Date: Fri, 1 Sep 2023 19:04:18 +0200 Subject: [PATCH] Remove `LogReceipt`'s `payload` and `topic` attributes and refactor `LogEntry` to `LogReceipt` Add newsfragments --- newsfragments/3043.bugfix.rst | 1 + web3/types.py | 11 +++-------- 2 files changed, 4 insertions(+), 8 deletions(-) create mode 100644 newsfragments/3043.bugfix.rst diff --git a/newsfragments/3043.bugfix.rst b/newsfragments/3043.bugfix.rst new file mode 100644 index 0000000000..f02868c456 --- /dev/null +++ b/newsfragments/3043.bugfix.rst @@ -0,0 +1 @@ +Update `LogReceipt` and `TxReceipt` declarations. Remove `LogReceipt`'s `payload` and `topic` attributes. Refactor `LogEntry` to `LogReceipt`. diff --git a/web3/types.py b/web3/types.py index 519d6b4591..67042b09b9 100644 --- a/web3/types.py +++ b/web3/types.py @@ -225,11 +225,11 @@ class BlockData(TypedDict, total=False): proofOfAuthorityData: HexBytes -class LogEntry(TypedDict): +class LogReceipt(TypedDict): address: ChecksumAddress blockHash: HexBytes blockNumber: BlockNumber - data: HexStr + data: HexBytes logIndex: int topics: Sequence[HexBytes] transactionHash: HexBytes @@ -237,11 +237,6 @@ class LogEntry(TypedDict): removed: bool -class LogReceipt(LogEntry): - payload: HexBytes - topic: HexBytes - - class SubscriptionResponse(TypedDict): subscription: HexBytes @@ -255,7 +250,7 @@ class TransactionTypeSubscriptionResponse(SubscriptionResponse): class LogsSubscriptionResponse(SubscriptionResponse): - result: LogEntry + result: LogReceipt class SyncProgress(TypedDict):