ApeWorX / ape

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

Network Manager is not Fault Tolerant with External Plugins #125

Closed fubuloubu closed 2 years ago

fubuloubu commented 3 years ago

What went wrong?

$ ape plugins add infura
INFO: Installing ape_infura...
$ ape
WARNING: Error loading cli endpoint for plugin 'ape_console'
WARNING: Error loading cli endpoint for plugin 'ape_run'
Usage: ape [OPTIONS] COMMAND [ARGS]...

How can it be fixed?

These CLI endpoints use the networks object from ape core to produce the --network option. This method should be fault tolerant of issues in external plugins.

antazoey commented 2 years ago

This issue seems to be fixed! Not sure how though.

Probably related to some of the --network option refactoring that happened last fall.

But, to test that it is fixed, install ape-infura locally from source. Break it on purpose (Add a bunch of random text to the top of the file). Then, run ape console using any other network... It works just fine! Wahoo!