Implement Branch Contract#323
Merged
truthixify merged 2 commits intoDistinctCodes:mainfrom Oct 3, 2025
Merged
Conversation
|
@gelluisaac is attempting to deploy a commit to the naijabuz's projects Team on Vercel. A member of the Team first needs to authorize it. |
Collaborator
|
@gelluisaac fix failing CI |
Contributor
Author
|
@truthixify done |
Collaborator
|
mention the issue it closes in the description |
Contributor
Author
|
@truthixify done |
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.
closes #248 This PR introduces a comprehensive branch management system to the AssetsUp Soroban contract, enabling organizations to organize and manage their assets across multiple branches/locations.
🚀 Features Added
Core Branch Management
Data Structures
id,name,location, andadminfieldsBranch(BytesN<32>)andAssetList(BytesN<32>)storage keys🔧 Technical Implementation
New Files
src/branch.rs- Branch data structures and typessrc/tests/branch.rs- Comprehensive test suite (8 test cases)Modified Files
src/lib.rs- Added branch module and 4 new contract functionssrc/errors.rs- Added 3 new error types for branch operationssrc/tests/mod.rs- Included branch tests moduleNew Contract Functions
🛡️ Security & Access Control
🧪 Testing
Test Coverage
Test Results
📊 Error Handling
New Error Types
BranchAlreadyExists = 3- Attempted to create duplicate branchBranchNotFound = 4- Referenced branch doesn't existUnauthorized = 5- Insufficient permissions for operation🔄 Integration
📝 Usage Examples
Create a Branch
Link Asset to Branch
Retrieve Branch Assets
✅ Acceptance Criteria