3
3
4
4
from eth_typing import BlockNumber , Address , ChecksumAddress
5
5
from hexbytes import HexBytes
6
+ from web3 .datastructures import AttributeDict
6
7
from web3 .eth import Eth
7
8
from web3 .exceptions import ContractLogicError
8
9
from web3 .types import FilterParams , LogReceipt , CallOverride , BlockIdentifier , TxParams , BlockData , _Hash32
@@ -156,7 +157,7 @@ def get_logs(
156
157
if isinstance (from_block_original , int ):
157
158
from_block_body = None
158
159
from_block = from_block_original
159
- elif isinstance (from_block_original , BlockData ):
160
+ elif isinstance (from_block_original , AttributeDict ) or isinstance ( from_block_original , dict ):
160
161
from_block_body = from_block_original
161
162
from_block = from_block_original ["number" ]
162
163
filter_params = {** filter_params , "fromBlock" : from_block }
@@ -168,7 +169,7 @@ def get_logs(
168
169
if isinstance (to_block_original , int ):
169
170
to_block_body = None
170
171
to_block = to_block_original
171
- elif isinstance (to_block_original , BlockData ):
172
+ elif isinstance (to_block_original , AttributeDict ) or isinstance ( to_block_original , dict ):
172
173
to_block_body = to_block_original
173
174
to_block = to_block_original ["number" ]
174
175
filter_params = {** filter_params , "toBlock" : to_block }
0 commit comments