Skip to content

Fix core for CAP-0073 - #5153

Merged
sisuresh merged 3 commits into
stellar:masterfrom
sisuresh:cap73
Feb 24, 2026
Merged

sisuresh merged 3 commits into
stellar:masterfrom
sisuresh:cap73

Conversation

@sisuresh

Copy link
Copy Markdown
Contributor

Description

Add test for CAP-0073 and allow trustline/account creation.

Checklist

  • Reviewed the contributing document
  • Rebased on top of master (no merge commits)
  • Ran clang-format v8.0.0 (via make format or the Visual Studio extension)
  • Compiles
  • Ran all tests
  • If change impacts performance, include supporting evidence per the performance document

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 to AssetContractTestClient for testing trustline creation via SAC
  • Added comprehensive tests for CAP-73 functionality including trustline creation and account creation through XLM transfers
  • Updated InvokeHostFunctionOpFrame to 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
dmkozh previously approved these changes Feb 24, 2026

@dmkozh dmkozh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for taking care of this!

dmkozh
dmkozh previously approved these changes Feb 24, 2026
dmkozh
dmkozh previously approved these changes Feb 24, 2026
@sisuresh
sisuresh added this pull request to the merge queue Feb 24, 2026
Merged via the queue into stellar:master with commit 599d85b Feb 24, 2026
51 checks passed
@sisuresh
sisuresh deleted the cap73 branch February 24, 2026 20:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants