Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: base sepolia #125

Merged
merged 1 commit into from
Apr 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading