Improve handling of chainlist url string

Co-authored-by: Derek Pierre <derek.pierre@gmail.com>
pull/3569/head
James Campbell 2024-12-11 13:01:49 +01:00 committed by GitHub
parent d2a4536612
commit 08359f4812
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -54,4 +54,4 @@ POA_CHAINS = {
80002, # "Polygon/Amoy"
}
CHAINLIST_URL = "https://raw.githubusercontent.com/nucypher/chainlist/main/"
CHAINLIST_URL = "https://raw.githubusercontent.com/nucypher/chainlist/main/{domain}.json"

View File

@ -140,7 +140,7 @@ def get_default_rpc_endpoints(domain) -> Dict[int, List[str]]:
Fetches the default RPC endpoints for various chains
from the nucypher/chainlist repository.
"""
url = CHAINLIST_URL + domain + ".json"
url = CHAINLIST_URL.format(domain=domain)
LOGGER.debug(f"Fetching default RPC endpoints from remote chainlist {url}")
try: