Skip to content

refactor(contracts): migrate deprecated event publishing to #[contractevent] - #1993

Open
Whiznificent wants to merge 1 commit into
StellarDevHub:mainfrom
Whiznificent:fix/1855-contractevent-migration
Open

Whiznificent wants to merge 1 commit into
StellarDevHub:mainfrom
Whiznificent:fix/1855-contractevent-migration

Conversation

@Whiznificent

Copy link
Copy Markdown

Summary

Migrates Soroban event emissions from the deprecated env.events().publish(...) API to typed #[contractevent] structs in the five contracts in scope for SC-058 (issue #1855):

  • contract_events — all 18 shared emitters plus 6 new AMM and 6 new certificate-lifecycle event types. Removes publish_standard_event.
  • amm — 7 emissions now route through typed helpers.
  • certificate — 6 lifecycle emissions plus the structured cert_rev event.
  • token_migration — 5 direct emissions (stor_mig, vest_new, vest_clm, vest_rev, migrated).
  • cross_chain_client — 8 direct emissions (validator, val_rm, evm_hdr, ast_unlk, rly_add, rly_rm, xc_msg, rcpt_ok).

Compatibility

Wire format is preserved exactly: custom topic strings match the existing topic::* symbols, topic counts are unchanged, and data_format = "vec" keeps positional tuple payloads. Off-chain decoders need no changes.

Regression tests assert topic symbols, topic counts, and payload values for each migrated family.

Validation

  • cargo fmt --all --check ✅
  • cargo clippy --workspace --all-targets ✅
  • cargo build ✅
  • cargo test --workspace --all-targets -- --nocapture ✅

Fixes #1855

…tevent]

Replace env.events().publish(...) calls in certificate, amm, contract_events,
token_migration, and cross_chain_client with typed #[contractevent] structs.

Preserve all existing topic symbols, topic counts, and payload shapes so
off-chain indexers continue to decode events unchanged. Add regression tests
locking in the wire format.

Fixes StellarDevHub#1855
@vercel

vercel Bot commented Nov 25, 2026

Copy link
Copy Markdown

@Whiznificent is attempting to deploy a commit to the Ayomide Adeniran's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Nov 25, 2026

Copy link
Copy Markdown

@Whiznificent Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

This branch has not been deployed

No deployments
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.

[SC-058] SDK Modernization: Deprecating env.events().publish(...) for #[contractevent]

1 participant