Skip to content

Commit

Permalink
fix: adds attributes back to __init__
Browse files Browse the repository at this point in the history
  • Loading branch information
bitwise-constructs committed Nov 20, 2024
1 parent 62d3487 commit a8a217a
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions ape_optimism/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from typing import Any

from ape import plugins


Expand Down Expand Up @@ -46,3 +48,23 @@ def providers():
yield "optimism", network_name, Node

yield "optimism", LOCAL_NETWORK_NAME, LocalProvider


def __getattr__(name: str) -> Any:
if name == "NETWORKS":
from .ecosystem import NETWORKS

return NETWORKS

elif name == "Optimism":
from .ecosystem import Optimism

return Optimism

elif name == "OptimismConfig":
from .ecosystem import OptimismConfig

return OptimismConfig

else:
raise AttributeError(name)

0 comments on commit a8a217a

Please sign in to comment.