6
6
from web3 .datastructures import AttributeDict
7
7
from web3 .eth import Eth
8
8
from web3 .exceptions import ContractLogicError
9
- from web3 .types import FilterParams , LogReceipt , CallOverride , BlockIdentifier , TxParams , BlockData , _Hash32
9
+ from web3 .types import FilterParams , LogReceipt , StateOverride , BlockIdentifier , TxParams , BlockData , _Hash32
10
10
11
11
from IceCreamSwapWeb3 import Web3Advanced
12
12
from IceCreamSwapWeb3 .Subsquid import get_filter
@@ -61,13 +61,12 @@ class EthAdvanced(Eth):
61
61
'get_code' , 'get_transaction_count' , 'get_transaction_receipt' ,
62
62
'wait_for_transaction_receipt' , 'get_storage_at' , 'replace_transaction' ,
63
63
'modify_transaction' , 'sign' , 'sign_transaction' , 'sign_typed_data' , 'filter' ,
64
- 'get_filter_changes' , 'get_filter_logs' , 'uninstall_filter' , 'submit_hashrate' ,
65
- 'get_work' , 'submit_work' ,
64
+ 'get_filter_changes' , 'get_filter_logs' , 'uninstall_filter'
66
65
]
67
66
68
67
PROPERTIES_TO_RETRY = [
69
- 'accounts' , 'hashrate' , ' block_number' , 'coinbase ' , 'gas_price' ,
70
- 'max_priority_fee' , 'mining' , ' syncing'
68
+ 'accounts' , 'block_number' , 'gas_price' ,
69
+ 'max_priority_fee' , 'syncing'
71
70
]
72
71
73
72
def __init__ (self , w3 ):
@@ -92,7 +91,7 @@ def call(
92
91
self ,
93
92
transaction : TxParams ,
94
93
block_identifier : Optional [BlockIdentifier ] = None ,
95
- state_override : Optional [CallOverride ] = None ,
94
+ state_override : Optional [StateOverride ] = None ,
96
95
ccip_read_enabled : Optional [bool ] = None ,
97
96
no_retry : bool = False ,
98
97
):
@@ -287,9 +286,6 @@ def get_logs_inner(self, filter_params: FilterParams, no_retry: bool = False):
287
286
no_retry = True
288
287
return exponential_retry (func_name = "get_logs" )(self ._get_logs )(filter_params , no_retry = no_retry )
289
288
290
- def get_block_number_from_identifier (self , block_identifier : BlockIdentifier ) -> BlockNumber :
291
- return block_identifier if isinstance (block_identifier , int ) else self .get_block (block_identifier )["number" ]
292
-
293
289
def _chain_id (self ):
294
290
# usually this causes an RPC call and is used in every eth_call. Getting it once in the init and then not again.
295
291
return self .chain_id_cached
0 commit comments