eth-prototype 1.5.0b2__tar.gz → 1.5.0b3__tar.gz
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.
- {eth_prototype-1.5.0b2 → eth_prototype-1.5.0b3}/PKG-INFO +1 -1
- {eth_prototype-1.5.0b2 → eth_prototype-1.5.0b3}/src/eth_prototype.egg-info/PKG-INFO +1 -1
- {eth_prototype-1.5.0b2 → eth_prototype-1.5.0b3}/src/ethproto/aa_bundler.py +43 -3
- {eth_prototype-1.5.0b2 → eth_prototype-1.5.0b3}/.coveragerc +0 -0
- {eth_prototype-1.5.0b2 → eth_prototype-1.5.0b3}/.github/workflows/publish.yaml +0 -0
- {eth_prototype-1.5.0b2 → eth_prototype-1.5.0b3}/.github/workflows/test.yaml +0 -0
- {eth_prototype-1.5.0b2 → eth_prototype-1.5.0b3}/.gitignore +0 -0
- {eth_prototype-1.5.0b2 → eth_prototype-1.5.0b3}/.isort.cfg +0 -0
- {eth_prototype-1.5.0b2 → eth_prototype-1.5.0b3}/.pre-commit-config.yaml +0 -0
- {eth_prototype-1.5.0b2 → eth_prototype-1.5.0b3}/.readthedocs.yml +0 -0
- {eth_prototype-1.5.0b2 → eth_prototype-1.5.0b3}/AUTHORS.rst +0 -0
- {eth_prototype-1.5.0b2 → eth_prototype-1.5.0b3}/CHANGELOG.rst +0 -0
- {eth_prototype-1.5.0b2 → eth_prototype-1.5.0b3}/LICENSE.txt +0 -0
- {eth_prototype-1.5.0b2 → eth_prototype-1.5.0b3}/README.md +0 -0
- {eth_prototype-1.5.0b2 → eth_prototype-1.5.0b3}/docs/Makefile +0 -0
- {eth_prototype-1.5.0b2 → eth_prototype-1.5.0b3}/docs/_static/.gitignore +0 -0
- {eth_prototype-1.5.0b2 → eth_prototype-1.5.0b3}/docs/authors.rst +0 -0
- {eth_prototype-1.5.0b2 → eth_prototype-1.5.0b3}/docs/changelog.rst +0 -0
- {eth_prototype-1.5.0b2 → eth_prototype-1.5.0b3}/docs/conf.py +0 -0
- {eth_prototype-1.5.0b2 → eth_prototype-1.5.0b3}/docs/index.rst +0 -0
- {eth_prototype-1.5.0b2 → eth_prototype-1.5.0b3}/docs/license.rst +0 -0
- {eth_prototype-1.5.0b2 → eth_prototype-1.5.0b3}/docs/readme.rst +0 -0
- {eth_prototype-1.5.0b2 → eth_prototype-1.5.0b3}/docs/requirements.txt +0 -0
- {eth_prototype-1.5.0b2 → eth_prototype-1.5.0b3}/pyproject.toml +0 -0
- {eth_prototype-1.5.0b2 → eth_prototype-1.5.0b3}/setup.cfg +0 -0
- {eth_prototype-1.5.0b2 → eth_prototype-1.5.0b3}/setup.py +0 -0
- {eth_prototype-1.5.0b2 → eth_prototype-1.5.0b3}/src/eth_prototype.egg-info/SOURCES.txt +0 -0
- {eth_prototype-1.5.0b2 → eth_prototype-1.5.0b3}/src/eth_prototype.egg-info/dependency_links.txt +0 -0
- {eth_prototype-1.5.0b2 → eth_prototype-1.5.0b3}/src/eth_prototype.egg-info/not-zip-safe +0 -0
- {eth_prototype-1.5.0b2 → eth_prototype-1.5.0b3}/src/eth_prototype.egg-info/requires.txt +0 -0
- {eth_prototype-1.5.0b2 → eth_prototype-1.5.0b3}/src/eth_prototype.egg-info/top_level.txt +0 -0
- {eth_prototype-1.5.0b2 → eth_prototype-1.5.0b3}/src/ethproto/__init__.py +0 -0
- {eth_prototype-1.5.0b2 → eth_prototype-1.5.0b3}/src/ethproto/build_artifacts.py +0 -0
- {eth_prototype-1.5.0b2 → eth_prototype-1.5.0b3}/src/ethproto/contracts.py +0 -0
- {eth_prototype-1.5.0b2 → eth_prototype-1.5.0b3}/src/ethproto/defender_relay.py +0 -0
- {eth_prototype-1.5.0b2 → eth_prototype-1.5.0b3}/src/ethproto/test_utils/__init__.py +0 -0
- {eth_prototype-1.5.0b2 → eth_prototype-1.5.0b3}/src/ethproto/test_utils/factories.py +0 -0
- {eth_prototype-1.5.0b2 → eth_prototype-1.5.0b3}/src/ethproto/test_utils/hardhat.py +0 -0
- {eth_prototype-1.5.0b2 → eth_prototype-1.5.0b3}/src/ethproto/test_utils/vcr_utils.py +0 -0
- {eth_prototype-1.5.0b2 → eth_prototype-1.5.0b3}/src/ethproto/w3wrappers.py +0 -0
- {eth_prototype-1.5.0b2 → eth_prototype-1.5.0b3}/src/ethproto/wadray.py +0 -0
- {eth_prototype-1.5.0b2 → eth_prototype-1.5.0b3}/src/ethproto/wrappers.py +0 -0
- {eth_prototype-1.5.0b2 → eth_prototype-1.5.0b3}/tests/__init__.py +0 -0
- {eth_prototype-1.5.0b2 → eth_prototype-1.5.0b3}/tests/cassettes/test_aa_bundler/test_build_user_operation.yaml +0 -0
- {eth_prototype-1.5.0b2 → eth_prototype-1.5.0b3}/tests/conftest.py +0 -0
- {eth_prototype-1.5.0b2 → eth_prototype-1.5.0b3}/tests/hardhat-project/README.md +0 -0
- {eth_prototype-1.5.0b2 → eth_prototype-1.5.0b3}/tests/hardhat-project/artifacts2/TestCurrency.sol/TestCurrency.json +0 -0
- {eth_prototype-1.5.0b2 → eth_prototype-1.5.0b3}/tests/hardhat-project/contracts/Count.sol +0 -0
- {eth_prototype-1.5.0b2 → eth_prototype-1.5.0b3}/tests/hardhat-project/contracts/Counter.sol +0 -0
- {eth_prototype-1.5.0b2 → eth_prototype-1.5.0b3}/tests/hardhat-project/contracts/CounterUpgradeable.sol +0 -0
- {eth_prototype-1.5.0b2 → eth_prototype-1.5.0b3}/tests/hardhat-project/contracts/CounterUpgradeableWithLibrary.sol +0 -0
- {eth_prototype-1.5.0b2 → eth_prototype-1.5.0b3}/tests/hardhat-project/contracts/CounterWithLibrary.sol +0 -0
- {eth_prototype-1.5.0b2 → eth_prototype-1.5.0b3}/tests/hardhat-project/contracts/Datatypes.sol +0 -0
- {eth_prototype-1.5.0b2 → eth_prototype-1.5.0b3}/tests/hardhat-project/contracts/EventLauncher.sol +0 -0
- {eth_prototype-1.5.0b2 → eth_prototype-1.5.0b3}/tests/hardhat-project/contracts/TestCurrency.sol +0 -0
- {eth_prototype-1.5.0b2 → eth_prototype-1.5.0b3}/tests/hardhat-project/contracts/TestCurrencyUUPS.sol +0 -0
- {eth_prototype-1.5.0b2 → eth_prototype-1.5.0b3}/tests/hardhat-project/contracts/TestNFT.sol +0 -0
- {eth_prototype-1.5.0b2 → eth_prototype-1.5.0b3}/tests/hardhat-project/hardhat.config.js +0 -0
- {eth_prototype-1.5.0b2 → eth_prototype-1.5.0b3}/tests/hardhat-project/package-lock.json +0 -0
- {eth_prototype-1.5.0b2 → eth_prototype-1.5.0b3}/tests/hardhat-project/package.json +0 -0
- {eth_prototype-1.5.0b2 → eth_prototype-1.5.0b3}/tests/hardhat-project/verifiable-binaries/@anotherOrg/aPkg/1.0.2/build/contracts/TestCurrency.sol/TestCurrency.json +0 -0
- {eth_prototype-1.5.0b2 → eth_prototype-1.5.0b3}/tests/hardhat-project/verifiable-binaries/@org/pkg/0.2.1/build/contracts/TestCurrency.json +0 -0
- {eth_prototype-1.5.0b2 → eth_prototype-1.5.0b3}/tests/hardhat-project/verifiable-binaries/@org/pkg/0.3.0/build/contracts/TestCurrency.json +0 -0
- {eth_prototype-1.5.0b2 → eth_prototype-1.5.0b3}/tests/test_aa_bundler.py +0 -0
- {eth_prototype-1.5.0b2 → eth_prototype-1.5.0b3}/tests/test_build_artifacts.py +0 -0
- {eth_prototype-1.5.0b2 → eth_prototype-1.5.0b3}/tests/test_contracts.py +0 -0
- {eth_prototype-1.5.0b2 → eth_prototype-1.5.0b3}/tests/test_defender.py +0 -0
- {eth_prototype-1.5.0b2 → eth_prototype-1.5.0b3}/tests/test_time_control.py +0 -0
- {eth_prototype-1.5.0b2 → eth_prototype-1.5.0b3}/tests/test_w3.py +0 -0
- {eth_prototype-1.5.0b2 → eth_prototype-1.5.0b3}/tests/test_wadray.py +0 -0
- {eth_prototype-1.5.0b2 → eth_prototype-1.5.0b3}/tox.ini +0 -0
|
@@ -198,7 +198,7 @@ class UserOperation:
|
|
|
198
198
|
"maxFeePerGas": "0x%x" % self.max_fee_per_gas,
|
|
199
199
|
"signature": add_0x_prefix(self.signature.hex()),
|
|
200
200
|
"paymaster": self.paymaster,
|
|
201
|
-
"paymasterData": self.paymaster_data,
|
|
201
|
+
"paymasterData": self.paymaster_data.to_0x_hex(),
|
|
202
202
|
"paymasterVerificationGasLimit": "0x%x" % self.paymaster_verification_gas_limit,
|
|
203
203
|
"paymasterPostOpGasLimit": "0x%x" % self.paymaster_post_op_gas_limit,
|
|
204
204
|
}
|
|
@@ -442,7 +442,7 @@ class Bundler:
|
|
|
442
442
|
def estimate_user_operation_gas(self, user_operation: UserOperation) -> UserOpEstimation:
|
|
443
443
|
resp = self.bundler.provider.make_request(
|
|
444
444
|
"eth_estimateUserOperationGas",
|
|
445
|
-
[user_operation.
|
|
445
|
+
[user_operation.as_dict(), self.entrypoint, self.overrides],
|
|
446
446
|
)
|
|
447
447
|
if "error" in resp:
|
|
448
448
|
raise BundlerRevertError(resp["error"]["message"], user_operation, resp)
|
|
@@ -477,6 +477,8 @@ class Bundler:
|
|
|
477
477
|
"callGasLimit": {"multiplier": self.gas_limit_factor},
|
|
478
478
|
"verificationGasLimit": {"multiplier": self.verification_gas_factor},
|
|
479
479
|
},
|
|
480
|
+
# Alchemy seems to be ignoring this, even though it's documented
|
|
481
|
+
"stateOverrideSet": self.overrides,
|
|
480
482
|
}
|
|
481
483
|
],
|
|
482
484
|
)
|
|
@@ -484,7 +486,7 @@ class Bundler:
|
|
|
484
486
|
raise BundlerRevertError(
|
|
485
487
|
f"HTTP error while requesting gas and paymaster data: {str(e)}",
|
|
486
488
|
userop=user_operation,
|
|
487
|
-
response=e.response,
|
|
489
|
+
response=e.response.json(),
|
|
488
490
|
) from e
|
|
489
491
|
|
|
490
492
|
if "error" in resp:
|
|
@@ -524,6 +526,35 @@ class Bundler:
|
|
|
524
526
|
paymaster_and_data=paymaster_and_data,
|
|
525
527
|
)
|
|
526
528
|
|
|
529
|
+
def pimlico_gas_price(self):
|
|
530
|
+
resp = self.bundler.provider.make_request("pimlico_getUserOperationGasPrice", [])
|
|
531
|
+
if "error" in resp:
|
|
532
|
+
raise BundlerRevertError(resp["error"]["message"], response=resp)
|
|
533
|
+
# {
|
|
534
|
+
# "jsonrpc": "2.0",
|
|
535
|
+
# "id": 1,
|
|
536
|
+
# "result": {
|
|
537
|
+
# "slow": {
|
|
538
|
+
# "maxFeePerGas": "0x829b42b5",
|
|
539
|
+
# "maxPriorityFeePerGas": "0x829b42b5"
|
|
540
|
+
# },
|
|
541
|
+
# "standard": {
|
|
542
|
+
# "maxFeePerGas": "0x88d36a75",
|
|
543
|
+
# "maxPriorityFeePerGas": "0x88d36a75"
|
|
544
|
+
# },
|
|
545
|
+
# "fast": {
|
|
546
|
+
# "maxFeePerGas": "0x8f0b9234",
|
|
547
|
+
# "maxPriorityFeePerGas": "0x8f0b9234"
|
|
548
|
+
# }
|
|
549
|
+
# }
|
|
550
|
+
# }
|
|
551
|
+
priority_fee = int(resp["result"]["standard"]["maxPriorityFeePerGas"], 16)
|
|
552
|
+
total_fee = int(resp["result"]["standard"]["maxFeePerGas"], 16)
|
|
553
|
+
base_fee = total_fee - priority_fee
|
|
554
|
+
max_priority_fee_per_gas = int(priority_fee * self.priority_gas_price_factor)
|
|
555
|
+
max_fee_per_gas = min(max_priority_fee_per_gas + base_fee, self.max_fee_per_gas)
|
|
556
|
+
return GasPrice(max_priority_fee_per_gas=max_priority_fee_per_gas, max_fee_per_gas=max_fee_per_gas)
|
|
557
|
+
|
|
527
558
|
def generic_gas_price(self):
|
|
528
559
|
base_fee = self.get_base_fee()
|
|
529
560
|
priority_fee = self.w3.eth.max_priority_fee
|
|
@@ -547,6 +578,15 @@ class Bundler:
|
|
|
547
578
|
estimation_and_paymaster.paymaster_and_data
|
|
548
579
|
)
|
|
549
580
|
|
|
581
|
+
elif self.bundler_type == "pimlico":
|
|
582
|
+
estimation = self.estimate_user_operation_gas(user_operation)
|
|
583
|
+
|
|
584
|
+
user_operation = user_operation.add_estimation(estimation)
|
|
585
|
+
|
|
586
|
+
gas_price = self.pimlico_gas_price()
|
|
587
|
+
|
|
588
|
+
user_operation = user_operation.add_gas_price(gas_price)
|
|
589
|
+
|
|
550
590
|
elif self.bundler_type == "generic":
|
|
551
591
|
estimation = self.estimate_user_operation_gas(user_operation)
|
|
552
592
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{eth_prototype-1.5.0b2 → eth_prototype-1.5.0b3}/src/eth_prototype.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{eth_prototype-1.5.0b2 → eth_prototype-1.5.0b3}/tests/hardhat-project/contracts/Datatypes.sol
RENAMED
|
File without changes
|
{eth_prototype-1.5.0b2 → eth_prototype-1.5.0b3}/tests/hardhat-project/contracts/EventLauncher.sol
RENAMED
|
File without changes
|
{eth_prototype-1.5.0b2 → eth_prototype-1.5.0b3}/tests/hardhat-project/contracts/TestCurrency.sol
RENAMED
|
File without changes
|
{eth_prototype-1.5.0b2 → eth_prototype-1.5.0b3}/tests/hardhat-project/contracts/TestCurrencyUUPS.sol
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|