Skip to content

Commit

Permalink
Merge branch 'main' into bugfix/verify-no-license
Browse files Browse the repository at this point in the history
  • Loading branch information
sreyemnayr authored Apr 23, 2024
2 parents 29028d7 + 43429be commit 0a9dd7c
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 5 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ jobs:

strategy:
matrix:
os: [ubuntu-latest, macos-latest] # eventually add `windows-latest`
# TODO: Replace with macos-latest when works again.
# https://github.com/actions/setup-python/issues/808
os: [ubuntu-latest, macos-12] # eventually add `windows-latest`
python-version: [3.8, 3.9, "3.10", "3.11"]

steps:
Expand Down
10 changes: 6 additions & 4 deletions ape_etherscan/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,9 @@ def get_etherscan_uri(
)
elif ecosystem_name == "base":
return (
"https://basescan.org" if network_name == "mainnet" else "https://goerli.basescan.org"
f"https://{network_name}.basescan.org"
if network_name != "mainnet"
else "https://basescan.org"
)
elif ecosystem_name == "polygon":
return (
Expand Down Expand Up @@ -149,9 +151,9 @@ def get_etherscan_api_uri(
)
elif ecosystem_name == "base":
return (
"https://api.basescan.org/api"
if network_name == "mainnet"
else "https://api-goerli.basescan.org/api"
f"https://api-{network_name}.basescan.org/api"
if network_name != "mainnet"
else "https://api.basescan.org/api"
)
elif ecosystem_name == "polygon":
return (
Expand Down
1 change: 1 addition & 0 deletions ape_etherscan/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"base": [
"mainnet",
"goerli",
"sepolia",
],
"blast": [
"mainnet",
Expand Down
1 change: 1 addition & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,7 @@ def get_url_f(testnet: bool = False, tld: str = "io"):
"mumbai": com_testnet_url("testnet", "polygonscan"),
},
"base": {
"sepolia": org_testnet_url("sepolia", "basescan"),
"goerli": org_testnet_url("goerli", "basescan"),
"mainnet": org_url("basescan"),
},
Expand Down
1 change: 1 addition & 0 deletions tests/test_etherscan.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
("polygon-zkevm", "goerli", "testnet-zkevm.polygonscan.com"),
("base", "mainnet", "basescan.org"),
("base", "goerli", "goerli.basescan.org"),
("base", "sepolia", "sepolia.basescan.org"),
("blast", "mainnet", "blastscan.io"),
("blast", "sepolia", "sepolia.blastscan.io"),
("avalanche", "mainnet", "snowtrace.io"),
Expand Down

0 comments on commit 0a9dd7c

Please sign in to comment.