Skip to content

Commit

Permalink
feat: monkey patch dank_mids's patch of brownie's decoders (#810)
Browse files Browse the repository at this point in the history
* feat: monkey patch dank_mids's patch of brownie's decoders

cache any checksums that are computed in this code

* chore: bump dank_mids
  • Loading branch information
BobTheBuidler authored Nov 27, 2024
1 parent b81b578 commit ca578ff
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
bobs_lazy_logging==0.0.4
checksum_dict==1.3.7
dank_mids>=4.20.105
dank_mids>=4.20.106
eth-brownie>=1.19.3,<1.21
eth_retry>=0.1.19,<0.2
ez-a-sync>=0.24.20
Expand Down
4 changes: 4 additions & 0 deletions y/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import a_sync
import brownie.convert
import checksum_dict._key
import dank_mids.brownie_patch.call
import eth_event.main
import eth_utils
import evmspec.data
Expand Down Expand Up @@ -102,6 +103,9 @@ def _monkey_patch_dependencies():
# this monkey patches checksum_dict's checksumming with our lru_cache
checksum_dict._key.to_checksum_address = to_address

# this monkey patches the dank_mids brownie patch's checksums with our lru_cache
dank_mids.brownie_patch.call.to_checksum_address = to_address

# this monkey patches eth_event's address checksumming with our lru_cache
eth_event.main.to_checksum_address = to_address

Expand Down

0 comments on commit ca578ff

Please sign in to comment.