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

feat: lookup network in evmchains; plugin-less networks, adhoc networks w/ correct name #2328

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

Conversation

antazoey
Copy link
Member

@antazoey antazoey commented Oct 19, 2024

What I did

  • Make it so if you connect to a network Ape hasn't an installed plugin for, it will look it up in evmchains and "just work"
  • Make it so if you use a custom network e.g. connecting using a URL only, and that network is found in evmchains, it will set the correct names for the network

How I did it

Use evmchains library.

How to verify it

First, I have no plugin for moonbeam installed, but yet i can do this:

ape console --network moonbeam

and it "just works"

Second, if I connect to a URL in the same fashion:

ape console --network "https://moonriver.unitedbloc.com"

Not only does it work (did before), but the network name and stuff is correct:

In [1]: provider.network.name
Out[1]: 'moonriver'

In [2]: provider.network.ecosystem.name
Out[2]: 'moonbeam'

taa daaaa

Checklist

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

@antazoey antazoey changed the title feat: able to connect to networks by name alone, even when not configured or installed feat: lookup network in evmchains; plugin-less networks, adhoc networks w/ correct name Oct 25, 2024
@antazoey antazoey marked this pull request as ready for review October 25, 2024 20:06
@antazoey
Copy link
Member Author

Failing test only happens on Web3>=6.20.2 not on 6.20.1 (which is what i was using locally)

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.

1 participant