Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces a new hashing module to the SDK, centralizing hash computation functions that were previously duplicated across test helpers. The changes refactor existing code to use the new module and add comprehensive test coverage for all hashing functionality.
Key Changes:
- Created new
src/hashing.pymodule with hash computation functions (SHA-512/256, SHA-256, header/page/metadata hashing) - Refactored
tests/helpers/factories.pyto use the centralized hashing module instead of local implementations - Added extensive test coverage in
tests/sdk/test_hashing.pywith 973 lines of tests - Enhanced type safety with explicit type annotations in test files
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/hashing.py | New module implementing ARC-89 and ARC-3 hash computation functions |
| src/init.py | Exports new hashing functions in public API |
| src/codec.py | Replaced assert with ValueError for better error handling |
| tests/helpers/factories.py | Refactored to use centralized hashing module, removed duplicate implementations |
| tests/sdk/test_hashing.py | Comprehensive test suite for all hashing functions |
| tests/test_asset_metadata_factory.py | Added type annotations for better type safety |
| tests/smart_contract/test_arc89_get_metadata_b64_bytes_by_key.py | Added type annotations for better type safety |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.