feat(contracts): implement Soroban asset registry with ownership tracking and admin controls #401
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.
Description
This PR introduces the foundational Asset Registry smart contract built with Soroban (Stellar smart contracts). The contract serves as the decentralized source of truth for on-chain asset records, supporting asset registration, ownership tracking, immutable history, and emergency controls. It establishes the core infrastructure required for managing tokenized assets securely and transparently.
Related Issues
Closes #370
Changes Made
asset_id → Asset) with optimized storageowner → asset_ids) for reverse lookupsMap,Vec)How to Test
Deploy the contract to Stellar testnet using Soroban CLI
Initialize the contract with an admin address
Register a new asset and verify:
AssetRegisteredevent is emittedQuery the asset by ID and by owner address
Transfer asset ownership and confirm:
AssetTransferredevent is emittedUpdate asset metadata as owner/admin and verify authorization enforcement
Retire an asset and confirm status update and event emission
Pause the contract and ensure all write operations are blocked
Unpause the contract and verify normal operation resumes
Test invalid scenarios (duplicate asset ID, unauthorized access, paused state)
Screenshots (if applicable)
N/A (Smart contract implementation)
Checklist