[CAP-73] Simplify the inteface for creating trustlines.#1860
Merged
sisuresh merged 5 commits intostellar:masterfrom Jan 29, 2026
Merged
[CAP-73] Simplify the inteface for creating trustlines.#1860sisuresh merged 5 commits intostellar:masterfrom
sisuresh merged 5 commits intostellar:masterfrom
Conversation
Also removed mentions of CAP-72 from most sections, as it seems like it's unlikely that we'll do CAP-72. Without CAP-72 there is not much motivation to provide granular control control over trustline limits from Soroban or checking if a trustline exists in the first place. Thus just one simple function for creating trustlines when necessary is introduced instead of 2 functions we had before.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates CAP-0073 to simplify the Soroban interface for managing classic trustlines, focusing on a single allow_trust function and de-emphasizing CAP-72. It also clarifies how XLM SAC transfers create accounts and updates the design rationale accordingly.
Changes:
- Replace the previous
change_trustandhas_trustSAC functions with a singleallow_trust(env: Env, address: Address)function that creates an unlimited trustline if it is missing. - Clarify semantics for
allow_trust, including no-op behavior for C-addresses, required authorization only on trustline creation, and use ofi64::MAXas the trustline limit. - Remove most references to CAP-72 and adjust the XLM transfer and design rationale sections to match the new, simplified trustline-creation behavior.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
sisuresh
approved these changes
Jan 29, 2026
leighmcculloch
approved these changes
Jan 29, 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.
Also removed mentions of CAP-72 from most sections, as it seems like it's unlikely that we'll do CAP-72.
Without CAP-72 there is not much motivation to provide granular control control over trustline limits from Soroban or checking if a trustline exists in the first place. Thus just one simple function for creating trustlines when necessary is introduced instead of 2 functions we had before.