Skip to content

Commit

Permalink
consistent naming
Browse files Browse the repository at this point in the history
  • Loading branch information
gnpar committed Dec 4, 2024
1 parent f5b07b6 commit 16bb4da
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/ethproto/aa_bundler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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()
)

Expand All @@ -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()


Expand Down

0 comments on commit 16bb4da

Please sign in to comment.