Skip to content

Update RWA SEP#1930

Merged
leighmcculloch merged 9 commits into
stellar:masterfrom
ozgunozerk:sep-57-update
Jun 1, 2026
Merged

Update RWA SEP#1930
leighmcculloch merged 9 commits into
stellar:masterfrom
ozgunozerk:sep-57-update

Conversation

@ozgunozerk

@ozgunozerk ozgunozerk commented May 12, 2026

Copy link
Copy Markdown
Contributor

Summary

After @janewang noticed we are missing recovery_target from this SEP, I've taken a deeper look to see if there are other discrepancies left. And yes, there were some :)

Changes

  • Added token: Address to 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 simplified can_transfer snippet in the Architecture Overview.
  • Added the two getters that already exist in the impl: get_modules_for_hook and is_module_registered.
  • IdentityVerifier: added recovery_target(e, old_account) -> Option<Address>. RWAToken::recover_balance calls into this to confirm an identity recovery has already happened before moving balances.
  • IdentityRegistryStorage: replaced the associated-type type CountryData: FromVal<Env, Val> with Vec<Val> parameters, and added a note explaining the Soroban SDK constraint (#[contractclient] cannot derive on traits with associated types) that drives this choice.
  • Renamed the recovery event RecoveryRecoverySuccess to match the impl.
  • Dropped the operator topic from AddressFrozen (impl emits only user_address and is_frozen).

Copilot AI review requested due to automatic review settings May 12, 2026 14:00

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 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 missing CountryDataManager trait, and switch country-data trait parameters to Val-based shapes.
  • Align event specifications with the implementation (rename RecoveryRecoverySuccess, and remove operator from AddressFrozen topics).

Comment thread ecosystem/sep-0057.md
Comment thread ecosystem/sep-0057.md
Comment thread ecosystem/sep-0057.md
Comment thread ecosystem/sep-0057.md
@ozgunozerk

Copy link
Copy Markdown
Contributor Author

Prettier check is failing due to sep 23, not this one

janewang
janewang previously approved these changes May 12, 2026
@janewang

Copy link
Copy Markdown
Contributor

Adding @mootz12 and @marcelosalloum for visibility

Comment thread ecosystem/sep-0057.md Outdated

@leighmcculloch leighmcculloch left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This change updates a draft SEP without changing its version or changelog. Can those be updated?

Comment thread ecosystem/sep-0057.md Outdated
@leighmcculloch leighmcculloch enabled auto-merge (squash) June 1, 2026 08:02
@leighmcculloch leighmcculloch disabled auto-merge June 1, 2026 08:02
@leighmcculloch leighmcculloch merged commit 2adcb44 into stellar:master Jun 1, 2026
5 checks passed
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.

5 participants