feat: contract registry api idshashes versions#524
Merged
Cedarich merged 3 commits intoJun 4, 2026
Merged
Conversation
…gistry-api-ids-hashes-versions
- Add public endpoints to fetch active deployment metadata by network and contract name - Add admin-only upsert endpoint for contract deployment entries keyed by network + contract name - Extend registry payloads with contract ID, WASM hash, schema version, schema compatibility, network passphrase, init params, and deployment metadata - Persist new schema compatibility and init params fields with migration updates - Enhance audit logging to capture who/when/what changed with before/after snapshots for registry upserts - Keep existing publish/rollback flows backward compatible while exposing new deployment-read APIs - Add unit coverage for upsert and deployment read paths - Fix related type-check issues in ingestion/support-bundle tests and normalize DTO imports via barrel export
|
@titilayo967 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
Contributor
Author
|
@Cedarich please, review. |
Cedarich
approved these changes
Jun 4, 2026
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.
Pull Request
Description
This PR implements the Contract Deployment Registry API, providing a centralized service to store and serve deployed contract metadata per network, including contract IDs, WASM hashes, initialization parameters, and schema versions. This eliminates hardcoded contract IDs in the frontend and mobile app, enabling dynamic contract discovery and full auditability of registry changes.
Related Issues
Changes Made
Storage Schema: Created database schema for contract deployments keyed by network + contract name, including fields for contract ID, WASM hash, init params, schema version, and network passphrase
Admin Endpoints: Added admin-only endpoints to upsert deployment metadata with proper authentication and authorization checks
Public Read Endpoints: Exposed public endpoints for frontend and mobile to fetch current contract IDs by network and contract name
Audit Logging: Implemented audit logging for all changes to the deployment registry, recording who made the change, when, and what changed
Type of Change
How to Test
Admin Upsert: Authenticate as an admin and POST to
/api/v1/registry/deploymentswith network, contract name, contract ID, WASM hash, and schema versionPublic Read: Without authentication, GET
/api/v1/registry/deployments?network=testnet&contractName=AidEscrowand verify the correct contract ID is returnedAudit Trail: Make changes to a deployment entry and query the audit log endpoint to confirm the change is recorded with user identity and timestamp
Screenshots (if applicable)
N/A - API changes only
Checklist
Additional Notes
Reviewer Guidelines
Closes #413