Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

camelCase -> snake_case fixes #1737

Merged
merged 2 commits into from
Feb 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion brownie/network/middlewares/caching.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
8 changes: 6 additions & 2 deletions brownie/network/web3.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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"]
Expand Down
Loading