Skip to content

Commit

Permalink
Add Sepolia testnet
Browse files Browse the repository at this point in the history
  • Loading branch information
kclowes committed Sep 9, 2022
1 parent 845bce4 commit f55e118
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions ethpm/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@
3: "ropsten",
4: "rinkeby",
5: "goerli",
11155111: "sepolia",
}
1 change: 1 addition & 0 deletions tests/ethpm/_utils/test_chain_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
1 change: 1 addition & 0 deletions web3/auto/infura/endpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
15 changes: 15 additions & 0 deletions web3/auto/infura/sepolia.py
Original file line number Diff line number Diff line change
@@ -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))

0 comments on commit f55e118

Please sign in to comment.