Update RWA SEP#1930
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates SEP-0057 (T-REX / RWA token standard) to better align the written specification with the referenced implementation, especially around compliance hooks, recovery flows, and identity registry/country data interfaces.
Changes:
- Extend compliance hooks to include
token: Address, and add missing compliance getters (get_modules_for_hook,is_module_registered). - Add
IdentityVerifier::recovery_target(...), add the missingCountryDataManagertrait, and switch country-data trait parameters toVal-based shapes. - Align event specifications with the implementation (rename
Recovery→RecoverySuccess, and removeoperatorfromAddressFrozentopics).
|
Prettier check is failing due to sep 23, not this one |
|
Adding @mootz12 and @marcelosalloum for visibility |
leighmcculloch
left a comment
There was a problem hiding this comment.
This change updates a draft SEP without changing its version or changelog. Can those be updated?
| Created: 2025-11-26 | ||
| Updated: 2025-12-15 | ||
| Updated: 2026-05-12 | ||
| Version: 0.1.0 |
There was a problem hiding this comment.
@ozgunozerk It's common for SEPs to update their version, in this case:
| Version: 0.1.0 | |
| Version: 0.2.0 |
And to also note what changed in the changelog at the very bottom of the SEP:
stellar-protocol/ecosystem/sep-0057.md
Lines 1416 to 1418 in bcc47c2
Summary
After @janewang noticed we are missing
recovery_targetfrom this SEP, I've taken a deeper look to see if there are other discrepancies left. And yes, there were some :)Changes
token: Addressto all five hooks (can_transfer,can_create,transferred,created,destroyed) — required for a single compliance contract to serve multiple RWA tokens with per-token state. Also updated the simplifiedcan_transfersnippet in the Architecture Overview.get_modules_for_hookandis_module_registered.IdentityVerifier: addedrecovery_target(e, old_account) -> Option<Address>.RWAToken::recover_balancecalls into this to confirm an identity recovery has already happened before moving balances.IdentityRegistryStorage: replaced the associated-typetype CountryData: FromVal<Env, Val>withVec<Val>parameters, and added a note explaining the Soroban SDK constraint (#[contractclient]cannot derive on traits with associated types) that drives this choice.Recovery→RecoverySuccessto match the impl.operatortopic fromAddressFrozen(impl emits onlyuser_addressandis_frozen).