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

fix: include URI in provider.network_choice #2449

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

antazoey
Copy link
Member

@antazoey antazoey commented Dec 24, 2024

What I did

fixes: ApeWorX/silverback#179

How I did it

When a URI is configured or passed in for a connection, use that in provider.network_choice

How to verify it

silverback uses the configured URI everywhere now.

I made sure:

  • ape-foundry tests still pass
  • ape-alchemy tests still pass
  • silverback tests pass (though you may want to add a new one for the reported issue)

Checklist

  • All changes are completed
  • New test cases have been added
  • Documentation has been updated

@@ -72,14 +71,6 @@ def test_uri(geth_provider):
assert geth_provider.uri == GETH_URI


@geth_process_test
def test_uri_localhost_not_running_uses_random_default(config):
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this now happens at the provider-connection level, so the config value is None when not actually configured (and doesn't get set to random RPC). So the behavior is the same, just happens at a different spot, it helps us know when a value was specifically configured by the user (and not injected here)

@antazoey antazoey force-pushed the feat/network-choice-when-configured-uri branch from 2305bda to a78af4b Compare December 24, 2024 20:30
@antazoey antazoey requested a review from fubuloubu December 24, 2024 21:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

invalid network provider used during bot setup
2 participants