From 16bb4da0d182d0a2a806b1be216fc6d84c09d998 Mon Sep 17 00:00:00 2001 From: GnP Date: Wed, 4 Dec 2024 07:19:56 -0300 Subject: [PATCH] consistent naming --- src/ethproto/aa_bundler.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/ethproto/aa_bundler.py b/src/ethproto/aa_bundler.py index a4d396a..621ad85 100644 --- a/src/ethproto/aa_bundler.py +++ b/src/ethproto/aa_bundler.py @@ -164,11 +164,11 @@ def add_gas_price(self, gas_price: GasPrice) -> "UserOperation": max_fee_per_gas=gas_price["max_fee_per_gas"], ) - def sign(self, private_key: HexBytes, chain_id, entry_point) -> "UserOperation": + def sign(self, private_key: HexBytes, chain_id, entrypoint) -> "UserOperation": signature = Account.sign_message( encode_defunct( hexstr=PackedUserOperation.from_user_operation(self) - .hash_full(chain_id=chain_id, entry_point=entry_point) + .hash_full(chain_id=chain_id, entrypoint=entrypoint) .hex() ), private_key, @@ -225,11 +225,11 @@ def hash(self): ).hex() ) - def hash_full(self, chain_id, entry_point): + def hash_full(self, chain_id, entrypoint): return Web3.keccak( hexstr=encode( ["bytes32", "address", "uint256"], - [self.hash(), entry_point, chain_id], + [self.hash(), entrypoint, chain_id], ).hex() ) @@ -254,8 +254,8 @@ def make_nonce(nonce_key, nonce): return (nonce_key << 64) | nonce -def fetch_nonce(w3, account, entry_point, nonce_key): - ep = w3.eth.contract(abi=GET_NONCE_ABI, address=entry_point) +def fetch_nonce(w3, account, entrypoint, nonce_key): + ep = w3.eth.contract(abi=GET_NONCE_ABI, address=entrypoint) return ep.functions.getNonce(account, nonce_key).call()