Skip to content

add non-ens normalize_address func #2384

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions web3/_utils/normalizers.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,12 @@ def normalize_address(ens: ENS, address: ChecksumAddress) -> ChecksumAddress:
return address


def normalize_address_no_ens(address: ChecksumAddress) -> ChecksumAddress:
if address:
validate_address(address)
return address


def normalize_bytecode(bytecode: bytes) -> HexBytes:
if bytecode:
bytecode = HexBytes(bytecode)
Expand Down