generated from ApeWorX/project-template
-
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
62 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,25 @@ | ||
from ape import plugins | ||
|
||
from .provider import Alchemy | ||
|
||
NETWORKS = { | ||
"ethereum": [ | ||
"mainnet", | ||
"sepolia", | ||
], | ||
"arbitrum": [ | ||
"mainnet", | ||
"sepolia", | ||
], | ||
"base": [ | ||
"mainnet", | ||
"sepolia", | ||
], | ||
"fantom": [ | ||
"opera", | ||
"testnet", | ||
], | ||
"optimism": [ | ||
"mainnet", | ||
"sepolia", | ||
], | ||
"polygon": [ | ||
"mainnet", | ||
"amoy", | ||
], | ||
"polygon-zkevm": [ | ||
"mainnet", | ||
"cardona", | ||
], | ||
} | ||
|
||
|
||
@plugins.register(plugins.ProviderPlugin) | ||
def providers(): | ||
from ._utils import NETWORKS | ||
from .provider import Alchemy | ||
|
||
for ecosystem_name in NETWORKS: | ||
for network_name in NETWORKS[ecosystem_name]: | ||
yield ecosystem_name, network_name, Alchemy | ||
|
||
|
||
def __getattr__(name: str): | ||
if name == "NETWORKS": | ||
from ._utils import NETWORKS | ||
|
||
return NETWORKS | ||
|
||
elif name == "Alchemy": | ||
from .provider import Alchemy | ||
|
||
return Alchemy | ||
|
||
raise AttributeError(name) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
NETWORKS = { | ||
"ethereum": [ | ||
"mainnet", | ||
"sepolia", | ||
], | ||
"arbitrum": [ | ||
"mainnet", | ||
"sepolia", | ||
], | ||
"base": [ | ||
"mainnet", | ||
"sepolia", | ||
], | ||
"fantom": [ | ||
"opera", | ||
"testnet", | ||
], | ||
"optimism": [ | ||
"mainnet", | ||
"sepolia", | ||
], | ||
"polygon": [ | ||
"mainnet", | ||
"amoy", | ||
], | ||
"polygon-zkevm": [ | ||
"mainnet", | ||
"cardona", | ||
], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
[flake8] | ||
max-line-length = 100 | ||
ignore = E704,W503,PYD002 | ||
ignore = E704,W503,PYD002,TC003,TC006 | ||
exclude = | ||
venv* | ||
docs | ||
build | ||
type-checking-pydantic-enabled = True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters