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

Exception: Unknown netid: 80001 #314

Open
philmoreau opened this issue Jan 15, 2023 · 3 comments
Open

Exception: Unknown netid: 80001 #314

philmoreau opened this issue Jan 15, 2023 · 3 comments

Comments

@philmoreau
Copy link

After installing either through pip or git, and running the simple code in the "Getting Started" page of the doc, I get :

Traceback (most recent call last):
  File "/app/main.py", line 29, in <module>
    main()
  File "/app/main.py", line 16, in main
    uniswap = Uniswap(address=address, private_key=private_key, version=version, provider=provider)
  File "/usr/local/lib/python3.9/site-packages/uniswap/uniswap.py", line 128, in __init__
    raise Exception(f"Unknown netid: {self.netid}")  # pragma: no cover
Exception: Unknown netid: 80001
@ErikBjare
Copy link
Member

ErikBjare commented Jan 15, 2023

Are you using a Polygon testnet RPC? (a brief search suggested so)

You need to add the appropriate network here, including contract addresses for the deployment you want to use: https://github.com/uniswap-python/uniswap-python/blob/master/uniswap/constants.py

@philmoreau
Copy link
Author

I see. Thanks for pointing me in the right direction! I'll try to figure out how this works.

Amazing reply time by the way.

@koots1234
Copy link

I'm also having this same error, using Sepolia Testnet, I've checked constants.py and its listed in _netid_to_name. Any suggestions?

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

No branches or pull requests

3 participants