Skip to content
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

Fix hash validation, update allowed code hashes list #1702

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cboh4
Copy link
Contributor

@cboh4 cboh4 commented Mar 5, 2025

  1. previously the code used String::from_utf8_lossy to convert the decoded hash bytes to a string. the fix replaces this with hex::encode.
  2. In the original implementation, even if the mismatched hash was allowed by is_code_hash_allowed, the function would still return an error due to an unconditional error return following the check. This PR removes that redundant return statement, allowing processing to continue when the hash is explicitly allowed.
  3. the allowed list of code hashes has been extended in ALLOWED_CONTRACT_CODE_HASH

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant