Skip to content

feat: arc compliance validation#22

Merged
cusma merged 10 commits intomainfrom
feat/arc-compliance-validation
Dec 24, 2025
Merged

feat: arc compliance validation#22
cusma merged 10 commits intomainfrom
feat/arc-compliance-validation

Conversation

@cusma
Copy link
Copy Markdown
Collaborator

@cusma cusma commented Dec 24, 2025

This PR addresses #21.

@cusma cusma requested a review from Copilot December 24, 2025 17:57
@cusma cusma self-assigned this Dec 24, 2025
@cusma cusma added enhancement New feature or request test labels Dec 24, 2025
@cusma cusma linked an issue Dec 24, 2025 that may be closed by this pull request
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_compliance and _check_arc89_compliance validation methods
  • Renamed create_arc3_metadata to create_arc3_payload for clarity
  • Added comprehensive tests for ARC-3/ARC-89 compliance scenarios
  • Removed json_obj_metadata fixtures in favor of using short_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.

Comment thread tests/test_metadata_size_fixtures.py
Comment thread smart_contracts/asa_metadata_registry/constants.py
Comment thread tests/conftest.py
@cusma cusma merged commit 193d5d9 into main Dec 24, 2025
7 checks passed
@cusma cusma deleted the feat/arc-compliance-validation branch December 24, 2025 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: strict ARC-3 / ARC-89 checks

2 participants