Skip to content

Commit

Permalink
fix: precompile type
Browse files Browse the repository at this point in the history
  • Loading branch information
charles-cooper committed Nov 27, 2023
1 parent b4e6666 commit ce6c65a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions boa/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,11 +161,11 @@ def register_raw_precompile(address, fn, force=False):
address = Address(address)
if address in _precompiles and not force:
raise ValueError(f"Already registered: {address}")
_precompiles[address] = fn
_precompiles[address.canonical_address] = fn


def deregister_raw_precompile(address, force=True):
address = Address(address)
address = Address(address).canonical_address
if address not in _precompiles and not force:
raise ValueError("Not registered: {address}")
_precompiles.pop(address, None)
Expand Down

0 comments on commit ce6c65a

Please sign in to comment.