Repository navigation
Fix core for CAP-0073 - #5153
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request implements CAP-0073, which enables the Stellar Asset Contract (SAC) to create classic ledger entries (accounts and trustlines) through Soroban contract invocations. This extends the capabilities of the SAC by allowing it to create trustlines via a new trust() function and to create accounts when transferring native assets (XLM) to non-existent addresses.
Changes:
- Added a new
trust()method toAssetContractTestClientfor testing trustline creation via SAC - Added comprehensive tests for CAP-73 functionality including trustline creation and account creation through XLM transfers
- Updated
InvokeHostFunctionOpFrameto allow ACCOUNT and TRUSTLINE entry types to be created starting from protocol version 26
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/transactions/test/SorobanTxTestUtils.h | Declares new trust() method for testing trustline creation via SAC |
| src/transactions/test/SorobanTxTestUtils.cpp | Implements trust() method that creates trustlines through contract invocation with appropriate footprint |
| src/transactions/test/InvokeHostFunctionTests.cpp | Adds comprehensive tests for CAP-73: trustline creation via trust() and account creation via XLM transfer |
| src/transactions/InvokeHostFunctionOpFrame.cpp | Updates validation logic to allow ACCOUNT and TRUSTLINE entries to be created starting from protocol 26 (CAP-73) |
dmkozh
previously approved these changes
Feb 24, 2026
dmkozh
left a comment
Contributor
There was a problem hiding this comment.
Thank you for taking care of this!
dmkozh
previously approved these changes
Feb 24, 2026
sisuresh
enabled auto-merge
February 24, 2026 17:58
dmkozh
previously approved these changes
Feb 24, 2026
dmkozh
approved these changes
Feb 24, 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.
Description
Add test for CAP-0073 and allow trustline/account creation.
Checklist
clang-formatv8.0.0 (viamake formator the Visual Studio extension)