Skip to content

Commit

Permalink
feat: upgrade web3
Browse files Browse the repository at this point in the history
  • Loading branch information
antazoey committed Dec 2, 2024
1 parent f55d0b1 commit 109fdc7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
5 changes: 2 additions & 3 deletions ape_alchemy/provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
from web3.exceptions import ContractLogicError as Web3ContractLogicError
from web3.exceptions import ExtraDataLengthError
from web3.gas_strategies.rpc import rpc_gas_price_strategy
from web3.middleware import geth_poa_middleware
from web3.middleware import geth_poa_middleware as ExtraDataToPOAMiddleware
from web3.middleware import ExtraDataToPOAMiddleware
from web3.middleware.validation import MAX_EXTRADATA_LENGTH
from web3.types import RPCEndpoint

Expand Down Expand Up @@ -134,7 +133,7 @@ def connect(self):
polygon_amoy = 80002

if self._web3.eth.chain_id in (base, optimism, polygon, polygon_amoy):
self._web3.middleware_onion.inject(geth_poa_middleware, layer=0)
self._web3.middleware_onion.inject(ExtraDataToPOAMiddleware, layer=0)
is_poa = True

self._web3.eth.set_gas_price_strategy(rpc_gas_price_strategy)
Expand Down
10 changes: 5 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,11 @@
include_package_data=True,
install_requires=[
"eth-ape>=0.8.1,<0.9",
"eth-pydantic-types", # Use same version as eth-ape
"ethpm-types", # Use same version as eth-ape
"evm-trace", # Use same version as eth-ape
"web3", # Use same version as eth-ape
"requests",
"eth-pydantic-types>=0.1.3,<0.2",
"ethpm-types>=0.6.19,<0.7",
"evm-trace>=0.2.3,<0.3",
"web3>=7.6.0,<8",
"requests>=2.32.3,<3",
],
python_requires=">=3.9,<4",
extras_require=extras_require,
Expand Down

0 comments on commit 109fdc7

Please sign in to comment.