Skip to content

Protocol 28 (CAP-0084): muxed contract address support#17

Closed
sisuresh wants to merge 1 commit into
p28-cap-0084-basefrom
p28-cap-0084
Closed

Protocol 28 (CAP-0084): muxed contract address support#17
sisuresh wants to merge 1 commit into
p28-cap-0084-basefrom
p28-cap-0084

Conversation

@sisuresh

Copy link
Copy Markdown
Owner

Summary

Adds support for the new SC_ADDRESS_TYPE_MUXED_CONTRACT address type introduced by CAP-0084, gated behind the CAP_0084 build flag (enabled with --enable-next-protocol-version-unsafe-for-production).

Changes

  • Submodules: bump src/protocol-curr/xdr for the muxed-contract address XDR, and src/rust/soroban/p27 for SAC support that de-muxes the destination to the underlying contract (for the balance) and surfaces the muxed id via the to_muxed_id transfer event.
  • Build: wire up the CAP_0084 conditional in configure.ac, common.mk, and src/Makefile.am (C++ and XDR feature flags).
  • C++ support: hash (LedgerHashUtils) and JSON-serialize (XDRCereal) the new address type.
  • Dep tree: refresh the p27 cargo dep-tree expectation.
  • Tests: add a SAC transfer-to-muxed-contract case (native + custom assets) to the CAP-67 address-types test. The test account is funded with enough native balance to stay above its account reserve after the cumulative native transfers in the run.

Notes

  • Draft / WIP. The src/rust/soroban/p27 submodule currently points at a temporary CAP-0084 spike, and its dep tree references a rs-stellar-xdr fork; these will be replaced with upstream revisions before this is mergeable.

🤖 Generated with Claude Code

Add support for the new SC_ADDRESS_TYPE_MUXED_CONTRACT address type
introduced by CAP-0084, behind the CAP_0084 build flag (enabled with the
unsafe next-protocol configuration).

- Bump the protocol-curr XDR submodule to pick up the muxed contract
  address definition, and the soroban (p27) submodule for SAC support
  that de-muxes the destination and surfaces the muxed id via the
  `to_muxed_id` transfer event.
- Wire up the CAP_0084 conditional in configure.ac, common.mk and
  src/Makefile.am (C++ and XDR feature flags).
- Hash and JSON-serialize the new address type (LedgerHashUtils,
  XDRCereal).
- Refresh the p27 cargo dep-tree expectation.
- Add a SAC transfer-to-muxed-contract test exercising both native and
  custom assets. Fund the test account with enough native balance to
  stay above its account reserve after the cumulative native transfers.
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.

1 participant