From ec1be7880863c9ac5487148ec4329736fb7f57be Mon Sep 17 00:00:00 2001 From: Juliya Smith Date: Wed, 15 May 2024 08:59:27 -0500 Subject: [PATCH] feat: 08 --- .github/workflows/commitlint.yaml | 1 - .github/workflows/draft.yaml | 2 ++ ape_bsc/__init__.py | 4 ++-- tests/test_integration.py | 16 ++++++++-------- 4 files changed, 12 insertions(+), 11 deletions(-) diff --git a/.github/workflows/commitlint.yaml b/.github/workflows/commitlint.yaml index 3b44d69..c72aea2 100644 --- a/.github/workflows/commitlint.yaml +++ b/.github/workflows/commitlint.yaml @@ -7,7 +7,6 @@ name: Commit Message jobs: check: runs-on: ubuntu-latest - steps: - uses: actions/checkout@v4 with: diff --git a/.github/workflows/draft.yaml b/.github/workflows/draft.yaml index 423582b..dbe260e 100644 --- a/.github/workflows/draft.yaml +++ b/.github/workflows/draft.yaml @@ -8,6 +8,8 @@ on: jobs: update-draft: runs-on: ubuntu-latest + permissions: + contents: write steps: # Drafts your next Release notes as Pull Requests are merged into "main" - uses: release-drafter/release-drafter@v5 diff --git a/ape_bsc/__init__.py b/ape_bsc/__init__.py index 68c8523..f939836 100644 --- a/ape_bsc/__init__.py +++ b/ape_bsc/__init__.py @@ -1,6 +1,6 @@ from ape import plugins from ape.api.networks import LOCAL_NETWORK_NAME, ForkedNetworkAPI, NetworkAPI, create_network_type -from ape_geth import GethProvider +from ape_node import Node from ape_test import LocalProvider from .ecosystem import BSC, NETWORKS, BSCConfig @@ -29,6 +29,6 @@ def networks(): @plugins.register(plugins.ProviderPlugin) def providers(): for network_name in NETWORKS: - yield "bsc", network_name, GethProvider + yield "bsc", network_name, Node yield "bsc", LOCAL_NETWORK_NAME, LocalProvider diff --git a/tests/test_integration.py b/tests/test_integration.py index bae6577..6470998 100644 --- a/tests/test_integration.py +++ b/tests/test_integration.py @@ -4,12 +4,12 @@ EXPECTED_OUTPUT = """ bsc +├── local (default) +│ └── test (default) ├── mainnet -│ └── geth (default) -├── testnet -│ └── geth (default) -└── local (default) - └── test (default) +│ └── node (default) +└── testnet + └── node (default) """.strip() @@ -46,8 +46,8 @@ def assert_rich_text(actual: str, expected: str): def test_networks(runner, cli, bsc): # Do this in case local env changed it. - bsc.mainnet.set_default_provider("geth") - bsc.testnet.set_default_provider("geth") + bsc.mainnet.set_default_provider("node") + bsc.testnet.set_default_provider("node") - result = runner.invoke(cli, ["networks", "list"]) + result = runner.invoke(cli, ("networks", "list")) assert_rich_text(result.output, EXPECTED_OUTPUT)