eth-prototype 1.5.0b1__py3-none-any.whl → 1.5.0b2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: eth-prototype
3
- Version: 1.5.0b1
3
+ Version: 1.5.0b2
4
4
  Summary: Prototype Ethereum Smart Contracts in Python
5
5
  Home-page: https://github.com/gnarvaja/eth-prototype
6
6
  Author: Guillermo M. Narvaja
@@ -1,7 +1,7 @@
1
- eth_prototype-1.5.0b1.dist-info/licenses/AUTHORS.rst,sha256=Ui-05yYXtDZxna6o1yNcfdm8Jt68UIDQ01osiLxlYlU,95
2
- eth_prototype-1.5.0b1.dist-info/licenses/LICENSE.txt,sha256=U_Q6_nDYDwZPIuhttHi37hXZ2qU2-HlV2geo9hzHXFw,1087
1
+ eth_prototype-1.5.0b2.dist-info/licenses/AUTHORS.rst,sha256=Ui-05yYXtDZxna6o1yNcfdm8Jt68UIDQ01osiLxlYlU,95
2
+ eth_prototype-1.5.0b2.dist-info/licenses/LICENSE.txt,sha256=U_Q6_nDYDwZPIuhttHi37hXZ2qU2-HlV2geo9hzHXFw,1087
3
3
  ethproto/__init__.py,sha256=YWkAFysBp4tZjLWWB2FFmp5yG23pUYhQvgQW9b3soXs,579
4
- ethproto/aa_bundler.py,sha256=aECUJJzvdEDJCzM8qTET9m309xPnQfvfWVQskkIHEss,22162
4
+ ethproto/aa_bundler.py,sha256=mzEB0s5DX58wKsi9xb8dB9En9nK3D3ExrI3OOsqJb7M,22521
5
5
  ethproto/build_artifacts.py,sha256=3t-MTSFZU1pQtDwf65zNJkceWleLRlzcEo8CFpu4_6s,10031
6
6
  ethproto/contracts.py,sha256=R9lWKPe77jkPBXx798qhnVPWSFF2nhz4AaYowipNIBc,22625
7
7
  ethproto/defender_relay.py,sha256=05A8TfRZwiBhCpo924Pf9CjfKSir2Wvgg1p_asFxJbw,1777
@@ -12,7 +12,7 @@ ethproto/test_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSu
12
12
  ethproto/test_utils/factories.py,sha256=G8DnUDG_yThRxMTCkymzcjm9lR_ni0_ZmTsb3sEfIdI,1805
13
13
  ethproto/test_utils/hardhat.py,sha256=HzTqIznu6zVd_-doL96ftFJ235ktDCQen1QDQbNuwfM,2361
14
14
  ethproto/test_utils/vcr_utils.py,sha256=1FH2sgJlElSjWkJLuO3C7E2J-4HKyFvjAqkCnGRZJyk,797
15
- eth_prototype-1.5.0b1.dist-info/METADATA,sha256=7nJRJXEAzIvwO4C8xNG47vlspDOkhaGQs5crBAWy2TQ,2697
16
- eth_prototype-1.5.0b1.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
17
- eth_prototype-1.5.0b1.dist-info/top_level.txt,sha256=Dl0X7m6N1hxeo4JpGpSNqWC2gtsN0731g-DL1J0mpjc,9
18
- eth_prototype-1.5.0b1.dist-info/RECORD,,
15
+ eth_prototype-1.5.0b2.dist-info/METADATA,sha256=AYseONs04OnkUFgVa4t_z0669tv-uS5Nrc-dbeAxZkg,2697
16
+ eth_prototype-1.5.0b2.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
17
+ eth_prototype-1.5.0b2.dist-info/top_level.txt,sha256=Dl0X7m6N1hxeo4JpGpSNqWC2gtsN0731g-DL1J0mpjc,9
18
+ eth_prototype-1.5.0b2.dist-info/RECORD,,
ethproto/aa_bundler.py CHANGED
@@ -13,6 +13,7 @@ from eth_account.messages import encode_defunct
13
13
  from eth_typing import HexAddress
14
14
  from eth_utils import add_0x_prefix, function_signature_to_4byte_selector
15
15
  from hexbytes import HexBytes
16
+ from requests import HTTPError
16
17
  from web3 import Web3
17
18
  from web3.constants import ADDRESS_ZERO
18
19
  from web3.types import StateOverride, TxParams
@@ -461,23 +462,30 @@ class Bundler:
461
462
  )
462
463
 
463
464
  def alchemy_estimation(self, user_operation: UserOperation) -> AlchemyGasAndPaymasterAndData:
464
- resp = self.bundler.provider.make_request(
465
- "alchemy_requestGasAndPaymasterAndData",
466
- [
467
- {
468
- "policyId": self.alchemy_gas_policy_id,
469
- "entryPoint": self.entrypoint,
470
- "dummySignature": DUMMY_SIGNATURE,
471
- "userOperation": user_operation.as_reduced_dict(),
472
- "overrides": {
473
- "maxFeePerGas": {"multiplier": self.base_gas_price_factor},
474
- "maxPriorityFeePerGas": {"multiplier": self.priority_gas_price_factor},
475
- "callGasLimit": {"multiplier": self.gas_limit_factor},
476
- "verificationGasLimit": {"multiplier": self.verification_gas_factor},
477
- },
478
- }
479
- ],
480
- )
465
+ try:
466
+ resp = self.bundler.provider.make_request(
467
+ "alchemy_requestGasAndPaymasterAndData",
468
+ [
469
+ {
470
+ "policyId": self.alchemy_gas_policy_id,
471
+ "entryPoint": self.entrypoint,
472
+ "dummySignature": DUMMY_SIGNATURE,
473
+ "userOperation": user_operation.as_reduced_dict(),
474
+ "overrides": {
475
+ "maxFeePerGas": {"multiplier": self.base_gas_price_factor},
476
+ "maxPriorityFeePerGas": {"multiplier": self.priority_gas_price_factor},
477
+ "callGasLimit": {"multiplier": self.gas_limit_factor},
478
+ "verificationGasLimit": {"multiplier": self.verification_gas_factor},
479
+ },
480
+ }
481
+ ],
482
+ )
483
+ except HTTPError as e:
484
+ raise BundlerRevertError(
485
+ f"HTTP error while requesting gas and paymaster data: {str(e)}",
486
+ userop=user_operation,
487
+ response=e.response,
488
+ ) from e
481
489
 
482
490
  if "error" in resp:
483
491
  raise BundlerRevertError(resp["error"]["message"], userop=user_operation, response=resp)