Skip to content

Commit

Permalink
feat: 08
Browse files Browse the repository at this point in the history
  • Loading branch information
antazoey committed May 15, 2024
1 parent a0071bc commit c2efe2f
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 11 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/commitlint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ name: Commit Message
jobs:
check:
runs-on: ubuntu-latest

permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/draft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
jobs:
update-draft:
runs-on: ubuntu-latest

steps:
# Drafts your next Release notes as Pull Requests are merged into "main"
- uses: release-drafter/release-drafter@v5
Expand Down
4 changes: 2 additions & 2 deletions ape_bsc/__init__.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
16 changes: 8 additions & 8 deletions tests/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()


Expand Down Expand Up @@ -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)

0 comments on commit c2efe2f

Please sign in to comment.