Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds ARC-3 compliance validation during metadata creation. The changes enforce that assets must have proper ARC-3 identifiers (name or URL suffix) when flagged as ARC-3 compliant, and validates ARC-89 native assets have correct URI format.
Key changes:
- Added
_check_arc3_complianceand_check_arc89_compliancevalidation methods - Renamed
create_arc3_metadatatocreate_arc3_payloadfor clarity - Added comprehensive tests for ARC-3/ARC-89 compliance scenarios
- Removed
json_obj_metadatafixtures in favor of usingshort_metadata
Reviewed changes
Copilot reviewed 17 out of 21 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| smart_contracts/asa_metadata_registry/contract.py | Added ARC-3 and ARC-89 compliance validation methods and integrated them into metadata creation flow |
| smart_contracts/asa_metadata_registry/constants.py | Added ARC-3 and ARC-90 URI constants for validation |
| smart_contracts/asa_metadata_registry/errors.py | Updated error messages for compliance validation |
| tests/test_arc89_create_metadata.py | Added parametrized tests for ARC-3 compliance validation |
| tests/helpers/factories.py | Renamed create_arc3_metadata to create_arc3_payload |
| tests/conftest.py | Refactored fixtures to remove json_obj_metadata and add arc90_uri fixture |
| tests/test_*.py (multiple) | Updated tests to use mutable_short_metadata instead of mutable_json_obj_metadata |
| tests/test_metadata_size_fixtures.py | Simplified fixture test and changed test data name |
| smart_contracts/artifacts/asa_metadata_registry/AsaMetadataRegistry.approval.teal | Generated TEAL code reflecting contract changes |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
This PR addresses #21.