From 83d9970a7883bc492672cc90f259c524c10fe2d9 Mon Sep 17 00:00:00 2001 From: Juliya Smith Date: Fri, 14 Jun 2024 16:10:28 -0500 Subject: [PATCH] docs: reword --- src/ape/api/networks.py | 4 ++-- src/ape/cli/choices.py | 4 ++-- src/ape/managers/networks.py | 1 - 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/ape/api/networks.py b/src/ape/api/networks.py index 0519dda253..7f9501b97e 100644 --- a/src/ape/api/networks.py +++ b/src/ape/api/networks.py @@ -1072,8 +1072,8 @@ def get_provider( provider_settings["ipc_path"] = provider_name provider_name = "node" - # Assuming any installed forking plugin can at least for Ethereum mainnet. - # NOTE: This is a bit limiting for non-EVM custom forked networks. + # If it can fork Ethereum (and we are asking for it) assume it can fork this one. + # TODO: Refactor this approach to work for custom-forked non-EVM networks. common_forking_providers = self.network_manager.ethereum.mainnet_fork.providers if provider_name in self.providers: diff --git a/src/ape/cli/choices.py b/src/ape/cli/choices.py index 698485fbdf..3989c31574 100644 --- a/src/ape/cli/choices.py +++ b/src/ape/cli/choices.py @@ -361,8 +361,8 @@ def convert(self, value: Any, param: Optional[Parameter], ctx: Optional[Context] choice = super().convert(value, param, ctx) except BadParameter as err: # Attempt to get the provider anyway. - # Some plugins will handle networks anyway, - # such as forked-custom networks. + # Sometimes, depending on the provider, it'll still work. + # (as-is the case for custom-forked networks). try: return networks.get_provider_from_choice(network_choice=value) except Exception: diff --git a/src/ape/managers/networks.py b/src/ape/managers/networks.py index 3e492d2f1c..d6dc5dabcd 100644 --- a/src/ape/managers/networks.py +++ b/src/ape/managers/networks.py @@ -462,7 +462,6 @@ def get_provider_from_choice( self.get_ecosystem(ecosystem_name) if ecosystem_name else self.default_ecosystem ) network = ecosystem.get_network(network_name or ecosystem.default_network_name) - return network.get_provider( provider_name=provider_name, provider_settings=provider_settings )