From 9a19f3017f18f07ed36947e1933387f664749b3d Mon Sep 17 00:00:00 2001 From: slush Date: Tue, 19 Nov 2024 20:23:08 -0600 Subject: [PATCH] feat: re-adds attributes to __init__ --- ape_fantom/__init__.py | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/ape_fantom/__init__.py b/ape_fantom/__init__.py index 9e6eb0a..06e7d3e 100644 --- a/ape_fantom/__init__.py +++ b/ape_fantom/__init__.py @@ -46,3 +46,30 @@ def providers(): yield "fantom", network_name, Node yield "fantom", LOCAL_NETWORK_NAME, LocalProvider + + +def __getattr__(name: str): + if name == "NETWORKS": + from .ecosystem import NETWORKS + + return NETWORKS + + elif name == "Fantom": + from .ecosystem import Fantom + + return Fantom + + elif name == "FantomConfig": + from .ecosystem import FantomConfig + + return FantomConfig + + else: + raise AttributeError(name) + + +__all__ = [ + "NETWORKS", + "Fantom", + "FantomConfig", +]