Skip to content

Commit

Permalink
feat: Added goerli endpoint
Browse files Browse the repository at this point in the history
fixes: #1229
  • Loading branch information
fubuloubu authored and kclowes committed Apr 8, 2019
1 parent 4473be5 commit c04b584
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions web3/auto/infura/endpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

INFURA_MAINNET_DOMAIN = 'mainnet.infura.io'
INFURA_ROPSTEN_DOMAIN = 'ropsten.infura.io'
INFURA_GOERLI_DOMAIN = 'goerli.infura.io'
INFURA_RINKEBY_DOMAIN = 'rinkeby.infura.io'
INFURA_KOVAN_DOMAIN = 'kovan.infura.io'

Expand Down
17 changes: 17 additions & 0 deletions web3/auto/infura/goerli.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
from web3 import Web3
from web3.middleware import (
geth_poa_middleware,
)
from web3.providers.auto import (
load_provider_from_uri,
)

from .endpoints import (
INFURA_GOERLI_DOMAIN,
build_infura_url,
)

_infura_url = build_infura_url(INFURA_GOERLI_DOMAIN)

w3 = Web3(load_provider_from_uri(_infura_url))
w3.middleware_onion.inject(geth_poa_middleware, layer=0)

0 comments on commit c04b584

Please sign in to comment.