From 3f9027d521750956d9ab9a61eb99b03aba744870 Mon Sep 17 00:00:00 2001 From: derekpierre Date: Thu, 28 Mar 2024 11:48:51 -0400 Subject: [PATCH 1/2] Add polygon amoy as a polygon network. --- ape_polygon/ecosystem.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ape_polygon/ecosystem.py b/ape_polygon/ecosystem.py index a371f1c..bceca33 100644 --- a/ape_polygon/ecosystem.py +++ b/ape_polygon/ecosystem.py @@ -11,6 +11,7 @@ # chain_id, network_id "mainnet": (137, 137), "mumbai": (80001, 80001), + "amoy": (80002, 80002), } @@ -18,6 +19,7 @@ class PolygonConfig(BaseEthereumConfig): NETWORKS: ClassVar[Dict[str, Tuple[int, int]]] = NETWORKS mainnet: NetworkConfig = create_network_config(block_time=2, required_confirmations=1) mumbai: NetworkConfig = create_network_config(block_time=2, required_confirmations=1) + amoy: NetworkConfig = create_network_config(block_time=2, required_confirmations=1) class Polygon(Ethereum): From 79870dfa19bb09f5513a9299f9be0e05a8a1d605 Mon Sep 17 00:00:00 2001 From: derekpierre Date: Thu, 28 Mar 2024 11:56:23 -0400 Subject: [PATCH 2/2] Update integration test to include amoy as a network. --- tests/test_integration.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tests/test_integration.py b/tests/test_integration.py index 439fc53..b8bf481 100644 --- a/tests/test_integration.py +++ b/tests/test_integration.py @@ -4,12 +4,14 @@ EXPECTED_OUTPUT = """ polygon -├── mainnet +├── amoy │ └── geth (default) -├── mumbai +├── local (default) +│ └── test (default) +├── mainnet │ └── geth (default) -└── local (default) - └── test (default) +└── mumbai + └── geth (default) """.strip() @@ -48,6 +50,7 @@ def test_networks(runner, cli, polygon): # Do this in case local env changed it. polygon.mainnet.set_default_provider("geth") polygon.mumbai.set_default_provider("geth") + polygon.amoy.set_default_provider("geth") result = runner.invoke(cli, ["networks", "list"]) assert_rich_text(result.output, EXPECTED_OUTPUT)