Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors the codebase to improve modularity and introduce network-specific ARC90 URI support. The changes include:
- Extracting common AVM constants to a shared
constants.pyfile - Creating an
AsaValidationbase class to isolate ASA validation logic - Adding
ARC90_NETAUTHtemplate variable for network-specific URI construction
Reviewed changes
Copilot reviewed 12 out of 16 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
smart_contracts/constants.py |
New file containing common AVM and ARC constants extracted from module-specific files |
smart_contracts/asa_validation.py |
New base class providing ASA validation methods (existence, manager, ARC3/ARC89 compliance) |
smart_contracts/template_vars.py |
Added ARC90_NETAUTH template variable for network authority in ARC90 URIs |
smart_contracts/avm_common.py |
Added arc90_box_query helper function for constructing ARC90 URIs with network auth |
smart_contracts/asa_metadata_registry/constants.py |
Refactored to import common constants and keep only ARC89-specific ones |
smart_contracts/asa_metadata_registry/contract.py |
Updated to inherit from AsaValidation and use refactored validation methods |
smart_contracts/asa_metadata_registry/errors.py |
Updated error message for ARC89 compliance to reference "partial URI" |
smart_contracts/asa_metadata_registry/deploy_config.py |
Added ARC90_NETAUTH to deployment parameters |
tests/conftest.py |
Enabled environment fixture and updated to inject ARC90_NETAUTH from environment |
tests/test_arc89_create_metadata.py |
Updated constant references from ARC_3_* to ARC3_* naming convention |
.env.localnet.template |
Added localnet environment configuration with ARC90_NETAUTH=net:localnet/ |
.env.testnet.template |
Added testnet environment configuration with ARC90_NETAUTH=net:testnet/ |
smart_contracts/artifacts/... |
Generated TEAL code reflecting the refactored implementation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 16 changed files in this pull request and generated 3 comments.
💡 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:
netauthin the ARC89 partial URI for non-MainNet networks;startswithandendswithutilities to AVM commons;