Skip to content

Commit

Permalink
fix: walrus
Browse files Browse the repository at this point in the history
  • Loading branch information
banteg committed Apr 12, 2024
1 parent 33a2a11 commit 4fde0f4
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/ape/managers/chain.py
Original file line number Diff line number Diff line change
Expand Up @@ -851,12 +851,10 @@ def get_creation_metadata(self, address: AddressType) -> Optional[ContractCreati
Returns:
Optional[:class:`~pae.api.query.ContractCreation`]
"""
creation = self._local_contract_creation.get(address)
if creation is not None:
if creation := self._local_contract_creation.get(address):
return creation
# read from disk
creation = self._get_contract_creation_from_disk(address)
if creation is not None:
if creation := self._get_contract_creation_from_disk(address):
self._local_contract_creation[address] = creation
return creation
# query and cache
Expand Down

0 comments on commit 4fde0f4

Please sign in to comment.