kopia lustrzana https://github.com/bugout-dev/moonworm
Web3() -> Web3 for static fuctions.
Avoid creating an instance of the Web3 class for static functions.pull/96/head
rodzic
e8de0428ef
commit
eef88a91a3
|
@ -111,7 +111,7 @@ def utfy_dict(dic):
|
|||
return dic
|
||||
|
||||
elif isinstance(dic, bytes):
|
||||
return Web3().toHex(dic)
|
||||
return Web3.toHex(dic)
|
||||
|
||||
elif isinstance(dic, tuple):
|
||||
return tuple(utfy_dict(x) for x in dic)
|
||||
|
@ -147,7 +147,7 @@ class FunctionCallCrawler:
|
|||
self.contract_addresses = contract_addresses
|
||||
self.contract = Web3().eth.contract(abi=self.contract_abi)
|
||||
self.on_decode_error = on_decode_error
|
||||
self.whitelisted_methods = {Web3().toHex(function_abi_to_4byte_selector(a)) for a in self.contract_abi}
|
||||
self.whitelisted_methods = {Web3.toHex(function_abi_to_4byte_selector(a)) for a in self.contract_abi}
|
||||
|
||||
def process_transaction(self, transaction: Dict[str, Any]):
|
||||
try:
|
||||
|
|
Ładowanie…
Reference in New Issue