ApeWorX / ape

The smart contract development tool for Pythonistas, Data Scientists, and Security Professionals
https://apeworx.io
Apache License 2.0
895 stars 131 forks source link

fix: recursion error when a bad URI was configured in `node:` #2372

Closed antazoey closed 2 weeks ago

antazoey commented 2 weeks ago

What I did

I put in a very non-URI value in my config to demo something and it blew up not how i expected. This PR fixes it.

How I did it

Noticed a comment was wrong, that was where to fix. Basically make it error if given a value that is neither HTTP, WS, or IPC.

How to verify it

node:
  ethereum:
    mainnet:
      uri: asdfasdf
ape console --network ethereum:mainnet:node

Before, it would recurse until it failed. Now, you get:

ERROR:    (ConfigError) Invalid URI (not HTTP, WS, or IPC): asdfasdf

Checklist