Skip to content

Commit

Permalink
feat: internal methods for bypassing checksum in custom subclasses
Browse files Browse the repository at this point in the history
  • Loading branch information
BobTheBuidler committed Aug 7, 2022
1 parent 10ef0bb commit 94738d0
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions checksum_dict/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,15 @@ def __setitem__(self, key: AnyAddressOrContract, value: T) -> None:
super().__setitem__(key, value)
else:
super().__setitem__(EthAddressKey(key), value)

def __getitem_nochecksum(self, key: EthAddressKey) -> T:
"""
You can use this method in custom subclasses to bypass the checksum ONLY if you know its already been done at an earlier point in your code.
"""
return super().__getitem__(key)

def __setitem_nochecksum(self, key: EthAddressKey, value: T) -> None:
"""
You can use this method in custom subclasses to bypass the checksum ONLY if you know its already been done at an earlier point in your code.
"""
return super().__setitem__(key, value)

0 comments on commit 94738d0

Please sign in to comment.