@@ -412,13 +412,13 @@ def test_call_fallback_function(fallback_function_contract):
412
412
413
413
414
414
def test_throws_error_if_block_out_of_range (web3 , math_contract ):
415
- web3 .providers [ 0 ] .make_request (method = 'evm_mine' , params = [20 ])
415
+ web3 .provider .make_request (method = 'evm_mine' , params = [20 ])
416
416
with pytest .raises (BlockNumberOutofRange ):
417
417
math_contract .functions .counter ().call (block_identifier = - 50 )
418
418
419
419
420
420
def test_accepts_latest_block (web3 , math_contract ):
421
- web3 .providers [ 0 ] .make_request (method = 'evm_mine' , params = [5 ])
421
+ web3 .provider .make_request (method = 'evm_mine' , params = [5 ])
422
422
math_contract .functions .increment ().transact ()
423
423
424
424
late = math_contract .functions .counter ().call (block_identifier = 'latest' )
@@ -429,9 +429,9 @@ def test_accepts_latest_block(web3, math_contract):
429
429
430
430
431
431
def test_accepts_block_hash_as_identifier (web3 , math_contract ):
432
- blocks = web3 .providers [ 0 ] .make_request (method = 'evm_mine' , params = [5 ])
432
+ blocks = web3 .provider .make_request (method = 'evm_mine' , params = [5 ])
433
433
math_contract .functions .increment ().transact ()
434
- more_blocks = web3 .providers [ 0 ] .make_request (method = 'evm_mine' , params = [5 ])
434
+ more_blocks = web3 .provider .make_request (method = 'evm_mine' , params = [5 ])
435
435
436
436
old = math_contract .functions .counter ().call (block_identifier = blocks ['result' ][2 ])
437
437
new = math_contract .functions .counter ().call (block_identifier = more_blocks ['result' ][2 ])
@@ -441,10 +441,10 @@ def test_accepts_block_hash_as_identifier(web3, math_contract):
441
441
442
442
443
443
def test_neg_block_indexes_from_the_end (web3 , math_contract ):
444
- web3 .providers [ 0 ] .make_request (method = 'evm_mine' , params = [5 ])
444
+ web3 .provider .make_request (method = 'evm_mine' , params = [5 ])
445
445
math_contract .functions .increment ().transact ()
446
446
math_contract .functions .increment ().transact ()
447
- web3 .providers [ 0 ] .make_request (method = 'evm_mine' , params = [5 ])
447
+ web3 .provider .make_request (method = 'evm_mine' , params = [5 ])
448
448
449
449
output1 = math_contract .functions .counter ().call (block_identifier = - 7 )
450
450
output2 = math_contract .functions .counter ().call (block_identifier = - 6 )
@@ -455,7 +455,7 @@ def test_neg_block_indexes_from_the_end(web3, math_contract):
455
455
456
456
def test_returns_data_from_specified_block (web3 , math_contract ):
457
457
start_num = web3 .eth .getBlock ('latest' ).number
458
- web3 .providers [ 0 ] .make_request (method = 'evm_mine' , params = [5 ])
458
+ web3 .provider .make_request (method = 'evm_mine' , params = [5 ])
459
459
math_contract .functions .increment ().transact ()
460
460
math_contract .functions .increment ().transact ()
461
461
0 commit comments