@@ -1210,16 +1210,16 @@ async def test_async_eth_get_logs_without_logs(
1210
1210
# Test with block range
1211
1211
1212
1212
filter_params : FilterParams = {
1213
- "fromBlock " : BlockNumber (0 ),
1214
- "toBlock " : BlockNumber (block_with_txn_with_log ["number" ] - 1 ),
1213
+ "from_block " : BlockNumber (0 ),
1214
+ "to_block " : BlockNumber (block_with_txn_with_log ["number" ] - 1 ),
1215
1215
}
1216
1216
result = await async_w3 .eth .get_logs (filter_params ) # type: ignore
1217
1217
assert len (result ) == 0
1218
1218
1219
1219
# the range is wrong
1220
1220
filter_params = {
1221
- "fromBlock " : block_with_txn_with_log ["number" ],
1222
- "toBlock " : BlockNumber (block_with_txn_with_log ["number" ] - 1 ),
1221
+ "from_block " : block_with_txn_with_log ["number" ],
1222
+ "to_block " : BlockNumber (block_with_txn_with_log ["number" ] - 1 ),
1223
1223
}
1224
1224
result = await async_w3 .eth .get_logs (filter_params ) # type: ignore
1225
1225
assert len (result ) == 0
@@ -1228,7 +1228,7 @@ async def test_async_eth_get_logs_without_logs(
1228
1228
1229
1229
# filter with other address
1230
1230
filter_params = {
1231
- "fromBlock " : BlockNumber (0 ),
1231
+ "from_block " : BlockNumber (0 ),
1232
1232
"address" : UNKNOWN_ADDRESS ,
1233
1233
}
1234
1234
result = await async_w3 .eth .get_logs (filter_params ) # type: ignore
@@ -1238,7 +1238,7 @@ async def test_async_eth_get_logs_without_logs(
1238
1238
1239
1239
# filter with other address
1240
1240
filter_params = {
1241
- "fromBlock " : BlockNumber (0 ),
1241
+ "from_block " : BlockNumber (0 ),
1242
1242
"address" : [UNKNOWN_ADDRESS , UNKNOWN_ADDRESS ],
1243
1243
}
1244
1244
result = await async_w3 .eth .get_logs (filter_params ) # type: ignore
@@ -1257,8 +1257,8 @@ async def test_async_eth_get_logs_with_logs(
1257
1257
1258
1258
# the range includes the block where the log resides in
1259
1259
filter_params : FilterParams = {
1260
- "fromBlock " : block_with_txn_with_log ["number" ],
1261
- "toBlock " : block_with_txn_with_log ["number" ],
1260
+ "from_block " : block_with_txn_with_log ["number" ],
1261
+ "to_block " : block_with_txn_with_log ["number" ],
1262
1262
}
1263
1263
result = await async_w3 .eth .get_logs (filter_params ) # type: ignore
1264
1264
assert_contains_log (
@@ -1267,7 +1267,7 @@ async def test_async_eth_get_logs_with_logs(
1267
1267
1268
1268
# specify only `from_block`. by default `to_block` should be 'latest'
1269
1269
filter_params = {
1270
- "fromBlock " : BlockNumber (0 ),
1270
+ "from_block " : BlockNumber (0 ),
1271
1271
}
1272
1272
result = await async_w3 .eth .get_logs (filter_params ) # type: ignore
1273
1273
assert_contains_log (
@@ -1278,7 +1278,7 @@ async def test_async_eth_get_logs_with_logs(
1278
1278
1279
1279
# filter with emitter_contract.address
1280
1280
filter_params = {
1281
- "fromBlock " : BlockNumber (0 ),
1281
+ "from_block " : BlockNumber (0 ),
1282
1282
"address" : emitter_contract_address ,
1283
1283
}
1284
1284
result = await async_w3 .eth .get_logs (filter_params ) # type: ignore
@@ -1298,7 +1298,7 @@ async def test_async_eth_get_logs_with_logs_topic_args(
1298
1298
# Test with None event sig
1299
1299
1300
1300
filter_params : FilterParams = {
1301
- "fromBlock " : BlockNumber (0 ),
1301
+ "from_block " : BlockNumber (0 ),
1302
1302
"topics" : [
1303
1303
None ,
1304
1304
HexStr (
@@ -1314,7 +1314,7 @@ async def test_async_eth_get_logs_with_logs_topic_args(
1314
1314
1315
1315
# Test with None indexed arg
1316
1316
filter_params = {
1317
- "fromBlock " : BlockNumber (0 ),
1317
+ "from_block " : BlockNumber (0 ),
1318
1318
"topics" : [
1319
1319
HexStr (
1320
1320
"0x057bc32826fbe161da1c110afcdcae7c109a8b69149f727fc37a603c60ef94ca"
@@ -1333,7 +1333,7 @@ async def test_async_eth_get_logs_with_logs_none_topic_args(
1333
1333
) -> None :
1334
1334
# Test with None overflowing
1335
1335
filter_params : FilterParams = {
1336
- "fromBlock " : BlockNumber (0 ),
1336
+ "from_block " : BlockNumber (0 ),
1337
1337
"topics" : [None , None , None ],
1338
1338
}
1339
1339
@@ -3179,16 +3179,16 @@ def test_eth_get_logs_without_logs(
3179
3179
# Test with block range
3180
3180
3181
3181
filter_params : FilterParams = {
3182
- "fromBlock " : BlockNumber (0 ),
3183
- "toBlock " : BlockNumber (block_with_txn_with_log ["number" ] - 1 ),
3182
+ "from_block " : BlockNumber (0 ),
3183
+ "to_block " : BlockNumber (block_with_txn_with_log ["number" ] - 1 ),
3184
3184
}
3185
3185
result = w3 .eth .get_logs (filter_params )
3186
3186
assert len (result ) == 0
3187
3187
3188
3188
# the range is wrong
3189
3189
filter_params = {
3190
- "fromBlock " : block_with_txn_with_log ["number" ],
3191
- "toBlock " : BlockNumber (block_with_txn_with_log ["number" ] - 1 ),
3190
+ "from_block " : block_with_txn_with_log ["number" ],
3191
+ "to_block " : BlockNumber (block_with_txn_with_log ["number" ] - 1 ),
3192
3192
}
3193
3193
result = w3 .eth .get_logs (filter_params )
3194
3194
assert len (result ) == 0
@@ -3197,7 +3197,7 @@ def test_eth_get_logs_without_logs(
3197
3197
3198
3198
# filter with other address
3199
3199
filter_params = {
3200
- "fromBlock " : BlockNumber (0 ),
3200
+ "from_block " : BlockNumber (0 ),
3201
3201
"address" : UNKNOWN_ADDRESS ,
3202
3202
}
3203
3203
result = w3 .eth .get_logs (filter_params )
@@ -3207,7 +3207,7 @@ def test_eth_get_logs_without_logs(
3207
3207
3208
3208
# filter with other address
3209
3209
filter_params = {
3210
- "fromBlock " : BlockNumber (0 ),
3210
+ "from_block " : BlockNumber (0 ),
3211
3211
"address" : [UNKNOWN_ADDRESS , UNKNOWN_ADDRESS ],
3212
3212
}
3213
3213
result = w3 .eth .get_logs (filter_params )
@@ -3225,8 +3225,8 @@ def test_eth_get_logs_with_logs(
3225
3225
3226
3226
# the range includes the block where the log resides in
3227
3227
filter_params : FilterParams = {
3228
- "fromBlock " : block_with_txn_with_log ["number" ],
3229
- "toBlock " : block_with_txn_with_log ["number" ],
3228
+ "from_block " : block_with_txn_with_log ["number" ],
3229
+ "to_block " : block_with_txn_with_log ["number" ],
3230
3230
}
3231
3231
result = w3 .eth .get_logs (filter_params )
3232
3232
assert_contains_log (
@@ -3235,7 +3235,7 @@ def test_eth_get_logs_with_logs(
3235
3235
3236
3236
# specify only `from_block`. by default `to_block` should be 'latest'
3237
3237
filter_params = {
3238
- "fromBlock " : BlockNumber (0 ),
3238
+ "from_block " : BlockNumber (0 ),
3239
3239
}
3240
3240
result = w3 .eth .get_logs (filter_params )
3241
3241
assert_contains_log (
@@ -3246,7 +3246,7 @@ def test_eth_get_logs_with_logs(
3246
3246
3247
3247
# filter with emitter_contract.address
3248
3248
filter_params = {
3249
- "fromBlock " : BlockNumber (0 ),
3249
+ "from_block " : BlockNumber (0 ),
3250
3250
"address" : emitter_contract_address ,
3251
3251
}
3252
3252
@@ -3261,7 +3261,7 @@ def test_eth_get_logs_with_logs_topic_args(
3261
3261
# Test with None event sig
3262
3262
3263
3263
filter_params : FilterParams = {
3264
- "fromBlock " : BlockNumber (0 ),
3264
+ "from_block " : BlockNumber (0 ),
3265
3265
"topics" : [
3266
3266
None ,
3267
3267
HexStr (
@@ -3277,7 +3277,7 @@ def test_eth_get_logs_with_logs_topic_args(
3277
3277
3278
3278
# Test with None indexed arg
3279
3279
filter_params = {
3280
- "fromBlock " : BlockNumber (0 ),
3280
+ "from_block " : BlockNumber (0 ),
3281
3281
"topics" : [
3282
3282
HexStr (
3283
3283
"0x057bc32826fbe161da1c110afcdcae7c109a8b69149f727fc37a603c60ef94ca"
@@ -3293,7 +3293,7 @@ def test_eth_get_logs_with_logs_topic_args(
3293
3293
def test_eth_get_logs_with_logs_none_topic_args (self , w3 : "Web3" ) -> None :
3294
3294
# Test with None overflowing
3295
3295
filter_params : FilterParams = {
3296
- "fromBlock " : BlockNumber (0 ),
3296
+ "from_block " : BlockNumber (0 ),
3297
3297
"topics" : [None , None , None ],
3298
3298
}
3299
3299
0 commit comments