From 9653d7b05455ee5c450f5655dc29c743173b551e Mon Sep 17 00:00:00 2001 From: Ben Hauser Date: Sun, 4 Feb 2024 15:39:43 +0400 Subject: [PATCH 1/2] fix: camelCase -> snake_case --- brownie/network/middlewares/caching.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/brownie/network/middlewares/caching.py b/brownie/network/middlewares/caching.py index 611dfffde..f0f38e867 100644 --- a/brownie/network/middlewares/caching.py +++ b/brownie/network/middlewares/caching.py @@ -243,4 +243,4 @@ def uninstall(self) -> None: self.is_killed = True self.block_cache.clear() if self.w3.isConnected(): - self.w3.eth.uninstallFilter(self.block_filter.filter_id) + self.w3.eth.uninstall_filter(self.block_filter.filter_id) From ebada181018cdb72653ade7ad6a3930e92910e8b Mon Sep 17 00:00:00 2001 From: Ben Hauser Date: Sun, 4 Feb 2024 15:42:01 +0400 Subject: [PATCH 2/2] fix: is_connected --- brownie/network/web3.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/brownie/network/web3.py b/brownie/network/web3.py index 73ac3d4f8..689b844c3 100644 --- a/brownie/network/web3.py +++ b/brownie/network/web3.py @@ -110,11 +110,15 @@ def disconnect(self) -> None: self._chain_id = None self._remove_middlewares() - def isConnected(self) -> bool: + def is_connected(self) -> bool: if not self.provider: return False return super().is_connected() + def isConnected(self) -> bool: + # retained to avoid breaking an interface explicitly defined in brownie + return self.is_connected() + @property def supports_traces(self) -> bool: if not self.provider: @@ -135,7 +139,7 @@ def supports_traces(self) -> bool: @property def _mainnet(self) -> _Web3: # a web3 instance connected to the mainnet - if self.isConnected() and CONFIG.active_network["id"] == "mainnet": + if self.is_connected() and CONFIG.active_network["id"] == "mainnet": return self try: mainnet = CONFIG.networks["mainnet"]