diff --git a/ethpm/constants.py b/ethpm/constants.py index c895c4a591..c6818e5210 100644 --- a/ethpm/constants.py +++ b/ethpm/constants.py @@ -15,4 +15,5 @@ 3: "ropsten", 4: "rinkeby", 5: "goerli", + 11155111: "sepolia", } diff --git a/tests/ethpm/_utils/test_chain_utils.py b/tests/ethpm/_utils/test_chain_utils.py index 92c2b00e52..096d8a51a1 100644 --- a/tests/ethpm/_utils/test_chain_utils.py +++ b/tests/ethpm/_utils/test_chain_utils.py @@ -49,6 +49,7 @@ def test_parse_BIP122_uri(value, expected_resource_type): (3, True), (4, True), (5, True), + (11155111, True), (2, False), ("1", False), ({}, False), diff --git a/web3/auto/infura/endpoints.py b/web3/auto/infura/endpoints.py index 55258f9a57..fa7ecb5df8 100644 --- a/web3/auto/infura/endpoints.py +++ b/web3/auto/infura/endpoints.py @@ -20,6 +20,7 @@ INFURA_ROPSTEN_DOMAIN = "ropsten.infura.io" INFURA_GOERLI_DOMAIN = "goerli.infura.io" INFURA_RINKEBY_DOMAIN = "rinkeby.infura.io" +INFURA_SEPOLIA_DOMAIN = "sepolia.infura.io" WEBSOCKET_SCHEME = "wss" HTTP_SCHEME = "https" diff --git a/web3/auto/infura/sepolia.py b/web3/auto/infura/sepolia.py new file mode 100644 index 0000000000..d7f128800c --- /dev/null +++ b/web3/auto/infura/sepolia.py @@ -0,0 +1,15 @@ +from web3 import Web3 +from web3.providers.auto import ( + load_provider_from_uri, +) + +from .endpoints import ( + INFURA_SEPOLIA_DOMAIN, + build_http_headers, + build_infura_url, +) + +_headers = build_http_headers() +_infura_url = build_infura_url(INFURA_SEPOLIA_DOMAIN) + +w3 = Web3(load_provider_from_uri(_infura_url, _headers))