Conversation
There was a problem hiding this comment.
Pull request overview
This pull request introduces a unified SDK registry facade for the ASA Metadata Registry, streamlining the interface for read and write operations. The PR also refactors netauth handling to expect the full "net:" prefix directly in environment variables rather than prepending it programmatically.
Key Changes:
- Adds
AsaMetadataRegistryfacade class withfrom_algod()andfrom_app_client()constructors for different use cases - Removes the
build_netauth_from_env()helper function, requiring environment variables to include the "net:" prefix - Updates environment templates and all usage sites to use the full netauth format (e.g., "net:testnet" instead of "testnet")
Reviewed changes
Copilot reviewed 13 out of 16 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
src/registry.py |
New facade class providing unified interface for registry operations with read/write access control |
src/app_client.py |
New utility for lazy importing of generated client module |
tests/sdk/test_registry.py |
Comprehensive test suite for the new registry facade covering all constructors, properties, and edge cases |
src/__init__.py |
Updated public API to export new AsaMetadataRegistry and RegistryConfig classes, removed build_netauth_from_env |
src/codec.py |
Removed build_netauth_from_env() function and updated URI parsing to work with full netauth strings |
src/deployments.py |
Added arc90_uri_netauth field to RegistryDeployment dataclass |
tests/conftest.py |
Updated fixture to use environment variable directly without transformation |
smart_contracts/constants.py |
Removed ARC90_URI_NETAUTH_PREFIX constant as it's no longer needed |
smart_contracts/avm_common.py |
Simplified netauth handling to use template variable directly |
smart_contracts/asa_metadata_registry/deploy_config.py |
Updated to use environment variable directly |
.env.testnet.template |
Changed ARC90_NETAUTH from "testnet" to "net:testnet" |
.env.localnet.template |
Changed ARC90_NETAUTH from "localnet" to "net:localnet" |
smart_contracts/artifacts/asa_metadata_registry/AsaMetadataRegistry.approval.teal |
Generated TEAL code updated to reflect Python changes |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 47 out of 51 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.