Skip to content

Commit

Permalink
fix: mypy tox issue. (ethereum#746)
Browse files Browse the repository at this point in the history
  • Loading branch information
spencer-tb authored Aug 13, 2024
1 parent 742e21c commit a3dbf48
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/ethereum_test_types/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -1055,6 +1055,8 @@ def created_contract(self) -> Address:
nonce_bytes = (
bytes() if self.nonce == 0 else self.nonce.to_bytes(length=1, byteorder="big")
)
if self.sender is None:
raise ValueError("sender address is None")
hash = keccak256(eth_rlp.encode([self.sender, nonce_bytes]))
return Address(hash[-20:])

Expand Down

0 comments on commit a3dbf48

Please sign in to comment.