From 4acf263e6c6f8f18d61cd64529428f9c2c349e33 Mon Sep 17 00:00:00 2001 From: Juliya Smith Date: Fri, 25 Oct 2024 08:50:21 -0500 Subject: [PATCH] chore: address all feedback --- README.md | 2 +- ape_alchemy/__init__.py | 9 ++++----- ape_alchemy/provider.py | 3 +++ pyproject.toml | 1 + setup.cfg | 1 + setup.py | 1 + 6 files changed, 11 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index b01373d..05b1ad7 100644 --- a/README.md +++ b/README.md @@ -6,10 +6,10 @@ The `ape-alchemy` plugin supports the following ecosystems: - Ethereum - Arbitrum - Base +- Fantom - Optimism - Polygon - Polygon-ZkEVM -- Fantom ## Dependencies diff --git a/ape_alchemy/__init__.py b/ape_alchemy/__init__.py index df61386..11d1dab 100644 --- a/ape_alchemy/__init__.py +++ b/ape_alchemy/__init__.py @@ -15,6 +15,10 @@ "mainnet", "sepolia", ], + "fantom": [ + "opera", + "testnet", + ], "optimism": [ "mainnet", "sepolia", @@ -27,11 +31,6 @@ "mainnet", "cardona", ], - "fantom": [ - "opera", - "testnet", - ], - } diff --git a/ape_alchemy/provider.py b/ape_alchemy/provider.py index 7efcb00..a1a78df 100644 --- a/ape_alchemy/provider.py +++ b/ape_alchemy/provider.py @@ -86,8 +86,11 @@ def uri(self): network_format = network_formats_by_ecosystem[ecosystem_name] network_name = self.network.name + + # NOTE: Fantom's mainnet is named "opera", but the Alchemy URI expects "mainnet". if self.network.ecosystem.name == "fantom" and self.network.name == "opera": network_name = "mainnet" + uri = network_format.format(network_name, key) self.network_uris[(ecosystem_name, network_name)] = uri return uri diff --git a/pyproject.toml b/pyproject.toml index cd6ba8a..2bf6ab2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -21,6 +21,7 @@ include = '\.pyi?$' [tool.pytest.ini_options] addopts = """ -p no:ape_test + -p no:pytest_ethereum --cov-branch --cov-report term --cov-report html diff --git a/setup.cfg b/setup.cfg index 1c2ef4d..84f6a9e 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,6 @@ [flake8] max-line-length = 100 +ignore = E704,W503,PYD002 exclude = venv* docs diff --git a/setup.py b/setup.py index 2b8772e..cfa1554 100644 --- a/setup.py +++ b/setup.py @@ -6,6 +6,7 @@ "test": [ # `test` GitHub Action jobs uses this "ape-arbitrum", # Needed for testing Arbitrum integration "ape-base", # Needed for testing Base integration + "ape-fantom", # Needed for testing fantom integration "ape-optimism", # Needed for testing Optimism integration "ape-polygon", # Needed for testing Polygon integration "ape-polygon-zkevm", # Needed for testing Polygon-ZkEVM integration