Skip to content

Commit

Permalink
perf: faster load
Browse files Browse the repository at this point in the history
  • Loading branch information
antazoey committed Nov 7, 2024
1 parent 4d5e2d3 commit fe33239
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 33 deletions.
36 changes: 3 additions & 33 deletions ape_alchemy/__init__.py
Original file line number Diff line number Diff line change
@@ -1,41 +1,11 @@
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 .provider import Alchemy
from ._utils import NETWORKS

for ecosystem_name in NETWORKS:
for network_name in NETWORKS[ecosystem_name]:
yield ecosystem_name, network_name, Alchemy
30 changes: 30 additions & 0 deletions ape_alchemy/_utils.py
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",
],
}

0 comments on commit fe33239

Please sign in to comment.