Skip to content

feat(events): Add stable event type IDs#227

Open
dDevAhmed wants to merge 1 commit into
BlockDash-Studios:mainfrom
dDevAhmed:feature/issue-38-stable-event-type-ids
Open

feat(events): Add stable event type IDs#227
dDevAhmed wants to merge 1 commit into
BlockDash-Studios:mainfrom
dDevAhmed:feature/issue-38-stable-event-type-ids

Conversation

@dDevAhmed

Copy link
Copy Markdown

Feat: Add Stable Event Type IDs

This PR introduces a stable event_type_id to all contract events, addressing the need for reliable event identification across contract upgrades.

Changes

  • Added event_type_id: u32 to all event structs in events.rs.
  • Updated all publish_* functions to initialize the event_type_id.

Reasoning

By providing a stable identifier for each event, we can ensure that off-chain services can reliably track and process events, even if the event names or payload structures change in the future. This is a crucial step towards improving the long-term maintainability and interoperability of the contract.

closes #38

@MaryammAli

Copy link
Copy Markdown
Contributor

please run cargo build and cargo test to fix errors
@dDevAhmed

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.

Add stable event type IDs and cross-chain compatibility metadata

2 participants