Skip to content

Commit

Permalink
docs: reword
Browse files Browse the repository at this point in the history
  • Loading branch information
antazoey committed Jun 14, 2024
1 parent ffe9e55 commit 83d9970
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/ape/api/networks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions src/ape/cli/choices.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 0 additions & 1 deletion src/ape/managers/networks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down

0 comments on commit 83d9970

Please sign in to comment.